]> SALOME platform Git repositories - tools/medcoupling.git/commitdiff
Salome HOME
Name of DataArray update OK_230513
authorageay <ageay>
Thu, 23 May 2013 08:13:38 +0000 (08:13 +0000)
committerageay <ageay>
Thu, 23 May 2013 08:13:38 +0000 (08:13 +0000)
src/MEDLoader/MEDFileField.cxx
src/MEDLoader/Swig/MEDLoaderTest3.py

index 10000ae1cf47209be761627e4c814c72b42b490f..4c9b34edb80acc46e93358135de9ab9ba883d253 100644 (file)
@@ -4243,7 +4243,9 @@ DataArray *MEDFileAnyTypeField1TSWithoutSDA::getFieldWithProfile(TypeOfField typ
 {
   MEDCouplingAutoRefCountObjectPtr<MEDCouplingMesh> m=mesh->getGenMeshAtLevel(meshDimRelToMax);
   int meshId=getMeshIdFromMeshName(mesh->getName());
-  return _field_per_mesh[meshId]->getFieldOnMeshAtLevelWithPfl(type,m,pfl,glob,nasc);
+  MEDCouplingAutoRefCountObjectPtr<DataArray> ret=_field_per_mesh[meshId]->getFieldOnMeshAtLevelWithPfl(type,m,pfl,glob,nasc);
+  ret->setName(nasc.getName().c_str());
+  return ret.retn();
 }
 
 //= MEDFileField1TSWithoutSDA
index ee58dc265f0c4d8d8ce1ce00b45bce83b372e0f7..6e79bae7d569b94447a5f4b1fa7f200ee34c2430 100644 (file)
@@ -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)