From 6c1258ff5434c3f6da62a9cf98397379ecf2f0c1 Mon Sep 17 00:00:00 2001 From: eap Date: Mon, 17 Oct 2011 15:54:26 +0000 Subject: [PATCH] 0021314: [CEA 490] Driver GIBI with medloader / medcoupling "transform" only one group including all cells into a mesh --- src/MEDLoader/SauvMedConvertor.cxx | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) 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() ) { -- 2.39.2