From: vbd Date: Mon, 18 Jul 2011 14:16:59 +0000 (+0000) Subject: version checked on cube splitting X-Git-Tag: MEDPartitioner_first_compilable_version~7 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=63923a5cbf45b90d2644ada3a7faab1016e5e4cd;p=tools%2Fmedcoupling.git version checked on cube splitting --- diff --git a/src/MEDPartitioner/MEDPARTITIONER_Graph.hxx b/src/MEDPartitioner/MEDPARTITIONER_Graph.hxx index 50af471fa..3764063bd 100644 --- a/src/MEDPartitioner/MEDPARTITIONER_Graph.hxx +++ b/src/MEDPartitioner/MEDPARTITIONER_Graph.hxx @@ -22,7 +22,7 @@ #include "MEDPARTITIONER.hxx" #include "MEDPARTITIONER_SkyLineArray.hxx" - +#include namespace MEDPARTITIONER { class ParaDomainSelector; diff --git a/src/MEDPartitioner/MEDPARTITIONER_MESHCollection.cxx b/src/MEDPartitioner/MEDPARTITIONER_MESHCollection.cxx index 3865e8e7c..132f31da5 100644 --- a/src/MEDPartitioner/MEDPARTITIONER_MESHCollection.cxx +++ b/src/MEDPartitioner/MEDPARTITIONER_MESHCollection.cxx @@ -116,6 +116,7 @@ MESHCollection::MESHCollection(MESHCollection& initialCollection, Topology* topo castCellMeshes(initialCollection, new2oldIds); + //casting cell families on new meshes _cellFamilyIds.resize(topology->nbDomain()); castIntField(initialCollection.getMesh(), this->getMesh(),initialCollection.getCellFamilyIds(),_cellFamilyIds, new2oldIds); @@ -145,13 +146,16 @@ MESHCollection::MESHCollection(MESHCollection& initialCollection, Topology* topo { if(isParallelMode() && !_domain_selector->isMyDomain(inew)) continue; _cellFamilyIds[inew]=ParaMEDMEM::DataArrayInt::New(); - int* ptrCellIds=new int[_mesh[inew]->getNumberOfCells()]; - for (int i=0; i< _mesh[inew]->getNumberOfCells();i++) ptrCellIds[i]=0; - _cellFamilyIds[inew]->useArray(ptrCellIds,true, ParaMEDMEM::CPP_DEALLOC,_mesh[inew]->getNumberOfCells(),1); + int nbCells=_mesh[inew]->getNumberOfCells(); + int* ptrCellIds=new int[nbCells]; + for (int i=0; i< nbCells;i++) ptrCellIds[i]=0; + _cellFamilyIds[inew]->useArray(ptrCellIds,true, ParaMEDMEM::CPP_DEALLOC,nbCells,1); + + int nbFaces=_faceMesh[inew]->getNumberOfCells(); _faceFamilyIds[inew]=ParaMEDMEM::DataArrayInt::New(); - int* ptrFaceIds=new int[_faceMesh[inew]->getNumberOfCells()]; - for (int i=0; i< _faceMesh[inew]->getNumberOfCells();i++) ptrFaceIds[i]=0; - _faceFamilyIds[inew]->useArray(ptrFaceIds,true, ParaMEDMEM::CPP_DEALLOC,_faceMesh[inew]->getNumberOfCells(),1); + int* ptrFaceIds=new int[nbFaces]; + for (int i=0; iuseArray(ptrFaceIds,true, ParaMEDMEM::CPP_DEALLOC,nbFaces,1); } castIntField(initialCollection.getFaceMesh(), this->getFaceMesh(),initialCollection.getFaceFamilyIds(),_faceFamilyIds,new2oldFaceIds); @@ -240,6 +244,8 @@ void MESHCollection::castCellMeshes(MESHCollection& initialCollection, std::vect { _mesh[inew]=ParaMEDMEM::MEDCouplingUMesh::MergeUMeshes(meshes); _mesh[inew]->zipCoords(); + cout <<"new mesh "<getNumberOfCells()<<" cells"<< + _mesh[inew]->getNumberOfNodes()<<" nodes"<decrRef(); @@ -263,16 +269,20 @@ void MESHCollection::createNodeMapping( MESHCollection& initialCollection, NodeM if (!isParallelMode() || (_domain_selector->isMyDomain(iold))) { // std::map >, int > nodeClassifier; - int nvertices=getMesh(iold)->getNumberOfNodes(); + int nvertices=initialCollection.getMesh(iold)->getNumberOfNodes(); + cout <<"nvertices "<getCoords(); double* coordsPtr=coords->getPointer(); + for (int i=0; i(bbox,0,0,nvertices,1e-12); + tree=new BBTree<3>(bbox,0,0,nvertices,1e-9); } for (int inew=0; inew<_topology->nbDomain(); inew++) @@ -307,9 +317,11 @@ void MESHCollection::createNodeMapping( MESHCollection& initialCollection, NodeM { double* coordsPtr=coords->getPointer()+inode*3; + cout<<"coords new "< elems; tree->getElementsAroundPoint(coordsPtr,elems); - if (elems.size()==0) {continue;} + if (elems.size()==0) {cout<<"warning " <("<& mesh for (int iold=0; ioldisMyDomain(iold)) continue; + cout <<"-----------MESH OLD "<advancedRepr(); new2oldIds[iold].resize(newSize); for (int ielem=0;ielemgetNumberOfCells();ielem++) { @@ -358,7 +372,7 @@ void MESHCollection::castMeshes(std::vector& mesh map faces; // cout<<"----------------"<,pair >::const_iterator MI; @@ -368,10 +382,11 @@ void MESHCollection::castMeshes(std::vector& mesh // cout << iold <<" " <second.first)==faces.end()) - faces[iter->second.first]=1; + int inew=iter->second.first; + if (faces.find(inew)==faces.end()) + faces[inew]=1; else - faces[iter->second.first]++; + faces[inew]++; // cout<<"idomain" << iter->second.first<<" facemapping "<second.first]<& mesh { cout<<"nb faces - iold "<buildPartOfMySelf(&new2oldIds[iold][inew][0],&new2oldIds[iold][inew][0]+new2oldIds[iold][inew].size(),true)); + cout << "split face Meshes "<advancedRepr(); } } @@ -424,16 +440,48 @@ void MESHCollection::castMeshes(std::vector& mesh void MESHCollection::castIntField(std::vector& meshesCastFrom,std::vector& meshesCastTo, std::vector& arrayFrom, std::vector& arrayTo, std::vector< std::vector< std::vector > >& new2oldMapping) { - for (int inew=0; inew < meshesCastTo.size();inew++) + vector > splitIds; + splitIds.resize(meshesCastTo.size()); + + // send / recv operations + for (int inew=0; inew < meshesCastTo.size();inew++) + for (int iold=0; iold < meshesCastFrom.size();iold++) + { + vector recvIntVec; + //sending arrays for distant domains + if (isParallelMode() && _domain_selector->isMyDomain(iold) && !_domain_selector->isMyDomain(inew)) + { + int* ptr=&(new2oldMapping[iold][inew][0]); + int size=new2oldMapping[iold][inew].size(); + ParaMEDMEM::DataArrayInt* sendSplitIds=arrayFrom[iold]->selectByTupleId(ptr,ptr+size); + vectorsendIds(size); + std::copy(sendSplitIds->getPointer(),sendSplitIds->getPointer()+size,&sendIds[0]); + _domain_selector->sendIntVec(sendIds, _domain_selector->getProcessorID(inew)); + } + //receiving arrays from distant domains + if (isParallelMode()&&!_domain_selector->isMyDomain(iold) && _domain_selector->isMyDomain(inew)) + { + vector recvIds; + ParaMEDMEM::DataArrayInt* recvSplitIds=ParaMEDMEM::DataArrayInt::New(); + _domain_selector->recvIntVec(recvIds, _domain_selector->getProcessorID(iold)); + int* intSplitIds=new int[recvIds.size()]; + std::copy(&recvIds[0],&recvIds[0]+recvIds.size(),intSplitIds); + recvSplitIds->useArray(intSplitIds, true, ParaMEDMEM::CPP_DEALLOC, recvIds.size(),1); + splitIds[inew].push_back(recvSplitIds); + } + } + + //local contributions and aggregation + for (int inew=0; inew < meshesCastTo.size();inew++) { - vector splitIds; for (int iold=0; iold < meshesCastFrom.size();iold++) - { - if (isParallelMode() && !_domain_selector->isMyDomain(iold)) continue; - int* ptr=&(new2oldMapping[iold][inew][0]); - splitIds.push_back(arrayFrom[iold]->selectByTupleId(ptr,ptr+new2oldMapping[iold][inew].size())); - } - arrayTo[inew]=ParaMEDMEM::DataArrayInt::Aggregate(splitIds); + if (isParallelMode() && _domain_selector->isMyDomain(iold) && _domain_selector->isMyDomain(inew)) + { + int* ptr=&(new2oldMapping[iold][inew][0]); + splitIds[inew].push_back(arrayFrom[iold]->selectByTupleId(ptr,ptr+new2oldMapping[iold][inew].size())); + } + if (!isParallelMode()||_domain_selector->isMyDomain(inew)) + arrayTo[inew]=ParaMEDMEM::DataArrayInt::Aggregate(splitIds[inew]); } } @@ -453,12 +501,12 @@ MESHCollection::MESHCollection(const string& filename) _family_splitting(false), _create_empty_groups(false) { - char filenamechar[256]; - strcpy(filenamechar,filename.c_str()); + // char filenamechar[256]; + // strcpy(filenamechar,filename.c_str()); try { _driver=new MESHCollectionMedXMLDriver(this); - _driver->read (filenamechar); + _driver->read (filename.c_str()); _driver_type = MedXML; } @@ -467,7 +515,7 @@ MESHCollection::MESHCollection(const string& filename) try { _driver=new MESHCollectionMedAsciiDriver(this); - _driver->read (filenamechar); + _driver->read (filename.c_str()); _driver_type=MedAscii; } catch(MEDMEM::MEDEXCEPTION&) @@ -545,13 +593,13 @@ MESHCollection::MESHCollection(const string& filename, const string& meshname) _family_splitting(false), _create_empty_groups(false) { - char filenamechar[256]; - char meshnamechar[256]; - strcpy(filenamechar,filename.c_str()); - strcpy(meshnamechar,meshname.c_str()); + //char filenamechar[256]; + //char meshnamechar[256]; + // strcpy(filenamechar,filename.c_str()); + //strcpy(meshnamechar,meshname.c_str()); try // avoid memory leak in case of inexistent filename { - retrieveDriver()->readSeq (filenamechar,meshnamechar); + retrieveDriver()->readSeq (filename.c_str(),meshname.c_str()); } catch ( MED_EXCEPTION& e ) { @@ -596,9 +644,9 @@ void MESHCollection::write(const string& filename) if (_driver!=0)delete _driver; _driver=0; - char filenamechar[256]; - strcpy(filenamechar,filename.c_str()); - retrieveDriver()->write (filenamechar, _domain_selector); + //char filenamechar[256]; + // strcpy(filenamechar,filename.c_str()); + retrieveDriver()->write (filename.c_str(), _domain_selector); } /*! creates or gets the link to the collection driver diff --git a/src/MEDPartitioner/MEDPARTITIONER_MESHCollectionDriver.cxx b/src/MEDPartitioner/MEDPARTITIONER_MESHCollectionDriver.cxx index 7f5aeec42..3d4ff58c8 100644 --- a/src/MEDPartitioner/MEDPARTITIONER_MESHCollectionDriver.cxx +++ b/src/MEDPartitioner/MEDPARTITIONER_MESHCollectionDriver.cxx @@ -38,7 +38,7 @@ extern "C" { #include "med.h" } //MEDPARTITIONER includes -#include "MEDPARTITIONER_ConnectZone.hxx" +//#include "MEDPARTITIONER_ConnectZone.hxx" #include "MEDPARTITIONER_Topology.hxx" #include "MEDPARTITIONER_ParallelTopology.hxx" #include "MEDPARTITIONER_SequentialTopology.hxx" @@ -51,23 +51,23 @@ using namespace MEDPARTITIONER; //template inclusion //#include "MEDPARTITIONER_MESHCollectionDriver.H" -med_geometrie_element typmai[MED_NBR_GEOMETRIE_MAILLE+2] = { MED_POINT1, - MED_SEG2, - MED_SEG3, - MED_TRIA3, - MED_TRIA6, - MED_QUAD4, - MED_QUAD8, - MED_TETRA4, - MED_TETRA10, - MED_HEXA8, - MED_HEXA20, - MED_PENTA6, - MED_PENTA15, - MED_PYRA5, - MED_PYRA13, - MED_POLYGONE, - MED_POLYEDRE }; +// med_geometrie_element typmai[MED_NBR_GEOMETRIE_MAILLE+2] = { MED_POINT1, +// MED_SEG2, +// MED_SEG3, +// MED_TRIA3, +// MED_TRIA6, +// MED_QUAD4, +// MED_QUAD8, +// MED_TETRA4, +// MED_TETRA10, +// MED_HEXA8, +// MED_HEXA20, +// MED_PENTA6, +// MED_PENTA15, +// MED_PYRA5, +// MED_PYRA13, +// MED_POLYGONE, +// MED_POLYEDRE }; MESHCollectionDriver::MESHCollectionDriver(MESHCollection* collection):_collection(collection) { @@ -79,7 +79,7 @@ MESHCollectionDriver::MESHCollectionDriver(MESHCollection* collection):_collecti *\param filename binary file *\param meshname mesh name in the MED file * */ -int MESHCollectionDriver::readSeq(char* filename, char* meshname) +int MESHCollectionDriver::readSeq(const char* filename, const char* meshname) { //const char* LOC = "MEDPARTITIONER::MESHCollectionDriver::readSeq()"; // BEGIN_OF_MED(LOC); @@ -147,14 +147,15 @@ void MESHCollectionDriver::readSubdomain(vector& cellglobal, { // const char* LOC = "MEDPARTITIONER::MESHCollectionDriver::readSubdomain()"; // BEGIN_OF_MED(LOC); - char file[256]; - char meshname[MED_TAILLE_NOM+1]; - - strcpy(meshname,_meshname[idomain].c_str()); - strcpy(file,_filename[idomain].c_str()); +// char file[256]; + //char meshname[MED_TAILLE_NOM+1]; + string meshname=_meshname[idomain]; + string file=_filename[idomain]; + //strcpy(meshname,_meshname[idomain].c_str()); + //strcpy(file,_filename[idomain].c_str()); cout << "Reading "<<_meshname[idomain]<<" in "<<_filename[idomain]<getMesh())[idomain]=new MEDMEM::MESH(MEDMEM::MED_DRIVER,file, meshname); - ParaMEDMEM::MEDFileUMesh* mfm=ParaMEDMEM::MEDFileUMesh::New(file,meshname); + ParaMEDMEM::MEDFileUMesh* mfm=ParaMEDMEM::MEDFileUMesh::New(file.c_str(),meshname.c_str()); (_collection->getMesh())[idomain]=mfm->getLevel0Mesh(false); (_collection->getFaceMesh())[idomain]=mfm->getLevelM1Mesh(false); @@ -172,68 +173,68 @@ void MESHCollectionDriver::readSubdomain(vector& cellglobal, cout <<"End of Read"<setName(string(name)); - cz->setDescription(joint_description); - cz->setLocalDomainNumber(idomain); - cz->setDistantDomainNumber(distant); - cz->setLocalMesh((_collection->getMesh())[idomain]); - cz->setDistantMesh((_collection->getMesh())[distant]); - cz->setNodeCorresp(node_corresp,ncouples); - (_collection->getCZ()).push_back(cz); - - }//loop on correspom_topology->nbDomain())ndances - }//loop on joints - - // Reading global numbering - // à faire dans MEDLoader - - // MEDCouplingFieldDouble globalcell=MEDLoader::GetGlobalNumbering(file,meshname,0); - - - MEDfermer(fid); + // med_idt fid = MEDouvrir(file,MED_LECTURE); + // med_int njoint = MEDnJoint(fid, meshname); + // for (int ijoint=0; ijointsetName(string(name)); + // cz->setDescription(joint_description); + // cz->setLocalDomainNumber(idomain); + // cz->setDistantDomainNumber(distant); + // cz->setLocalMesh((_collection->getMesh())[idomain]); + // cz->setDistantMesh((_collection->getMesh())[distant]); + // cz->setNodeCorresp(node_corresp,ncouples); + // (_collection->getCZ()).push_back(cz); + + // }//loop on correspom_topology->nbDomain())ndances + // }//loop on joints + + // // Reading global numbering + // // à faire dans MEDLoader + + // // MEDCouplingFieldDouble globalcell=MEDLoader::GetGlobalNumbering(file,meshname,0); + + + // MEDfermer(fid); // END_OF_MED(LOC); } -void MESHCollectionDriver::writeSubdomain(int idomain, int nbdomains, char* distfilename, +void MESHCollectionDriver::writeSubdomain(int idomain, int nbdomains, const char* distfilename, ParaDomainSelector* domain_selector) { //build connect zones @@ -244,73 +245,73 @@ void MESHCollectionDriver::writeSubdomain(int idomain, int nbdomains, char* dist //writing connect zones in joints - med_idt fid = MEDouvrir(distfilename,MED_LECTURE_ECRITURE); - - int index_joint=0; - - - for (int icz=0; icz<(_collection->getCZ()).size(); icz++) - { - if ((_collection->getCZ())[icz]->getLocalDomainNumber()==idomain) - { - med_err error; - int idistant=(_collection->getCZ())[icz]->getDistantDomainNumber(); - char joint_name[MED_TAILLE_NOM+1]; - sprintf(joint_name,"joint_%i",idistant+1); - char desc[MED_TAILLE_DESC+1]; - sprintf(desc,"connect_zone_%d",icz+1); - - char distant_name[MED_TAILLE_NOM+1]; - //sprintf(distant_name,"domain_%i",(_collection->getCZ())[icz]->getDistantDomainNumber()); - - // sprintf(distant_name,(_collection->getMesh())[idistant]->getName().c_str()); - sprintf(distant_name,"domain_%i",idistant); - char mesh_name[MED_TAILLE_NOM+1]; - - strcpy (mesh_name, (_collection->getMesh())[idomain]->getName()); - // SCRUTE_MED((_collection->getMesh())[idomain]->getName()); - error = MEDjointCr(fid,mesh_name, joint_name, desc, - idistant, distant_name); - if (error==-1) cout << "erreur creation de joint "<getCZ())[icz]->getNodeNumber(); - int* node_corresp=const_cast((_collection->getCZ())[icz]->getNodeCorrespValue()); - - /* Nodes are reordered so that the ordering on the local and the distant domain - correspond. The chosen order is the natural ordering on the domain - with lowest proc id*/ - // if (_collection->getSubdomainBoundaryCreates()) -// if (idomaingetSubdomainBoundaryCreates()) -// { -// MED_EN::medEntityMesh constituent_entity = -// (_collection->getMeshDimension()==3)?MED_EN::MED_FACE:MED_EN::MED_EDGE; -// writeElementJoint(constituent_entity, icz, idomain, idistant, mesh_name,joint_name,fid); -// } - index_joint++; - } - } + // med_idt fid = MEDouvrir(distfilename,MED_LECTURE_ECRITURE); + +// int index_joint=0; + + +// for (int icz=0; icz<(_collection->getCZ()).size(); icz++) +// { +// if ((_collection->getCZ())[icz]->getLocalDomainNumber()==idomain) +// { +// med_err error; +// int idistant=(_collection->getCZ())[icz]->getDistantDomainNumber(); +// char joint_name[MED_TAILLE_NOM+1]; +// sprintf(joint_name,"joint_%i",idistant+1); +// char desc[MED_TAILLE_DESC+1]; +// sprintf(desc,"connect_zone_%d",icz+1); + +// char distant_name[MED_TAILLE_NOM+1]; +// //sprintf(distant_name,"domain_%i",(_collection->getCZ())[icz]->getDistantDomainNumber()); + +// // sprintf(distant_name,(_collection->getMesh())[idistant]->getName().c_str()); +// sprintf(distant_name,"domain_%i",idistant); +// char mesh_name[MED_TAILLE_NOM+1]; + +// strcpy (mesh_name, (_collection->getMesh())[idomain]->getName()); +// // SCRUTE_MED((_collection->getMesh())[idomain]->getName()); +// error = MEDjointCr(fid,mesh_name, joint_name, desc, +// idistant, distant_name); +// if (error==-1) cout << "erreur creation de joint "<getCZ())[icz]->getNodeNumber(); +// int* node_corresp=const_cast((_collection->getCZ())[icz]->getNodeCorrespValue()); + +// /* Nodes are reordered so that the ordering on the local and the distant domain +// correspond. The chosen order is the natural ordering on the domain +// with lowest proc id*/ +// // if (_collection->getSubdomainBoundaryCreates()) +// // if (idomaingetSubdomainBoundaryCreates()) +// // { +// // MED_EN::medEntityMesh constituent_entity = +// // (_collection->getMeshDimension()==3)?MED_EN::MED_FACE:MED_EN::MED_EDGE; +// // writeElementJoint(constituent_entity, icz, idomain, idistant, mesh_name,joint_name,fid); +// // } +// index_joint++; +// } +// } - char meshchar[MED_TAILLE_NOM+1]; - strcpy(meshchar,(_collection->getMesh())[idomain]->getName()); +// char meshchar[MED_TAILLE_NOM+1]; +// strcpy(meshchar,(_collection->getMesh())[idomain]->getName()); - MEDfermer(fid); +// MEDfermer(fid); std::cout<<"End of writing"< *>& filenames, char* fieldname, // int itnumber, int ordernumber) =0; // virtual void readFields (vector *>& filenames, char* fieldname, @@ -59,7 +59,7 @@ namespace MEDPARTITIONER void readSubdomain(vector& cellglobal, vector& faceglobal, vector& nodeglobal, int idomain); - void writeSubdomain(int idomain,int nbdomain, char*filename, + void writeSubdomain(int idomain,int nbdomain, const char*filename, ParaDomainSelector* domain_selector); // void writeElementJoint(medEntityMesh entity , diff --git a/src/MEDPartitioner/MEDPARTITIONER_MESHCollectionMedAsciiDriver.hxx b/src/MEDPartitioner/MEDPARTITIONER_MESHCollectionMedAsciiDriver.hxx index ba45f22c9..6f1be7136 100644 --- a/src/MEDPartitioner/MEDPARTITIONER_MESHCollectionMedAsciiDriver.hxx +++ b/src/MEDPartitioner/MEDPARTITIONER_MESHCollectionMedAsciiDriver.hxx @@ -32,9 +32,9 @@ namespace MEDPARTITIONER MESHCollectionMedAsciiDriver(MESHCollection*); virtual ~MESHCollectionMedAsciiDriver(){} - int read(char*, ParaDomainSelector* sel=0); + int read(const char*, ParaDomainSelector* sel=0); - void write(char*, ParaDomainSelector* sel=0); + void write(const char*, ParaDomainSelector* sel=0); // void readFields(vector *>& filenames, char* fieldname, // int itnumber, int ordernumber) diff --git a/src/MEDPartitioner/MEDPARTITIONER_MESHCollectionMedXMLDriver.H b/src/MEDPartitioner/MEDPARTITIONER_MESHCollectionMedXMLDriver.H index 5d8710b67..54b9c18d5 100644 --- a/src/MEDPartitioner/MEDPARTITIONER_MESHCollectionMedXMLDriver.H +++ b/src/MEDPartitioner/MEDPARTITIONER_MESHCollectionMedXMLDriver.H @@ -54,7 +54,7 @@ void MESHCollectionMedXMLDriver::_readFields(vector* >& fields, * \param fieldname name of the field * */ template -void MESHCollectionMedXMLDriver::_writeFields(vector* >& fields,char* fieldname) +void MESHCollectionMedXMLDriver::_writeFields(vector* >& fields,const char* fieldname) { xmlDocPtr master_doc=xmlParseFile(_master_filename.c_str()); diff --git a/src/MEDPartitioner/MEDPARTITIONER_MESHCollectionMedXMLDriver.hxx b/src/MEDPartitioner/MEDPARTITIONER_MESHCollectionMedXMLDriver.hxx index a36b5623f..8a946b60c 100644 --- a/src/MEDPartitioner/MEDPARTITIONER_MESHCollectionMedXMLDriver.hxx +++ b/src/MEDPartitioner/MEDPARTITIONER_MESHCollectionMedXMLDriver.hxx @@ -33,9 +33,9 @@ namespace MEDPARTITIONER virtual ~MESHCollectionMedXMLDriver(){} - int read(char*, ParaDomainSelector* sel=0); + int read(const char*, ParaDomainSelector* sel=0); - void write(char*, ParaDomainSelector* sel=0); + void write(const char*, ParaDomainSelector* sel=0); // void readFields(vector *>& filenames, char* fieldname, // int itnumber, int ordernumber) diff --git a/src/MEDPartitioner/MEDPARTITIONER_METISGraph.cxx b/src/MEDPartitioner/MEDPARTITIONER_METISGraph.cxx index c7587119d..cbe393617 100644 --- a/src/MEDPartitioner/MEDPARTITIONER_METISGraph.cxx +++ b/src/MEDPartitioner/MEDPARTITIONER_METISGraph.cxx @@ -81,6 +81,14 @@ void METISGraph::partGraph(int ndomain, cout<<"vtxdist[1]"<<" "< #include @@ -654,9 +654,10 @@ void ParaDomainSelector::sendMesh(const ParaMEDMEM::MEDCouplingUMesh& mesh, int // ------------------------------ vector tinyInfoLocal; vector tinyInfoLocalS; + vector tinyInfoLocalD; //Getting tiny info of local mesh to allow the distant proc to initialize and allocate //the transmitted mesh. - mesh.getTinySerializationInformation(tinyInfoLocal,tinyInfoLocalS); + mesh.getTinySerializationInformation(tinyInfoLocalD,tinyInfoLocal,tinyInfoLocalS); tinyInfoLocal.push_back(mesh.getNumberOfCells()); #ifdef HAVE_MPI2 int tinySize=tinyInfoLocal.size(); @@ -702,6 +703,7 @@ void ParaDomainSelector::recvMesh(ParaMEDMEM::MEDCouplingUMesh*& mesh, int sourc // ------------------------------ vector tinyInfoDistant; vector tinyInfoLocalS; + vector tinyInfoDistantD(1); //Getting tiny info of local mesh to allow the distant proc to initialize and allocate //the transmitted mesh. #ifdef HAVE_MPI2 @@ -749,7 +751,7 @@ void ParaDomainSelector::recvMesh(ParaMEDMEM::MEDCouplingUMesh*& mesh, int sourc // //mesh=dynamic_cast (distant_mesh_tmp); //finish unserialization - mesh->unserialization(tinyInfoDistant,v1Distant,v2Distant,unusedTinyDistantSts); + mesh->unserialization(tinyInfoDistantD,tinyInfoDistant,v1Distant,v2Distant,unusedTinyDistantSts); std::cout<<"mesh size on recv"<getNumberOfCells()< extern "C" { #define restrict -#include "bin/scotch.h" +#include "scotch.h" } #include "MEDPARTITIONER_Graph.hxx" #include "MEDPARTITIONER_SCOTCHGraph.hxx" diff --git a/src/MEDPartitioner/Makefile.am b/src/MEDPartitioner/Makefile.am index 44bb7573e..a919d6230 100644 --- a/src/MEDPartitioner/Makefile.am +++ b/src/MEDPartitioner/Makefile.am @@ -31,14 +31,12 @@ lib_LTLIBRARIES= libmedsplitter.la salomeinclude_HEADERS= \ MEDPARTITIONER_Topology.hxx \ MEDPARTITIONER_MESHCollection.hxx \ -MEDPARTITIONER_MESHCollectionDriver.H \ MEDPARTITIONER_MESHCollectionMedXMLDriver.H \ MEDPARTITIONER_MESHCollectionMedAsciiDriver.H \ MEDPARTITIONER_MESHCollectionDriver.hxx \ MEDPARTITIONER_MESHCollectionMedXMLDriver.hxx \ MEDPARTITIONER_MESHCollectionMedAsciiDriver.hxx \ MEDPARTITIONER_ParallelTopology.hxx \ -MEDPARTITIONER_FaceModel.hxx \ MEDPARTITIONER_JointFinder.hxx \ MEDPARTITIONER_Graph.hxx\ MEDPARTITIONER_UserGraph.hxx\ @@ -65,7 +63,6 @@ MEDPARTITIONER_ParallelTopology.cxx \ MEDPARTITIONER_Graph.cxx\ MEDPARTITIONER_UserGraph.cxx\ MEDPARTITIONER_ParaDomainSelector.cxx \ -MEDPARTITIONER_JointExchangeData.cxx \ MEDPARTITIONER_JointFinder.cxx \ MEDPARTITIONER_SkyLineArray.cxx \ MEDPARTITIONER_ConnectZone.cxx