From: Anthony Geay Date: Fri, 29 Jan 2016 14:15:09 +0000 (+0100) Subject: GlobalNodeIds in MEDReader in // context. X-Git-Tag: V8_1_0a1~33 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=110bda1b01a0359d69e30d272346cc98bef709f0;p=modules%2Fparavis.git GlobalNodeIds in MEDReader in // context. --- diff --git a/src/Plugins/MEDReader/IO/MEDFileFieldRepresentationTree.cxx b/src/Plugins/MEDReader/IO/MEDFileFieldRepresentationTree.cxx index c065849c..d75937d5 100644 --- a/src/Plugins/MEDReader/IO/MEDFileFieldRepresentationTree.cxx +++ b/src/Plugins/MEDReader/IO/MEDFileFieldRepresentationTree.cxx @@ -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; } diff --git a/src/Plugins/MEDReader/IO/MEDFileFieldRepresentationTree.hxx b/src/Plugins/MEDReader/IO/MEDFileFieldRepresentationTree.hxx index 364a1c2c..9e4303c9 100644 --- a/src/Plugins/MEDReader/IO/MEDFileFieldRepresentationTree.hxx +++ b/src/Plugins/MEDReader/IO/MEDFileFieldRepresentationTree.hxx @@ -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;