From: eap Date: Mon, 17 Oct 2011 15:54:26 +0000 (+0000) Subject: 0021314: [CEA 490] Driver GIBI with medloader / medcoupling X-Git-Tag: V6_main_FINAL~928 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=6c1258ff5434c3f6da62a9cf98397379ecf2f0c1;p=tools%2Fmedcoupling.git 0021314: [CEA 490] Driver GIBI with medloader / medcoupling "transform" only one group including all cells into a mesh --- diff --git a/src/MEDLoader/SauvMedConvertor.cxx b/src/MEDLoader/SauvMedConvertor.cxx index a42c836cc..19fa3a7ba 100644 --- a/src/MEDLoader/SauvMedConvertor.cxx +++ b/src/MEDLoader/SauvMedConvertor.cxx @@ -210,7 +210,7 @@ namespace } //================================================================================ /*! - * \brief Comparator of cells by number used for ordering cells thinin a med group + * \brief Comparator of cells by number used for ordering cells within a med group */ struct TCellByIDCompare { @@ -1899,6 +1899,7 @@ void IntermediateMED::setConnectivity( ParaMEDMEM::MEDFileUMesh* mesh, void IntermediateMED::setGroups( ParaMEDMEM::MEDFileUMesh* mesh ) { + bool isMeshNameSet = false; const int meshDim = mesh->getMeshDimension(); for ( int dim = 0; dim <= meshDim; ++dim ) { @@ -1955,11 +1956,13 @@ void IntermediateMED::setGroups( ParaMEDMEM::MEDFileUMesh* mesh ) *idsPrt++ = (*cell2orderIt).first->_number - 1; // try to set the mesh name - if ( dim == meshDim && + if ( !isMeshNameSet && + dim == meshDim && !grp._name.empty() && grp.size() == mesh->getSizeAtLevel( meshDimRelToMaxExt )) { mesh->setName( grp._name.c_str() ); + isMeshNameSet = true; } else if ( !grp._name.empty() ) {