X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=src%2FMEDLoader%2FMEDFileMeshElt.hxx;h=0868cf757cbb2ea0ea4796ef8a5dcc43d677a6a8;hb=bd893720ddc77b5c6d49697ba8904ae2606d75ee;hp=fcce83e754303ac526a7c5eb5f47652b5d71b3b3;hpb=887d0e1efce4f46f68d2596dcd801f02f5c1f99e;p=tools%2Fmedcoupling.git diff --git a/src/MEDLoader/MEDFileMeshElt.hxx b/src/MEDLoader/MEDFileMeshElt.hxx index fcce83e75..0868cf757 100644 --- a/src/MEDLoader/MEDFileMeshElt.hxx +++ b/src/MEDLoader/MEDFileMeshElt.hxx @@ -1,4 +1,4 @@ -// Copyright (C) 2007-2012 CEA/DEN, EDF R&D +// Copyright (C) 2007-2013 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 @@ -22,6 +22,7 @@ #define __MEDFILEMESHELT_HXX__ #include "MEDCouplingMemArray.hxx" +#include "MEDCoupling1GTUMesh.hxx" #include "MEDCouplingAutoRefCountObjectPtr.hxx" #include "NormalizedUnstructuredMesh.hxx" @@ -31,34 +32,36 @@ namespace ParaMEDMEM { class MEDCouplingUMesh; + class MEDFileMeshReadSelector; class MEDFileUMeshPerType : public RefCountObject { public: - static MEDFileUMeshPerType *New(med_idt fid, const char *mName, int dt, int it, int mdim, med_geometry_type geoElt, INTERP_KERNEL::NormalizedCellType geoElt2); + static MEDFileUMeshPerType *New(med_idt fid, const char *mName, int dt, int it, int mdim, med_geometry_type geoElt, INTERP_KERNEL::NormalizedCellType geoElt2, MEDFileMeshReadSelector *mrs); static bool isExisting(med_idt fid, const char *mName, int dt, int it, med_geometry_type geoElt, med_entity_type& whichEntity); - std::size_t getHeapMemorySize() const { return 0; } + std::size_t getHeapMemorySizeWithoutChildren() const; + std::vector getDirectChildren() const; int getDim() const; - const DataArrayInt *getNodal() const { return _conn; } - const DataArrayInt *getNodalIndex() const { return _conn_index; } + MEDCoupling1GTUMesh *getMesh() const { return const_cast((const MEDCoupling1GTUMesh *)_m); } const DataArrayInt *getFam() const { return _fam; } const DataArrayInt *getNum() const { return _num; } - static void write(med_idt fid, const char *mname, int mdim, const MEDCouplingUMesh *m, const DataArrayInt *fam, const DataArrayInt *num); + const DataArrayAsciiChar *getNames() const { return _names; } + static void Write(med_idt fid, const char *mname, int mdim, const MEDCoupling1GTUMesh *m, const DataArrayInt *fam, const DataArrayInt *num, const DataArrayAsciiChar *names); private: MEDFileUMeshPerType(med_idt fid, const char *mName, int dt, int it, int mdim, med_geometry_type geoElt, INTERP_KERNEL::NormalizedCellType type, - med_entity_type entity); + med_entity_type entity, MEDFileMeshReadSelector *mrs); void loadFromStaticType(med_idt fid, const char *mName, int dt, int it, int mdim, int curNbOfElem, med_geometry_type geoElt, INTERP_KERNEL::NormalizedCellType type, - med_entity_type entity); + med_entity_type entity, MEDFileMeshReadSelector *mrs); void loadPolyg(med_idt fid, const char *mName, int dt, int it, int mdim, int arraySize, med_geometry_type geoElt, - med_entity_type entity); + med_entity_type entity, MEDFileMeshReadSelector *mrs); void loadPolyh(med_idt fid, const char *mName, int dt, int it, int mdim, int connFaceLgth, med_geometry_type geoElt, - med_entity_type entity); + med_entity_type entity, MEDFileMeshReadSelector *mrs); + void loadCommonPart(med_idt fid, const char *mName, int dt, int it, int mdim, int curNbOfElem, med_geometry_type geoElt, med_entity_type entity, MEDFileMeshReadSelector *mrs); private: - MEDCouplingAutoRefCountObjectPtr _conn; - MEDCouplingAutoRefCountObjectPtr _conn_index; + MEDCouplingAutoRefCountObjectPtr _m; MEDCouplingAutoRefCountObjectPtr _num; MEDCouplingAutoRefCountObjectPtr _fam; - INTERP_KERNEL::NormalizedCellType _type; + MEDCouplingAutoRefCountObjectPtr _names; med_entity_type _entity; }; }