X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=src%2FPlugins%2FMEDReader%2FIO%2FMEDUtilities.cxx;h=22eaf3768bf1291fbf3adfce5bd85b8120b4a4f5;hb=eb9a54c7c13624ca227d587e5ae33fcdba29e40f;hp=5eca66c8d3476196f4dd0299c56cf981b220a43d;hpb=0a28fb50781adcd0ac0f1d8d679650582eff1394;p=modules%2Fparavis.git diff --git a/src/Plugins/MEDReader/IO/MEDUtilities.cxx b/src/Plugins/MEDReader/IO/MEDUtilities.cxx index 5eca66c8..22eaf376 100644 --- a/src/Plugins/MEDReader/IO/MEDUtilities.cxx +++ b/src/Plugins/MEDReader/IO/MEDUtilities.cxx @@ -23,5 +23,30 @@ #include "vtkInformationIntegerKey.h" #include "vtkInformationQuadratureSchemeDefinitionVectorKey.h" +#include + vtkInformationKeyMacro(MEDUtilities,ELGA,Integer); vtkInformationKeyMacro(MEDUtilities,ELNO,Integer); + +void ExportedTinyInfo::pushGaussAdditionnalInfo(int ct, int dim, const std::vector& refCoo, const std::vector& posInRefCoo) +{ + prepareForAppend(); + std::vector tmp(1,(double)ct); + tmp.push_back((double)dim); + tmp.insert(tmp.end(),refCoo.begin(),refCoo.end()); + tmp.insert(tmp.end(),posInRefCoo.begin(),posInRefCoo.end()); + _data.push_back((double)tmp.size()); + _data.insert(_data.end(),tmp.begin(),tmp.end()); +} + +void ExportedTinyInfo::prepareForAppend() +{ + if(_data.empty()) + _data.push_back(1.); + else + { + double val(_data[0]); + int val2((int) val); + _data[0]=++val2; + } +}