]> SALOME platform Git repositories - tools/medcoupling.git/commitdiff
Salome HOME
[spns_40523]: extract only unique family names before using them in to iterate over...
authorkaradaniz <karadaniz@phimeca.com>
Mon, 25 Mar 2024 15:16:09 +0000 (16:16 +0100)
committerkaradaniz <karadaniz@phimeca.com>
Mon, 25 Mar 2024 15:16:09 +0000 (16:16 +0100)
src/MEDLoader/MeshFormatWriter.cxx

index 447b84a227e223294ccf0467c61221f7de661cee..a7c679d529e0901ddc7b938017c1f92988cf46df 100644 (file)
@@ -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)
         {