]> SALOME platform Git repositories - tools/medcoupling.git/commitdiff
Salome HOME
0021756: [CEA 602] MEDPartitioner improvements
authoreap <eap@opencascade.com>
Fri, 28 Dec 2012 09:51:28 +0000 (09:51 +0000)
committereap <eap@opencascade.com>
Fri, 28 Dec 2012 09:51:28 +0000 (09:51 +0000)
   use BBTreeOfDim

src/MEDPartitioner/MEDPARTITIONER_JointFinder.cxx
src/MEDPartitioner/MEDPARTITIONER_MeshCollection.hxx

index 87dbc36beb496bdcc63dc62b2b8bf06732c26ea7..bc31670da79c5289587ae0fa7f1b5f4d16e5f454 100644 (file)
@@ -48,13 +48,13 @@ void MEDPARTITIONER::JointFinder::findCommonDistantNodes()
       _node_node[i].resize(nbdomain);
     }
   int nbproc=_domain_selector->nbProcs();
-  std::vector<BBTree<3>* > bbtree(nbdomain,(BBTree<3>*) 0);
+  std::vector<BBTreeOfDim* > bbtree(nbdomain,(BBTreeOfDim*) 0);
   std::vector<double* > bbxi(nbdomain,(double*) 0);
   std::vector<ParaMEDMEM::DataArrayInt*> rev(nbdomain,(ParaMEDMEM::DataArrayInt*) 0);
   std::vector<ParaMEDMEM::DataArrayInt*> revIndx(nbdomain,(ParaMEDMEM::DataArrayInt*) 0);
   int meshDim=-1;
   int spaceDim=-1;
-  
+
   //init rev and revIndx and bbtree for my domain (of me:proc n)
   for (int mydomain=0; mydomain<nbdomain; mydomain++)
     {
@@ -73,12 +73,12 @@ void MEDPARTITIONER::JointFinder::findCommonDistantNodes()
           bbx[2*i]=(coords[i])-1e-12;
           bbx[2*i+1]=bbx[2*i]+2e-12;
         }
-      bbtree[mydomain]=new BBTree<3> (bbx,0,0,myMesh->getNumberOfNodes(),-1e-12);
+      bbtree[mydomain]=new BBTreeOfDim( spaceDim, bbx,0,0,myMesh->getNumberOfNodes(),-1e-12);
       //keep bbx because need it in getIntersectingElems
       //no delete [] bbx yet
       bbxi[mydomain]=bbx;
     }
-  
+
   //send my domains to other proc an receive other domains from other proc
   for (int isource=0; isource<nbdomain; isource++)
     {
@@ -91,11 +91,11 @@ void MEDPARTITIONER::JointFinder::findCommonDistantNodes()
             {
               //preparing data for treatment on target proc
               int targetProc = _domain_selector->getProcessorID(itarget);
-    
+
               std::vector<double> vec(spaceDim*sourceMesh->getNumberOfNodes());
               std::copy(sourceMesh->getCoords()->getConstPointer(),sourceMesh->getCoords()->getConstPointer()+sourceMesh->getNumberOfNodes()*spaceDim,&vec[0]);
               SendDoubleVec(vec,targetProc);
-    
+
               //retrieving target data for storage in commonDistantNodes array
               std::vector<int> localCorrespondency;
               RecvIntVec(localCorrespondency, targetProc);
index 2e6827a73b47dbd88400b6c0eb98e9369e6ba5d5..f34a33aa136ff892c48c95e619e98e31d18ad0e3 100644 (file)
@@ -22,6 +22,7 @@
 
 #include "MEDPARTITIONER.hxx"
 #include "MEDPARTITIONER_Graph.hxx"
+#include "MEDPARTITIONER_Utils.hxx"
 
 #include "MEDCouplingUMesh.hxx"
 
@@ -156,11 +157,11 @@ namespace MEDPARTITIONER
 
     
     void remapIntField(int inew, int iold, 
-                        const ParaMEDMEM::MEDCouplingUMesh& sourceMesh,
-                        const ParaMEDMEM::MEDCouplingUMesh& targetMesh,
-                        const int* fromArray,
-                        std::string nameArrayTo,
-                       const BBTree<3,int>* tree);
+                       const ParaMEDMEM::MEDCouplingUMesh& sourceMesh,
+                       const ParaMEDMEM::MEDCouplingUMesh& targetMesh,
+                       const int* fromArray,
+                       std::string nameArrayTo,
+                       const BBTreeOfDim* tree);
 
     void remapDoubleField(int inew, int iold,
                            ParaMEDMEM::DataArrayDouble* fromArray,