From: Anthony Geay Date: Tue, 15 Oct 2019 07:09:18 +0000 (+0200) Subject: Labels management of splitter X-Git-Tag: V9_4_0b1~1 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=02a3cbbd9da2e5de320574b7ed541ff75baafca1;p=tools%2Fmedcoupling.git Labels management of splitter --- diff --git a/src/MEDLoader/MEDFileMesh.cxx b/src/MEDLoader/MEDFileMesh.cxx index 8cdf00b68..7a1dfee2b 100644 --- a/src/MEDLoader/MEDFileMesh.cxx +++ b/src/MEDLoader/MEDFileMesh.cxx @@ -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 !"); diff --git a/src/MEDLoader/Swig/MEDLoaderSplitter.py b/src/MEDLoader/Swig/MEDLoaderSplitter.py index a02a98837..d4eab4d5f 100644 --- a/src/MEDLoader/Swig/MEDLoaderSplitter.py +++ b/src/MEDLoader/Swig/MEDLoaderSplitter.py @@ -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