From b8bbac889d64c72df050433bcd6c863d6bd2a6dd Mon Sep 17 00:00:00 2001 From: Anthony Geay Date: Tue, 24 Jan 2017 17:40:24 +0100 Subject: [PATCH] OK structure elements are done --- .../IO/MEDFileFieldRepresentationTree.cxx | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) diff --git a/src/Plugins/MEDReader/IO/MEDFileFieldRepresentationTree.cxx b/src/Plugins/MEDReader/IO/MEDFileFieldRepresentationTree.cxx index 540464ce..4e9abe86 100644 --- a/src/Plugins/MEDReader/IO/MEDFileFieldRepresentationTree.cxx +++ b/src/Plugins/MEDReader/IO/MEDFileFieldRepresentationTree.cxx @@ -25,6 +25,7 @@ #include "MEDCouplingFieldDiscretization.hxx" #include "MEDCouplingFieldDouble.hxx" #include "InterpKernelGaussCoords.hxx" +#include "MEDFileBlowStrEltUp.hxx" #include "MEDFileData.hxx" #include "SauvReader.hxx" @@ -1234,8 +1235,23 @@ void MEDFileFieldRepresentationTree::loadMainStructureOfFile(const char *fileNam { if((iPart==-1 && nbOfParts==-1) || (iPart==0 && nbOfParts==1)) { + MCAuto msups(MEDFileMeshSupports::New(fileName)); + MCAuto mse(MEDFileStructureElements::New(fileName,msups)); ms=MEDFileMeshes::New(fileName); - fields=MEDFileFields::New(fileName,false);//false is important to not read the values + fields=MEDFileFields::NewWithDynGT(fileName,mse,false);//false is important to not read the values + if(ms->presenceOfStructureElements()) + {// pre traitement + fields->loadArrays(); + MEDFileBlowStrEltUp::DealWithSE(fields,ms,mse); + } + int nbMeshes(ms->getNumberOfMeshes()); + for(int i=0;igetMeshAtPos(i)); + MEDCoupling::MEDFileUMesh *tmp2(dynamic_cast(tmp)); + if(tmp2) + tmp2->forceComputationOfParts(); + } } else { -- 2.39.2