]> SALOME platform Git repositories - modules/paravis.git/commitdiff
Salome HOME
OK structure elements are done agy/EltStrInMC
authorAnthony Geay <anthony.geay@edf.fr>
Tue, 24 Jan 2017 16:40:24 +0000 (17:40 +0100)
committerAnthony Geay <anthony.geay@edf.fr>
Tue, 24 Jan 2017 16:40:24 +0000 (17:40 +0100)
src/Plugins/MEDReader/IO/MEDFileFieldRepresentationTree.cxx

index 540464cea1af7563cc70845f33df3cae59767bfb..4e9abe86d3444c6d4af8f75ab7f01221b88dc5e3 100644 (file)
@@ -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<MEDFileMeshSupports> msups(MEDFileMeshSupports::New(fileName));
+          MCAuto<MEDFileStructureElements> 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;i<nbMeshes;i++)
+            {
+              MEDCoupling::MEDFileMesh *tmp(ms->getMeshAtPos(i));
+              MEDCoupling::MEDFileUMesh *tmp2(dynamic_cast<MEDCoupling::MEDFileUMesh *>(tmp));
+              if(tmp2)
+                tmp2->forceComputationOfParts();
+            }
         }
       else
         {