X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=src%2FMEDLoader%2FMEDFileData.cxx;h=af66dda5b732f8dde5e2f91f3b6c119401255fe4;hb=76c76c994b5ab02ac441e9a872ef9dd4a865c19b;hp=95db854ad4d7ad3c753cc966beb882df751f0ade;hpb=b22dfe1adf8544bb427331b2884e24f422675e83;p=tools%2Fmedcoupling.git diff --git a/src/MEDLoader/MEDFileData.cxx b/src/MEDLoader/MEDFileData.cxx index 95db854ad..af66dda5b 100644 --- a/src/MEDLoader/MEDFileData.cxx +++ b/src/MEDLoader/MEDFileData.cxx @@ -21,6 +21,7 @@ #include "MEDFileData.hxx" #include "MEDLoaderBase.hxx" #include "MEDFileSafeCaller.txx" +#include "MEDFileBlowStrEltUp.hxx" #include "InterpKernelAutoPtr.hxx" @@ -231,6 +232,15 @@ bool MEDFileData::unPolyzeMeshes() return !meshesImpacted.empty(); } +void MEDFileData::dealWithStructureElements() +{ + if(_struct_elems.isNull()) + throw INTERP_KERNEL::Exception("MEDFileData::dealWithStructureElements : no structure elements in this !"); + if(_meshes.isNull() || _fields.isNull()) + throw INTERP_KERNEL::Exception("MEDFileData::dealWithStructureElements : meshes and fields must be not null !"); + MEDFileBlowStrEltUp::DealWithSE(_fields,_meshes,_struct_elems); +} + /*! * Precondition : all instances in \a mfds should have a single mesh with fields on it. If there is an instance with not exactly one mesh an exception will be thrown. * You can invoke MEDFileFields::partOfThisLyingOnSpecifiedMeshName method to make it work. @@ -307,11 +317,11 @@ MEDFileData::MEDFileData(med_idt fid) try { readHeader(fid); - _fields=MEDFileFields::New(fid); + _mesh_supports=MEDFileMeshSupports::New(fid); + _struct_elems=MEDFileStructureElements::New(fid,_mesh_supports); + _fields=MEDFileFields::NewWithDynGT(fid,_struct_elems,true); _meshes=MEDFileMeshes::New(fid); _params=MEDFileParameters::New(fid); - _mesh_supports=MEDFileMeshSupports::New(fid); - _struct_elems=MEDFileStructureElements::New(fid); } catch(INTERP_KERNEL::Exception& e) {