From: ageay Date: Thu, 23 May 2013 08:13:38 +0000 (+0000) Subject: Name of DataArray update X-Git-Tag: V6_main_FINAL~68 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=0c321c12604d74a80ed6388198dab772af4902e2;p=tools%2Fmedcoupling.git Name of DataArray update --- diff --git a/src/MEDLoader/MEDFileField.cxx b/src/MEDLoader/MEDFileField.cxx index 10000ae1c..4c9b34edb 100644 --- a/src/MEDLoader/MEDFileField.cxx +++ b/src/MEDLoader/MEDFileField.cxx @@ -4243,7 +4243,9 @@ DataArray *MEDFileAnyTypeField1TSWithoutSDA::getFieldWithProfile(TypeOfField typ { MEDCouplingAutoRefCountObjectPtr m=mesh->getGenMeshAtLevel(meshDimRelToMax); int meshId=getMeshIdFromMeshName(mesh->getName()); - return _field_per_mesh[meshId]->getFieldOnMeshAtLevelWithPfl(type,m,pfl,glob,nasc); + MEDCouplingAutoRefCountObjectPtr ret=_field_per_mesh[meshId]->getFieldOnMeshAtLevelWithPfl(type,m,pfl,glob,nasc); + ret->setName(nasc.getName().c_str()); + return ret.retn(); } //= MEDFileField1TSWithoutSDA diff --git a/src/MEDLoader/Swig/MEDLoaderTest3.py b/src/MEDLoader/Swig/MEDLoaderTest3.py index ee58dc265..6e79bae7d 100644 --- a/src/MEDLoader/Swig/MEDLoaderTest3.py +++ b/src/MEDLoader/Swig/MEDLoaderTest3.py @@ -2465,7 +2465,7 @@ class MEDLoaderTest(unittest.TestCase): nf2.setTime(19.,20,-11) nf2.setMesh(f1.getMesh()) narr2=DataArrayInt(8,2) ; narr.setInfoOnComponents(["aapfl [u1]","bbbvvpfl [ppp]"]) ; narr2[:,0]=range(8) ; narr2[:,0]+=10 ; narr2[:,1]=3*narr2[:,0] - nf2.setName("VectorFieldOnNodesPfl") + nf2.setName("VectorFieldOnNodesPfl") ; narr2.setName(nf2.getName()) nff2=MEDFileIntField1TS.New() npfl=DataArrayInt([1,2,4,5,6,7,10,11]) ; npfl.setName("npfl") nff2.setFieldProfile(nf2,narr2,mm1,0,npfl)