From: karadaniz Date: Mon, 25 Mar 2024 15:16:09 +0000 (+0100) Subject: [spns_40523]: extract only unique family names before using them in to iterate over... X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=f0a70ddcec0f988ff9b751caaa4eba8593d39a2c;p=tools%2Fmedcoupling.git [spns_40523]: extract only unique family names before using them in to iterate over cells --- diff --git a/src/MEDLoader/MeshFormatWriter.cxx b/src/MEDLoader/MeshFormatWriter.cxx index 447b84a22..a7c679d52 100644 --- a/src/MEDLoader/MeshFormatWriter.cxx +++ b/src/MEDLoader/MeshFormatWriter.cxx @@ -867,7 +867,8 @@ void MeshFormatWriter::linkFamilyToCells() int meshDimRelToMax = levs[iDim]; MEDCoupling::MCAuto< MEDCoupling::MEDCouplingMesh > mesh = _mesh->getMeshAtLevel( meshDimRelToMax); MEDCoupling::MCAuto< MEDCoupling::MEDCouplingUMesh > umesh0 = mesh->buildUnstructured(); - const MEDCoupling::DataArrayIdType * famIds = _mesh->getFamilyFieldAtLevel(meshDimRelToMax); + const MEDCoupling::DataArrayIdType * famIdsField = _mesh->getFamilyFieldAtLevel(meshDimRelToMax); + const MEDCoupling::DataArrayIdType * famIds = famIdsField->getDifferentValues(); const MEDCoupling::mcIdType * famID = famIds->begin(), *famIDEnd = famIds->end(); for (; famID < famIDEnd; ++famID) {