X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=src%2FPlugins%2FMEDReader%2FIO%2FMEDUtilities.cxx;h=22eaf3768bf1291fbf3adfce5bd85b8120b4a4f5;hb=eb9a54c7c13624ca227d587e5ae33fcdba29e40f;hp=4ace147b4e082b2fa1ee46cdb1bd13b3eb8078cb;hpb=9dbade0021c7a8e21aedcfb28be257886abed924;p=modules%2Fparavis.git diff --git a/src/Plugins/MEDReader/IO/MEDUtilities.cxx b/src/Plugins/MEDReader/IO/MEDUtilities.cxx index 4ace147b..22eaf376 100644 --- a/src/Plugins/MEDReader/IO/MEDUtilities.cxx +++ b/src/Plugins/MEDReader/IO/MEDUtilities.cxx @@ -1,9 +1,9 @@ -// 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 // License as published by the Free Software Foundation; either -// version 2.1 of the License. +// version 2.1 of the License, or (at your option) any later version. // // This library is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of @@ -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; + } +}