X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=src%2FPlugins%2FMEDReader%2FIO%2FMEDUtilities.cxx;h=22eaf3768bf1291fbf3adfce5bd85b8120b4a4f5;hb=eb9a54c7c13624ca227d587e5ae33fcdba29e40f;hp=dd248969909f005bee5723e8fee45bee78fc67ff;hpb=ee690f177c97c5f6093551b09c3cb8ac4a3020d1;p=modules%2Fparavis.git diff --git a/src/Plugins/MEDReader/IO/MEDUtilities.cxx b/src/Plugins/MEDReader/IO/MEDUtilities.cxx index dd248969..22eaf376 100644 --- a/src/Plugins/MEDReader/IO/MEDUtilities.cxx +++ b/src/Plugins/MEDReader/IO/MEDUtilities.cxx @@ -1,4 +1,4 @@ -// Copyright (C) 2010-2014 CEA/DEN, EDF R&D +// Copyright (C) 2010-2016 CEA/DEN, EDF R&D // // This library is free software; you can redistribute it and/or // modify it under the terms of the GNU Lesser General Public @@ -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; + } +}