From 788582de113333623751f24077154738e1cfc595 Mon Sep 17 00:00:00 2001 From: imn Date: Tue, 26 May 2015 21:35:20 +0300 Subject: [PATCH] 0022875: debug --- .../MEDPARTITIONER_MEDPartitioner.cxx | 16 ++++++++-------- .../MEDPARTITIONER_MeshCollection.cxx | 2 +- .../MEDPARTITIONER_MeshCollectionDriver.cxx | 2 +- ...MEDPARTITIONER_MeshCollectionMedXmlDriver.cxx | 4 ++++ 4 files changed, 14 insertions(+), 10 deletions(-) diff --git a/src/MEDPartitioner/MEDPARTITIONER_MEDPartitioner.cxx b/src/MEDPartitioner/MEDPARTITIONER_MEDPartitioner.cxx index 5054c42c0..ec1db5778 100644 --- a/src/MEDPartitioner/MEDPARTITIONER_MEDPartitioner.cxx +++ b/src/MEDPartitioner/MEDPARTITIONER_MEDPartitioner.cxx @@ -45,10 +45,10 @@ MEDPARTITIONER::MEDPartitioner *MEDPARTITIONER::MEDPartitioner::New(const ParaME MEDPARTITIONER::MEDPartitioner::MEDPartitioner(const std::string& filename, int ndomains, const std::string& library,bool creates_boundary_faces, bool create_joints, bool mesure_memory): _input_collection( 0 ), _output_collection( 0 ), _new_topology( 0 ) { - MyGlobals::_World_Size=1; - MyGlobals::_Rank=0; - MyGlobals::_Creates_Boundary_Faces=0; - MyGlobals::_Create_Joints=0; + MyGlobals::_World_Size = 1; + MyGlobals::_Rank = 0; + MyGlobals::_Creates_Boundary_Faces = creates_boundary_faces; + MyGlobals::_Create_Joints = create_joints; ParaDomainSelector parallelizer(mesure_memory); _input_collection=new MeshCollection(filename,parallelizer); @@ -66,10 +66,10 @@ MEDPARTITIONER::MEDPartitioner::MEDPartitioner(const std::string& filename, int MEDPARTITIONER::MEDPartitioner::MEDPartitioner(const ParaMEDMEM::MEDFileData* filedata, int ndomains, const std::string& library,bool creates_boundary_faces, bool create_joints, bool mesure_memory): _input_collection( 0 ), _output_collection( 0 ), _new_topology( 0 ) { - MyGlobals::_World_Size=1; - MyGlobals::_Rank=0; - MyGlobals::_Creates_Boundary_Faces=0; - MyGlobals::_Create_Joints=0; + MyGlobals::_World_Size = 1; + MyGlobals::_Rank = 0; + MyGlobals::_Creates_Boundary_Faces = creates_boundary_faces; + MyGlobals::_Create_Joints = create_joints; ParaDomainSelector parallelizer(mesure_memory); _input_collection=new MeshCollection(); diff --git a/src/MEDPartitioner/MEDPARTITIONER_MeshCollection.cxx b/src/MEDPartitioner/MEDPARTITIONER_MeshCollection.cxx index b35661505..f2e685e7a 100644 --- a/src/MEDPartitioner/MEDPARTITIONER_MeshCollection.cxx +++ b/src/MEDPartitioner/MEDPARTITIONER_MeshCollection.cxx @@ -1015,7 +1015,7 @@ void MEDPARTITIONER::MeshCollection::buildConnectZones( const NodeMapping& nodeM if ( !MyGlobals::_Create_Joints || _topology->nbDomain() < 2 ) return; - if ( isParallelMode() ) + if ( MyGlobals::_World_Size > 1 ) { _topology->getCZ().clear(); return; // not implemented for parallel mode diff --git a/src/MEDPartitioner/MEDPARTITIONER_MeshCollectionDriver.cxx b/src/MEDPartitioner/MEDPARTITIONER_MeshCollectionDriver.cxx index 2c935623c..375b5ed7d 100644 --- a/src/MEDPartitioner/MEDPARTITIONER_MeshCollectionDriver.cxx +++ b/src/MEDPartitioner/MEDPARTITIONER_MeshCollectionDriver.cxx @@ -216,7 +216,7 @@ ParaMEDMEM::MEDFileMesh* MeshCollectionDriver::getMesh(int idomain) const finalMeshName=ExtractFromDescription(MyGlobals::_General_Informations[0], "finalMeshName="); } } - else + if (finalMeshName.empty()) { finalMeshName=(_collection->getMesh())[idomain]->getName(); } diff --git a/src/MEDPartitioner/MEDPARTITIONER_MeshCollectionMedXmlDriver.cxx b/src/MEDPartitioner/MEDPARTITIONER_MeshCollectionMedXmlDriver.cxx index d88948708..32e0dbf0a 100644 --- a/src/MEDPartitioner/MEDPARTITIONER_MeshCollectionMedXmlDriver.cxx +++ b/src/MEDPartitioner/MEDPARTITIONER_MeshCollectionMedXmlDriver.cxx @@ -254,6 +254,10 @@ void MeshCollectionMedXmlDriver::write(const char* filename, ParaDomainSelector* finalMeshName=ExtractFromDescription(MyGlobals::_General_Informations[0], "finalMeshName="); } } + if (finalMeshName.empty()) + { + finalMeshName=_collection->getName(); + } for (int idomain=nbdomains-1; idomain>=0;idomain--) { std::string distfilename; -- 2.39.2