}
//================================================================================
/*!
- * \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
{
void IntermediateMED::setGroups( ParaMEDMEM::MEDFileUMesh* mesh )
{
+ bool isMeshNameSet = false;
const int meshDim = mesh->getMeshDimension();
for ( int dim = 0; dim <= meshDim; ++dim )
{
*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() )
{