LOG(2, "Target mesh has " << numTargetElems << " elements ");
- std::vector< MeshElement<ConnType> > targetElems(numTargetElems);
DuplicateFacesType intersectFaces;
- for(ConnType i = 0 ; i < numTargetElems ; ++i)
- targetElems[i].assign(i, targetMesh);
-
std::unique_ptr< Intersector3D<MyMeshType,MyMatrixType> > intersector;
std::string methC = InterpolationOptions::filterInterpolationMethod(method);
const double dimCaracteristic = CalculateCharacteristicSizeOfMeshes(srcMesh, targetMesh, InterpolationOptions::getPrintLevel());
// - calculate intersection by calling intersectCells
for(ConnType i = 0; i < numTargetElems; ++i)
{
- const BoundingBox* box = targetElems[i].getBoundingBox();
+ MeshElement<ConnType> trgMeshElem(i, targetMesh);
+
+ const BoundingBox *box = trgMeshElem.getBoundingBox();
// get target bbox in right order
double targetBox[6];
tree.getIntersectingElems(targetBox, intersectElems);
if ( !intersectElems.empty() )
- intersector->intersectCells(i, intersectElems, matrix);
-
+ intersector->intersectCells(i, intersectElems, matrix);
}
DuplicateFacesType::iterator iter;
LOG(2, "Target mesh has " << numTargetElems << " elements ");
- std::vector< MeshElement<ConnType> > targetElems(numTargetElems);
-
- for(ConnType i = 0 ; i < numTargetElems ; ++i)
- {
- targetElems[i].assign(i, targetMesh);
- }
-
std::unique_ptr<Intersector3D<MyMeshType,MatrixType>> intersector;
std::string methC = InterpolationOptions::filterInterpolationMethod(method);
if(methC=="P0P0")
// - calculate intersection by calling intersectCells
for(ConnType i = 0; i < numTargetElems; ++i)
{
- const BoundingBox* box = targetElems[i].getBoundingBox();
+ MeshElement<ConnType> trgMeshElem(i, targetMesh);
+
+ const BoundingBox *box = trgMeshElem.getBoundingBox();
// get target bbox in right order
double targetBox[6];
LOG(2, "Target mesh has " << numTargetElems << " elements ");
- std::vector< MeshElement<ConnType> > targetElems(numTargetElems);
-
- for(ConnType i = 0 ; i < numTargetElems ; ++i)
- targetElems[i].assign(i, targetMesh);
-
std::unique_ptr< Intersector3D<MyMeshType,MatrixType> > intersector;
std::string methC = InterpolationOptions::filterInterpolationMethod(method);
if(methC=="P0P0")
// - calculate intersection by calling intersectCells
for(ConnType i = 0; i < numTargetElems; ++i)
{
- const BoundingBox* box = targetElems[i].getBoundingBox();
+ MeshElement<ConnType> trgMeshElem(i, targetMesh);
+
+ const BoundingBox* box = trgMeshElem.getBoundingBox();
// get target bbox in right order
double targetBox[6];
box->fillInXMinXmaxYminYmaxZminZmaxFormat(targetBox);
using ConnType = typename MyMeshType::MyConnType;
const ConnType numSrcElems = srcMesh.getNumberOfElements();
LOG(2, "Source mesh has " << numSrcElems << " elements");
- std::vector< MeshElement<ConnType> > srcElems(numSrcElems);
-
- for(ConnType i = 0 ; i < numSrcElems ; ++i)
- {
- srcElems[i].assign(i,srcMesh);
- }
// create BBTree structure
// - get bounding boxes
const ConnType nbElts = 6 * numSrcElems;
std::unique_ptr<double[]> bboxes( new double[nbElts] );
for(ConnType i = 0; i < numSrcElems ; ++i)
{
+ MeshElement<ConnType> srcElem(i,srcMesh);
// get source bboxes in right order
- const BoundingBox *box = srcElems[i].getBoundingBox();
+ const BoundingBox *box( srcElem.getBoundingBox() );
box->fillInXMinXmaxYminYmaxZminZmaxFormat(bboxes.get()+6*i);
}
bboxAdjuster(bboxes.get(),nbElts);