]> SALOME platform Git repositories - modules/paravis.git/commitdiff
Salome HOME
GlobalNodeIds in MEDReader in // context.
authorAnthony Geay <anthony.geay@edf.fr>
Fri, 29 Jan 2016 14:15:09 +0000 (15:15 +0100)
committerAnthony Geay <anthony.geay@edf.fr>
Fri, 19 Feb 2016 07:09:47 +0000 (08:09 +0100)
src/Plugins/MEDReader/IO/MEDFileFieldRepresentationTree.cxx
src/Plugins/MEDReader/IO/MEDFileFieldRepresentationTree.hxx

index c065849c2b62e63291276ea29b20d4fde0bf6932..d75937d5966416abe751a19d5962ed564898a8ed 100644 (file)
@@ -68,6 +68,8 @@ const char MEDFileFieldRepresentationLeavesArrays::FAMILY_ID_NODE_NAME[]="Family
 
 const char MEDFileFieldRepresentationLeavesArrays::NUM_ID_NODE_NAME[]="NumIdNode";
 
+const char MEDFileFieldRepresentationLeavesArrays::GLOBAL_NODE_ID_NAME[]="GlobalNodeIds";// WARNING DO NOT CHANGE IT BEFORE HAVING CHECKED IN PV SOURCES !
+
 const char MEDFileFieldRepresentationTree::ROOT_OF_GRPS_IN_TREE[]="zeGrps";
 
 const char MEDFileFieldRepresentationTree::ROOT_OF_FAM_IDS_IN_TREE[]="zeFamIds";
@@ -879,6 +881,17 @@ vtkDataSet *MEDFileFieldRepresentationLeaves::buildVTKInstanceNoTimeInterpolatio
       vtkTab->Delete();
       numNodes->decrRef();
     }
+  // Global Node Ids if any ! (In // mode)
+  DataArrayInt *gni(ptMML2->retrieveGlobalNodeIdsIfAny());
+  if(gni)
+    {
+      vtkIntArray *vtkTab(vtkIntArray::New());
+      vtkTab->SetNumberOfComponents(1);
+      vtkTab->SetName(MEDFileFieldRepresentationLeavesArrays::GLOBAL_NODE_ID_NAME);
+      vtkTab->SetArray(gni->getPointer(),gni->getNbOfElems(),0,VTK_DATA_ARRAY_FREE);
+      gni->accessToMemArray().setSpecificDeallocator(0);
+      gni->decrRef();
+    }
   return ret;
 }
 
index 364a1c2c067a38c25f001aa0c86b46bd99095d75..9e4303c93b630ecad12591ed9c15d556b601a130 100644 (file)
@@ -85,6 +85,7 @@ public:
   static const char NUM_ID_CELL_NAME[];
   static const char FAMILY_ID_NODE_NAME[];
   static const char NUM_ID_NODE_NAME[];
+  static const char GLOBAL_NODE_ID_NAME[];
 private:
   mutable bool _activated;
   mutable int _id;