From: Anthony Geay Date: Tue, 2 Jan 2018 16:18:48 +0000 (+0100) Subject: In progress X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=df051cca63f15bd50d7fc59555d1834ecfc0e2ff;p=tools%2Fmedcoupling.git In progress --- diff --git a/src/INTERP_KERNEL/BoundingBox.cxx b/src/INTERP_KERNEL/BoundingBox.cxx index f8c640b25..eeccb1ee0 100644 --- a/src/INTERP_KERNEL/BoundingBox.cxx +++ b/src/INTERP_KERNEL/BoundingBox.cxx @@ -162,4 +162,9 @@ namespace INTERP_KERNEL return valid; } + void BoundingBox::toCompactData(double data[6]) const + { + std::copy(_coords,_coords+6,data); + } + } diff --git a/src/INTERP_KERNEL/BoundingBox.hxx b/src/INTERP_KERNEL/BoundingBox.hxx index f64da9a2c..450e4bcf9 100644 --- a/src/INTERP_KERNEL/BoundingBox.hxx +++ b/src/INTERP_KERNEL/BoundingBox.hxx @@ -53,6 +53,8 @@ namespace INTERP_KERNEL inline void dumpCoords() const; + void toCompactData(double data[6]) const; + private: bool isValid() const; diff --git a/src/INTERP_KERNEL/Interpolation1D0D.txx b/src/INTERP_KERNEL/Interpolation1D0D.txx index e45969988..db6296b5b 100644 --- a/src/INTERP_KERNEL/Interpolation1D0D.txx +++ b/src/INTERP_KERNEL/Interpolation1D0D.txx @@ -70,19 +70,12 @@ namespace INTERP_KERNEL // create BBTree structure // - get bounding boxes - std::vector bboxes(6*numSrcElems); + std::vector bboxes(2*SPACEDIM*numSrcElems); int* srcElemIdx = new int[numSrcElems]; for(unsigned long i = 0; i < numSrcElems ; ++i) { // get source bboxes in right order - const BoundingBox* box = srcElems[i]->getBoundingBox(); - bboxes[6*i+0] = box->getCoordinate(BoundingBox::XMIN); - bboxes[6*i+1] = box->getCoordinate(BoundingBox::XMAX); - bboxes[6*i+2] = box->getCoordinate(BoundingBox::YMIN); - bboxes[6*i+3] = box->getCoordinate(BoundingBox::YMAX); - bboxes[6*i+4] = box->getCoordinate(BoundingBox::ZMIN); - bboxes[6*i+5] = box->getCoordinate(BoundingBox::ZMAX); - + srcElems[i]->getBoundingBox()->toCompactData(bboxes.data()+6*i); srcElemIdx[i] = srcElems[i]->getIndex(); } @@ -96,9 +89,6 @@ namespace INTERP_KERNEL // - calculate intersection by calling intersectCells for(unsigned long i = 0; i < numTargetElems; ++i) { - - - std::vector intersectElems; //tree.getElementsAroundPoint(targetBox, intersectElems); diff --git a/src/INTERP_KERNEL/MeshElement.txx b/src/INTERP_KERNEL/MeshElement.txx index e2796abad..552ab2625 100644 --- a/src/INTERP_KERNEL/MeshElement.txx +++ b/src/INTERP_KERNEL/MeshElement.txx @@ -61,8 +61,6 @@ namespace INTERP_KERNEL delete _box; } - - ///////////////////////////////////////////////////////////////////// /// ElementBBoxOrder ///////////// /////////////////////////////////////////////////////////////////////