X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=src%2FMEDLoader%2FMEDFileFieldInternal.hxx;h=e2270e5ddc88fbb5754e33fb9060147a419c84f4;hb=1b746b38f3cdeae6654a9501f37fde5e56e59288;hp=bb2e318dfa84a33936e2af932d076b694c46a49f;hpb=b219559763498c4bd10c730cd3d2c62b1eed45db;p=tools%2Fmedcoupling.git diff --git a/src/MEDLoader/MEDFileFieldInternal.hxx b/src/MEDLoader/MEDFileFieldInternal.hxx index bb2e318df..e2270e5dd 100644 --- a/src/MEDLoader/MEDFileFieldInternal.hxx +++ b/src/MEDLoader/MEDFileFieldInternal.hxx @@ -1,4 +1,4 @@ -// Copyright (C) 2007-2019 CEA/DEN, EDF R&D +// Copyright (C) 2007-2024 CEA, EDF // // This library is free software; you can redistribute it and/or // modify it under the terms of the GNU Lesser General Public @@ -85,6 +85,7 @@ namespace MEDCoupling MEDLOADER_EXPORT void simpleRepr(std::ostream& oss) const; MEDLOADER_EXPORT std::string getName() const { return _name; } MEDLOADER_EXPORT void setName(const std::string& name); + std::string getClassName() const override { return std::string("MEDFileFieldLoc"); } static MEDFileFieldLoc *New(med_idt fid, const std::string& locName); static MEDFileFieldLoc *New(med_idt fid, int i, const MEDFileEntities *entities); static MEDFileFieldLoc *New(const std::string& locName, INTERP_KERNEL::NormalizedCellType geoType, const std::vector& refCoo, const std::vector& gsCoo, const std::vector& w); @@ -135,6 +136,7 @@ namespace MEDCoupling static MEDFileFieldPerMeshPerTypePerDisc *NewOnRead(MEDFileFieldPerMeshPerTypeCommon *fath, TypeOfField type, int profileIt, const PartDefinition *pd); static MEDFileFieldPerMeshPerTypePerDisc *New(MEDFileFieldPerMeshPerTypeCommon *fath, TypeOfField type, mcIdType locId); static MEDFileFieldPerMeshPerTypePerDisc *New(const MEDFileFieldPerMeshPerTypePerDisc& other); + std::string getClassName() const override { return std::string("MEDFileFieldPerMeshPerTypePerDisc"); } std::size_t getHeapMemorySizeWithoutChildren() const; std::vector getDirectChildrenWithNull() const; MEDFileFieldPerMeshPerTypePerDisc *deepCopy(MEDFileFieldPerMeshPerTypeCommon *father) const; @@ -156,6 +158,7 @@ namespace MEDCoupling void fillTypesOfFieldAvailable(std::set& types) const; void setType(TypeOfField newType); INTERP_KERNEL::NormalizedCellType getGeoType() const; + INTERP_KERNEL::NormalizedCellType getGeoTypeStatic() const; std::size_t getNumberOfComponents() const; mcIdType getNumberOfTuples() const; mcIdType getStart() const { return _start; } @@ -220,6 +223,7 @@ namespace MEDCoupling class MEDFileFieldPerMeshPerTypeCommon : public RefCountObject, public MEDFileWritable { public: + std::string getClassName() const override { return std::string("MEDFileFieldPerMeshPerTypeCommon"); } std::size_t getHeapMemorySizeWithoutChildren() const; std::vector getDirectChildrenWithNull() const; void assignFieldNoProfile(mcIdType& start, mcIdType offset, mcIdType nbOfCells, const MEDCouplingFieldTemplate *field, const DataArray *arr, MEDFileFieldGlobsReal& glob, const MEDFileFieldNameScope& nasc); @@ -266,6 +270,7 @@ namespace MEDCoupling virtual ~MEDFileFieldPerMeshPerTypeCommon(); virtual void getDimension(int& dim) const = 0; virtual INTERP_KERNEL::NormalizedCellType getGeoType() const = 0; + virtual INTERP_KERNEL::NormalizedCellType getGeoTypeStatic() const = 0; virtual void entriesForMEDfile(TypeOfField mct, med_geometry_type& gt, med_entity_type& ent) const = 0; virtual void simpleRepr(int bkOffset, std::ostream& oss, int id) const = 0; virtual std::string getGeoTypeRepr() const = 0; @@ -286,12 +291,14 @@ namespace MEDCoupling class MEDFileFieldPerMeshPerType : public MEDFileFieldPerMeshPerTypeCommon { public: + std::string getClassName() const override { return std::string("MEDFileFieldPerMeshPerType"); } static MEDFileFieldPerMeshPerType *New(MEDFileFieldPerMesh *fath, INTERP_KERNEL::NormalizedCellType geoType); static MEDFileFieldPerMeshPerType *NewOnRead(med_idt fid, MEDFileFieldPerMesh *fath, TypeOfField type, INTERP_KERNEL::NormalizedCellType geoType, const MEDFileFieldNameScope& nasc, const PartDefinition *pd); static MCAuto Aggregate(mcIdType &start, const std::vector< std::pair >& pms, const std::vector< std::vector< std::pair > >& dts, INTERP_KERNEL::NormalizedCellType gt, MEDFileFieldPerMesh *father, std::vector > >& extractInfo); public:// overload of abstract methods void getDimension(int& dim) const; - INTERP_KERNEL::NormalizedCellType getGeoType() const; + INTERP_KERNEL::NormalizedCellType getGeoType() const override; + INTERP_KERNEL::NormalizedCellType getGeoTypeStatic() const override; void entriesForMEDfile(TypeOfField mct, med_geometry_type& gt, med_entity_type& ent) const; void simpleRepr(int bkOffset, std::ostream& oss, int id) const; std::string getGeoTypeRepr() const; @@ -308,11 +315,13 @@ namespace MEDCoupling { public: static MEDFileFieldPerMeshPerTypeDyn *NewOnRead(med_idt fid, MEDFileFieldPerMesh *fath, const MEDFileEntities *entities, int idGT, const MEDFileFieldNameScope& nasc); + std::string getClassName() const override { return std::string("MEDFileFieldPerMeshPerTypeDyn"); } int getDynGT() const; std::string getModelName() const; public: void getDimension(int& dim) const; - INTERP_KERNEL::NormalizedCellType getGeoType() const; + INTERP_KERNEL::NormalizedCellType getGeoType() const override; + INTERP_KERNEL::NormalizedCellType getGeoTypeStatic() const override; void entriesForMEDfile(TypeOfField mct, med_geometry_type& gt, med_entity_type& ent) const; void simpleRepr(int bkOffset, std::ostream& oss, int id) const; std::string getGeoTypeRepr() const; @@ -333,6 +342,8 @@ namespace MEDCoupling public: static MEDFileFieldPerMesh *New(MEDFileAnyTypeField1TSWithoutSDA *fath, const MEDCouplingMesh *mesh); static MEDFileFieldPerMesh *NewOnRead(med_idt fid, MEDFileAnyTypeField1TSWithoutSDA *fath, int meshCsit, int meshIteration, int meshOrder, const MEDFileFieldNameScope& nasc, const MEDFileMesh *mm, const MEDFileEntities *entities); + static MEDFileFieldPerMesh *NewOnRead(med_idt fid, MEDFileAnyTypeField1TSWithoutSDA *fath, int meshCsit, int meshIteration, int meshOrder, const MEDFileFieldNameScope& nasc, const PartDefinition *pd, const MEDFileEntities *entities); + std::string getClassName() const override { return std::string("MEDFileFieldPerMesh"); } std::size_t getHeapMemorySizeWithoutChildren() const; std::vector getDirectChildrenWithNull() const; MEDFileFieldPerMesh *deepCopy(MEDFileAnyTypeField1TSWithoutSDA *father) const; @@ -403,6 +414,7 @@ namespace MEDCoupling std::vector& code, std::vector& notNullPfls); static mcIdType ComputeNbOfElems(const MEDFileFieldGlobsReal *glob, TypeOfField type, const std::vector& geoTypes, const std::vector< std::pair >& dads, const std::vector& locs); MEDFileFieldPerMesh(med_idt fid, MEDFileAnyTypeField1TSWithoutSDA *fath, int meshCsit, int meshIteration, int meshOrder, const MEDFileFieldNameScope& nasc, const MEDFileMesh *mm, const MEDFileEntities *entities); + MEDFileFieldPerMesh(med_idt fid, MEDFileAnyTypeField1TSWithoutSDA *fath, int meshCsit, int meshIteration, int meshOrder, const MEDFileFieldNameScope& nasc, const PartDefinition *pd, const MEDFileEntities *entities); MEDFileFieldPerMesh(MEDFileAnyTypeField1TSWithoutSDA *fath, const MEDCouplingMesh *mesh); MEDFileFieldPerMesh(MEDFileAnyTypeField1TSWithoutSDA *fath, const std::string& meshName, int meshIt, int meshOrd):_mesh_iteration(meshIt),_mesh_order(meshOrd),_father(fath) { } private: