]> SALOME platform Git repositories - tools/medcoupling.git/commitdiff
Salome HOME
[EDF24514] : GlobalNodeIds array was missing whereas a Global node array is present...
authorAnthony Geay <anthony.geay@edf.fr>
Mon, 20 Dec 2021 07:40:48 +0000 (08:40 +0100)
committerAnthony Geay <anthony.geay@edf.fr>
Mon, 20 Dec 2021 07:40:48 +0000 (08:40 +0100)
src/MEDLoader/MEDFileFieldOverView.cxx

index 11c411960cf0ce9a642446d9cee853d39d3b6d79..34f8ff40d93d30c980a70820fc7b66b2fa834a3f 100644 (file)
@@ -398,14 +398,19 @@ DataArrayIdType *MEDMeshMultiLev::retrieveGlobalNodeIdsIfAny() const
 {
   const MEDFileUMesh *umesh(dynamic_cast<const MEDFileUMesh *>(_mesh));
   if(!umesh)
-    return 0;
+    return nullptr;
   const PartDefinition *pd(umesh->getPartDefAtLevel(1));
   if(!pd)
-    return 0;
+  {
+    MCAuto<DataArrayIdType> gni = umesh->getGlobalNumFieldAtLevel(1);
+    if(gni.isNull())
+      return nullptr;
+    return gni->deepCopy();
+  }
   MCAuto<DataArrayIdType> tmp(pd->toDAI());
   const DataArrayIdType *tmpCpp(tmp);
   if(!tmpCpp)
-    return 0;
+    return nullptr;
   //
   const DataArrayIdType *nr(_node_reduction);
   if(nr)