From: abn Date: Wed, 16 Sep 2015 15:00:45 +0000 (+0200) Subject: buildInnerBoundaryAlongM1Group(): family ID creation was buggy. X-Git-Tag: V7_7_0b1~1^2 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=0408fb771e9b2d93672c80d3fe7b1ec715eddf38;p=tools%2Fmedcoupling.git buildInnerBoundaryAlongM1Group(): family ID creation was buggy. --- diff --git a/src/MEDLoader/MEDFileMesh.cxx b/src/MEDLoader/MEDFileMesh.cxx index b77e3416d..d94dda94b 100644 --- a/src/MEDLoader/MEDFileMesh.cxx +++ b/src/MEDLoader/MEDFileMesh.cxx @@ -3650,7 +3650,13 @@ void MEDFileUMesh::buildInnerBoundaryAlongM1Group(const std::string& grpNameM1, throw INTERP_KERNEL::Exception("MEDFileUMesh::buildInnerBoundaryAlongM1Group : internal problem !"); MEDCouplingAutoRefCountObjectPtr newFam=DataArrayInt::New(); newFam->alloc(newm1->getNumberOfCells(),1); - int idd=getMaxFamilyId()+1; + // Get a new family ID: care must be taken if we need a positive ID or a negative one: + // Positive ID for family of nodes, negative for all the rest. + int idd; + if (m1->getMeshDimension() == 0) + idd=getMaxFamilyId()+1; + else + idd=getMinFamilyId()-1; int globStart=0,start=0,end,globEnd; int nbOfChunks=szOfCellGrpOfSameType->getNumberOfTuples(); for(int i=0;i