readHeader(fid);
_mesh_supports=MEDFileMeshSupports::New(fid);
_struct_elems=MEDFileStructureElements::New(fid,_mesh_supports);
- _fields=MEDFileFields::New(fid);
+ _fields=MEDFileFields::NewWithDynGT(fid,_struct_elems,true);
_meshes=MEDFileMeshes::New(fid);
_params=MEDFileParameters::New(fid);
}
}
return new MFFPMIter2(tmp);
}
- else
- throw INTERP_KERNEL::Exception("MFFPMIter::NewCell : not recognized type !");
+ return new MFFPMIterSimple;// for MEDFileAllStaticEntites and MEDFileAllStaticEntitiesPlusDyn cells are in
}
}
return true;
return false;
}
- else
- throw INTERP_KERNEL::Exception("MFFPMIter::IsPresenceOfNode : not recognized type !");
+ return true;// for MEDFileAllStaticEntites and MEDFileAllStaticEntitiesPlusDyn nodes are in
}
}
MEDFileFields *MEDFileFields::NewWithDynGT(const std::string& fileName, const MEDFileStructureElements *se, bool loadAll)
{
MEDFileUtilities::AutoFid fid(OpenMEDFileForRead(fileName));
+ return NewWithDynGT(fid,se,loadAll);
+}
+
+MEDFileFields *MEDFileFields::NewWithDynGT(med_idt fid, const MEDFileStructureElements *se, bool loadAll)
+{
if(!se)
throw INTERP_KERNEL::Exception("MEDFileFields::NewWithDynGT : null struct element pointer !");
INTERP_KERNEL::AutoCppPtr<MEDFileEntities> entities(MEDFileEntities::BuildFrom(*se));
public:
MEDLOADER_EXPORT static MEDFileFields *New();
MEDLOADER_EXPORT static MEDFileFields *New(const std::string& fileName, bool loadAll=true);
- MEDLOADER_EXPORT static MEDFileFields *NewWithDynGT(const std::string& fileName, const MEDFileStructureElements *se, bool loadAll=true);
MEDLOADER_EXPORT static MEDFileFields *New(med_idt fid, bool loadAll=true);
+ MEDLOADER_EXPORT static MEDFileFields *NewWithDynGT(const std::string& fileName, const MEDFileStructureElements *se, bool loadAll=true);
+ MEDLOADER_EXPORT static MEDFileFields *NewWithDynGT(med_idt fid, const MEDFileStructureElements *se, bool loadAll=true);
MEDLOADER_EXPORT static MEDFileFields *New(DataArrayByte *db) { return BuildFromMemoryChunk<MEDFileFields>(db); }
MEDLOADER_EXPORT static MEDFileFields *LoadPartOf(const std::string& fileName, bool loadAll=true, const MEDFileMeshes *ms=0);
MEDLOADER_EXPORT static MEDFileFields *LoadSpecificEntities(const std::string& fileName, const std::vector< std::pair<TypeOfField,INTERP_KERNEL::NormalizedCellType> >& entities, bool loadAll=true);