From: eap Date: Fri, 28 Dec 2012 09:51:28 +0000 (+0000) Subject: 0021756: [CEA 602] MEDPartitioner improvements X-Git-Tag: V6_main_FINAL~440 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=39f43e3d5f9b351aee65ad63dacc7bba2108d38f;p=tools%2Fmedcoupling.git 0021756: [CEA 602] MEDPartitioner improvements use BBTreeOfDim --- diff --git a/src/MEDPartitioner/MEDPARTITIONER_JointFinder.cxx b/src/MEDPartitioner/MEDPARTITIONER_JointFinder.cxx index 87dbc36be..bc31670da 100644 --- a/src/MEDPartitioner/MEDPARTITIONER_JointFinder.cxx +++ b/src/MEDPartitioner/MEDPARTITIONER_JointFinder.cxx @@ -48,13 +48,13 @@ void MEDPARTITIONER::JointFinder::findCommonDistantNodes() _node_node[i].resize(nbdomain); } int nbproc=_domain_selector->nbProcs(); - std::vector* > bbtree(nbdomain,(BBTree<3>*) 0); + std::vector bbtree(nbdomain,(BBTreeOfDim*) 0); std::vector bbxi(nbdomain,(double*) 0); std::vector rev(nbdomain,(ParaMEDMEM::DataArrayInt*) 0); std::vector 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 (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; isourcegetProcessorID(itarget); - + std::vector 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 localCorrespondency; RecvIntVec(localCorrespondency, targetProc); diff --git a/src/MEDPartitioner/MEDPARTITIONER_MeshCollection.hxx b/src/MEDPartitioner/MEDPARTITIONER_MeshCollection.hxx index 2e6827a73..f34a33aa1 100644 --- a/src/MEDPartitioner/MEDPARTITIONER_MeshCollection.hxx +++ b/src/MEDPartitioner/MEDPARTITIONER_MeshCollection.hxx @@ -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,