]> SALOME platform Git repositories - tools/medcoupling.git/commitdiff
Salome HOME
Labels management of splitter
authorAnthony Geay <anthony.geay@edf.fr>
Tue, 15 Oct 2019 07:09:18 +0000 (09:09 +0200)
committerAnthony Geay <anthony.geay@edf.fr>
Tue, 15 Oct 2019 07:09:18 +0000 (09:09 +0200)
src/MEDLoader/MEDFileMesh.cxx
src/MEDLoader/Swig/MEDLoaderSplitter.py

index 8cdf00b688f3e4ce13bea4a21d0cc77e96021e8c..7a1dfee2b9322c214337ff2ce814107bca85b7d4 100644 (file)
@@ -5916,7 +5916,7 @@ void MEDFileStructuredMesh::setNameFieldAtLevel(int meshDimRelToMaxExt, DataArra
       {
         int nbCells=mesh->getNumberOfCellsOfSubLevelMesh();
         nameArr->checkNbOfTuplesAndComp(nbCells,MED_SNAME_SIZE,"MEDFileStructuredMesh::setNameFieldAtLevel : Problem in size of names arr ! Mismatch with number of faces of mesh !");
-        _names_cells=nameArr;
+        _names_faces=nameArr;
       }
     default:
       throw INTERP_KERNEL::Exception("MEDFileStructuredMesh::setNameFieldAtLevel : Only available for levels 0 or 1 or -1 !");
index a02a988377d5656353a98d8bdbae537307e66aeb..d4eab4d5feae8f04be5a369d44d7b62a230e5870 100644 (file)
@@ -178,15 +178,20 @@ class MEDLoaderSplitter:
             if 0 in mfm.getFamArrNonEmptyLevelsExt():
                 mlPart.setFamilyFieldArr(0,mfm.getFamilyFieldAtLevel(0)[ids])
                 pass
+            if 0 in mfm.getNameArrNonEmptyLevelsExt():
+                mlPart.setNameFieldAtLevel(0, mfm.getNameFieldAtLevel(0)[ids])
             if 1 in mfm.getFamArrNonEmptyLevelsExt():
                 mlPart.setFamilyFieldArr(1,mfm.getFamilyFieldAtLevel(1)[trad])
                 pass
+            if 1 in mfm.getNameArrNonEmptyLevelsExt():
+                mlPart.setNameFieldAtLevel(1, mfm.getNameFieldAtLevel(1)[trad])
             for k,v in dAddlevs.items():
                 part=v.getCellIdsFullyIncludedInNodeIds(trad)
                 mSubPart=v[part] ; mSubPart.renumberNodesInConn(trado2n) ; mSubPart.setCoords(mPart.getCoords())
                 mlPart[k]=mSubPart
                 mlPart.setFamilyFieldArr(k,mfm.getFamilyFieldAtLevel(k)[part])
-                pass
+                if k in mfm.getNameArrNonEmptyLevelsExt():
+                    mlPart.setNameFieldAtLevel(k, mfm.getNameFieldAtLevel(k)[part])
             mlPart.copyFamGrpMapsFrom(mfm)
             ret.pushMesh(mlPart)
             pass