X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=src%2FPlugins%2FMEDReader%2FIO%2FMEDFileFieldRepresentationTree.cxx;h=dbae71be8cc5026703b4fe773bb9c65a786a6a40;hb=e54758a2008aa21844f649b1379360bf1a1ee61c;hp=7367368faba520ac21bf3e3678ccfb36c69e4c34;hpb=88fa99f207bdea2f62e4ecef7421a8c6e00b3ccf;p=modules%2Fparavis.git diff --git a/src/Plugins/MEDReader/IO/MEDFileFieldRepresentationTree.cxx b/src/Plugins/MEDReader/IO/MEDFileFieldRepresentationTree.cxx index 7367368f..dbae71be 100644 --- a/src/Plugins/MEDReader/IO/MEDFileFieldRepresentationTree.cxx +++ b/src/Plugins/MEDReader/IO/MEDFileFieldRepresentationTree.cxx @@ -1,4 +1,4 @@ -// Copyright (C) 2010-2015 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 @@ -42,6 +42,7 @@ #include "vtkInformationQuadratureSchemeDefinitionVectorKey.h" #include "vtkInformationIntegerKey.h" #include "vtkInformation.h" +#include "vtkDataArrayTemplate.h" #include "vtkIdTypeArray.h" #include "vtkDoubleArray.h" #include "vtkIntArray.h" @@ -175,6 +176,7 @@ vtkIdTypeArray *ELGACmp::createNew(const ParaMEDMEM::MEDFileFieldGlobsReal *glob _loc_names=locNames; _elgas=elgas; _defs.push_back(defs); + return elga; } void ELGACmp::appendELGAIfAny(vtkDataSet *ds) const @@ -1147,6 +1149,7 @@ void MEDFileFieldRepresentationTree::loadMainStructureOfFile(const char *fileNam { AppendFieldFromMeshes(_ms,_fields); } + _ms->cartesianizeMe(); _fields->removeFieldsWithoutAnyTimeStep(); std::vector meshNames(_ms->getMeshesNames()); std::vector< MEDCouplingAutoRefCountObjectPtr > fields_per_mesh(meshNames.size()); @@ -1439,7 +1442,7 @@ void MEDFileFieldRepresentationTree::AppendFieldFromMeshes(const ParaMEDMEM::MED std::vector levsExt(mm->getNonEmptyLevelsExt()); if(levsExt.size()==levs.size()+1) { - ParaMEDMEM::MEDCouplingAutoRefCountObjectPtr m(mm->getGenMeshAtLevel(1)); + ParaMEDMEM::MEDCouplingAutoRefCountObjectPtr m(mm->getMeshAtLevel(1)); ParaMEDMEM::MEDCouplingAutoRefCountObjectPtr f(ParaMEDMEM::MEDCouplingFieldDouble::New(ParaMEDMEM::ON_NODES)); f->setMesh(m); ParaMEDMEM::MEDCouplingAutoRefCountObjectPtr arr(ParaMEDMEM::DataArrayDouble::New()); arr->alloc(m->getNumberOfNodes()); @@ -1454,7 +1457,7 @@ void MEDFileFieldRepresentationTree::AppendFieldFromMeshes(const ParaMEDMEM::MED } else { - ParaMEDMEM::MEDCouplingAutoRefCountObjectPtr m(mm->getGenMeshAtLevel(0)); + ParaMEDMEM::MEDCouplingAutoRefCountObjectPtr m(mm->getMeshAtLevel(0)); ParaMEDMEM::MEDCouplingAutoRefCountObjectPtr f(ParaMEDMEM::MEDCouplingFieldDouble::New(ParaMEDMEM::ON_CELLS)); f->setMesh(m); ParaMEDMEM::MEDCouplingAutoRefCountObjectPtr arr(ParaMEDMEM::DataArrayDouble::New()); arr->alloc(f->getNumberOfTuplesExpected());