]> SALOME platform Git repositories - tools/medcoupling.git/commitdiff
Salome HOME
In progress
authorAnthony Geay <anthony.geay@edf.fr>
Tue, 2 Jan 2018 16:18:48 +0000 (17:18 +0100)
committerAnthony Geay <anthony.geay@edf.fr>
Tue, 2 Jan 2018 16:18:48 +0000 (17:18 +0100)
src/INTERP_KERNEL/BoundingBox.cxx
src/INTERP_KERNEL/BoundingBox.hxx
src/INTERP_KERNEL/Interpolation1D0D.txx
src/INTERP_KERNEL/MeshElement.txx

index f8c640b25af90009965745d7fb120c6bdd76821c..eeccb1ee09aec3417d0f5c476cea87b47f7a0c8e 100644 (file)
@@ -162,4 +162,9 @@ namespace INTERP_KERNEL
     return valid;
   }
 
+  void BoundingBox::toCompactData(double data[6]) const
+  {
+    std::copy(_coords,_coords+6,data);
+  }
+
 }
index f64da9a2ca41e78a943aaf1bb5f6285ee5f5985f..450e4bcf90d5c49e70106d05824f8e246bfa49c7 100644 (file)
@@ -53,6 +53,8 @@ namespace INTERP_KERNEL
 
     inline void dumpCoords() const;
 
+    void toCompactData(double data[6]) const;
+
   private:
     
     bool isValid() const;
index e45969988c13750fa2edf99dc0ffd4b4b1cc9200..db6296b5b22ecdc4a3298ea1c31d7db6dad245a5 100644 (file)
@@ -70,19 +70,12 @@ namespace INTERP_KERNEL
 
     // create BBTree structure
     // - get bounding boxes
-    std::vector<double> bboxes(6*numSrcElems);
+    std::vector<double> 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<ConnType> intersectElems;
 
         //tree.getElementsAroundPoint(targetBox, intersectElems);
index e2796abad2f62379e37c3dbd89a16006cab92e51..552ab2625525a613668e1ffe0449007dff4493a1 100644 (file)
@@ -61,8 +61,6 @@ namespace INTERP_KERNEL
     delete _box;
   }
 
-  
-
   /////////////////////////////////////////////////////////////////////
   /// ElementBBoxOrder                                    /////////////
   /////////////////////////////////////////////////////////////////////