X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;ds=sidebyside;f=src%2FMEDLoader%2FMEDFileMesh.hxx;h=77115cb49245478fd16f7c120a07a8b43c554475;hb=0b187729ac99d3e9e9bb9d2be8cb8600a783be6c;hp=65c39d1c2791546b47d9ffd1e8506db781c47b1b;hpb=8f82f89e0b819c02023d86dc86f8a18e24f645b6;p=tools%2Fmedcoupling.git diff --git a/src/MEDLoader/MEDFileMesh.hxx b/src/MEDLoader/MEDFileMesh.hxx index 65c39d1c2..77115cb49 100644 --- a/src/MEDLoader/MEDFileMesh.hxx +++ b/src/MEDLoader/MEDFileMesh.hxx @@ -32,7 +32,7 @@ #include #include -namespace ParaMEDMEM +namespace MEDCoupling { class MEDFileFieldGlobsReal; class MEDFileField1TSStructItem; @@ -67,6 +67,8 @@ namespace ParaMEDMEM MEDLOADER_EXPORT double getTimeValue() const { return _time; } MEDLOADER_EXPORT void setTimeUnit(const std::string& unit) { _dt_unit=unit; } MEDLOADER_EXPORT std::string getTimeUnit() const { return _dt_unit; } + MEDLOADER_EXPORT void setAxType(MEDCouplingAxisType at) { _axis_type=at; } + MEDLOADER_EXPORT MEDCouplingAxisType getAxType() const { return _axis_type; } MEDLOADER_EXPORT std::vector getAllGeoTypes() const; MEDLOADER_EXPORT virtual int getNumberOfNodes() const = 0; MEDLOADER_EXPORT virtual int getNumberOfCellsAtLevel(int meshDimRelToMaxExt) const = 0; @@ -83,9 +85,10 @@ namespace ParaMEDMEM MEDLOADER_EXPORT virtual void write(const std::string& fileName, int mode) const; MEDLOADER_EXPORT virtual void write(med_idt fid) const; MEDLOADER_EXPORT virtual int getSizeAtLevel(int meshDimRelToMaxExt) const = 0; - MEDLOADER_EXPORT virtual MEDCouplingMesh *getGenMeshAtLevel(int meshDimRelToMax, bool renum=false) const = 0; + MEDLOADER_EXPORT virtual MEDCouplingMesh *getMeshAtLevel(int meshDimRelToMax, bool renum=false) const = 0; MEDLOADER_EXPORT virtual std::vector getDistributionOfTypes(int meshDimRelToMax) const; MEDLOADER_EXPORT virtual void whichAreNodesFetched(const MEDFileField1TSStructItem& st, const MEDFileFieldGlobsReal *globs, std::vector& nodesFetched) const = 0; + MEDLOADER_EXPORT virtual MEDFileMesh *cartesianize() const = 0; // MEDLOADER_EXPORT bool areFamsEqual(const MEDFileMesh *other, std::string& what) const; MEDLOADER_EXPORT bool areGrpsEqual(const MEDFileMesh *other, std::string& what) const; @@ -116,6 +119,17 @@ namespace ParaMEDMEM MEDLOADER_EXPORT void setGroupsOnFamily(const std::string& famName, const std::vector& grps); MEDLOADER_EXPORT std::vector getGroupsNames() const; MEDLOADER_EXPORT std::vector getFamiliesNames() const; + MEDLOADER_EXPORT std::vector getGroupsOnSpecifiedLev(int meshDimRelToMaxExt) const; + MEDLOADER_EXPORT std::vector getGrpNonEmptyLevelsExt(const std::string& grp) const; + MEDLOADER_EXPORT std::vector getGrpNonEmptyLevels(const std::string& grp) const; + MEDLOADER_EXPORT std::vector getGrpsNonEmptyLevels(const std::vector& grps) const; + MEDLOADER_EXPORT std::vector getGrpsNonEmptyLevelsExt(const std::vector& grps) const; + MEDLOADER_EXPORT virtual std::vector getFamsNonEmptyLevels(const std::vector& fams) const = 0; + MEDLOADER_EXPORT virtual std::vector getFamsNonEmptyLevelsExt(const std::vector& fams) const = 0; + MEDLOADER_EXPORT std::vector getFamNonEmptyLevels(const std::string& fam) const; + MEDLOADER_EXPORT std::vector getFamNonEmptyLevelsExt(const std::string& fam) const; + MEDLOADER_EXPORT std::vector getFamiliesNamesWithFilePointOfView() const; + MEDLOADER_EXPORT static std::string GetMagicFamilyStr(); MEDLOADER_EXPORT void assignFamilyNameWithGroupName(); MEDLOADER_EXPORT std::vector removeEmptyGroups(); MEDLOADER_EXPORT void removeGroup(const std::string& name); @@ -205,6 +219,7 @@ namespace ParaMEDMEM void deepCpyEquivalences(const MEDFileMesh& other); bool areEquivalencesEqual(const MEDFileMesh *other, std::string& what) const; void getEquivalencesRepr(std::ostream& oss) const; + void checkCartesian() const; protected: int _order; int _iteration; @@ -215,6 +230,7 @@ namespace ParaMEDMEM mutable std::string _univ_name; bool _univ_wr_status; std::string _desc_name; + MEDCouplingAxisType _axis_type; MEDCouplingAutoRefCountObjectPtr _joints; MEDCouplingAutoRefCountObjectPtr _equiv; protected: @@ -264,28 +280,21 @@ namespace ParaMEDMEM MEDLOADER_EXPORT std::vector getGeoTypesAtLevel(int meshDimRelToMax) const; MEDLOADER_EXPORT int getNumberOfCellsWithType(INTERP_KERNEL::NormalizedCellType ct) const; MEDLOADER_EXPORT void whichAreNodesFetched(const MEDFileField1TSStructItem& st, const MEDFileFieldGlobsReal *globs, std::vector& nodesFetched) const; + MEDLOADER_EXPORT MEDFileMesh *cartesianize() const; MEDLOADER_EXPORT std::vector getNonEmptyLevels() const; MEDLOADER_EXPORT std::vector getNonEmptyLevelsExt() const; MEDLOADER_EXPORT std::vector getFamArrNonEmptyLevelsExt() const; MEDLOADER_EXPORT std::vector getNumArrNonEmptyLevelsExt() const; MEDLOADER_EXPORT std::vector getNameArrNonEmptyLevelsExt() const; - MEDLOADER_EXPORT std::vector getGrpNonEmptyLevels(const std::string& grp) const; - MEDLOADER_EXPORT std::vector getGrpNonEmptyLevelsExt(const std::string& grp) const; - MEDLOADER_EXPORT std::vector getFamNonEmptyLevels(const std::string& fam) const; - MEDLOADER_EXPORT std::vector getFamNonEmptyLevelsExt(const std::string& fam) const; - MEDLOADER_EXPORT std::vector getGrpsNonEmptyLevels(const std::vector& grps) const; - MEDLOADER_EXPORT std::vector getGrpsNonEmptyLevelsExt(const std::vector& grps) const; MEDLOADER_EXPORT std::vector getFamsNonEmptyLevels(const std::vector& fams) const; MEDLOADER_EXPORT std::vector getFamsNonEmptyLevelsExt(const std::vector& fams) const; - MEDLOADER_EXPORT std::vector getGroupsOnSpecifiedLev(int meshDimRelToMaxExt) const; MEDLOADER_EXPORT DataArrayDouble *getCoords() const; MEDLOADER_EXPORT MEDCouplingUMesh *getGroup(int meshDimRelToMaxExt, const std::string& grp, bool renum=false) const; MEDLOADER_EXPORT MEDCouplingUMesh *getGroups(int meshDimRelToMaxExt, const std::vector& grps, bool renum=false) const; MEDLOADER_EXPORT MEDCouplingUMesh *getFamily(int meshDimRelToMaxExt, const std::string& fam, bool renum=false) const; MEDLOADER_EXPORT MEDCouplingUMesh *getFamilies(int meshDimRelToMaxExt, const std::vector& fams, bool renum=false) const; MEDLOADER_EXPORT DataArrayInt *getFamiliesArr(int meshDimRelToMaxExt, const std::vector& fams, bool renum=false) const; - MEDLOADER_EXPORT MEDCouplingUMesh *getMeshAtLevel(int meshDimRelToMaxExt, bool renum=false) const; - MEDLOADER_EXPORT MEDCouplingMesh *getGenMeshAtLevel(int meshDimRelToMax, bool renum=false) const; + MEDLOADER_EXPORT MEDCouplingUMesh *getMeshAtLevel(int meshDimRelToMax, bool renum=false) const; MEDLOADER_EXPORT std::vector getDistributionOfTypes(int meshDimRelToMax) const; MEDLOADER_EXPORT MEDCouplingUMesh *getLevel0Mesh(bool renum=false) const; MEDLOADER_EXPORT MEDCouplingUMesh *getLevelM1Mesh(bool renum=false) const; @@ -379,7 +388,9 @@ namespace ParaMEDMEM MEDLOADER_EXPORT std::vector getFamArrNonEmptyLevelsExt() const; MEDLOADER_EXPORT std::vector getNumArrNonEmptyLevelsExt() const; MEDLOADER_EXPORT std::vector getNameArrNonEmptyLevelsExt() const; - MEDCouplingMesh *getGenMeshAtLevel(int meshDimRelToMax, bool renum=false) const; + MEDLOADER_EXPORT MEDCouplingMesh *getMeshAtLevel(int meshDimRelToMax, bool renum=false) const; + MEDLOADER_EXPORT std::vector getFamsNonEmptyLevels(const std::vector& fams) const; + MEDLOADER_EXPORT std::vector getFamsNonEmptyLevelsExt(const std::vector& fams) const; MEDLOADER_EXPORT int getSizeAtLevel(int meshDimRelToMaxExt) const; MEDLOADER_EXPORT int getNumberOfNodes() const; MEDLOADER_EXPORT int getNumberOfCellsAtLevel(int meshDimRelToMaxExt) const; @@ -441,6 +452,7 @@ namespace ParaMEDMEM MEDLOADER_EXPORT void clearNonDiscrAttributes() const; MEDLOADER_EXPORT const MEDCouplingCMesh *getMesh() const; MEDLOADER_EXPORT void setMesh(MEDCouplingCMesh *m); + MEDLOADER_EXPORT MEDFileMesh *cartesianize() const; private: ~MEDFileCMesh() { } const MEDCouplingStructuredMesh *getStructuredMesh() const; @@ -472,6 +484,7 @@ namespace ParaMEDMEM MEDLOADER_EXPORT void clearNonDiscrAttributes() const; MEDLOADER_EXPORT const MEDCouplingCurveLinearMesh *getMesh() const; MEDLOADER_EXPORT void setMesh(MEDCouplingCurveLinearMesh *m); + MEDLOADER_EXPORT MEDFileMesh *cartesianize() const; private: ~MEDFileCurveLinearMesh() { } MEDFileCurveLinearMesh(); @@ -496,12 +509,13 @@ namespace ParaMEDMEM MEDLOADER_EXPORT std::string getName() const; MEDLOADER_EXPORT void setName(const std::string& newMeshName); MEDLOADER_EXPORT bool changeNames(const std::vector< std::pair >& modifTab); + MEDLOADER_EXPORT void cartesianizeMe(); MEDLOADER_EXPORT MEDFileMesh *getOneTimeStep() const; MEDLOADER_EXPORT void write(med_idt fid) const; MEDLOADER_EXPORT void write(const std::string& fileName, int mode) const; MEDLOADER_EXPORT void setOneTimeStep(MEDFileMesh *mesh1TimeStep); MEDLOADER_EXPORT MEDFileJoints *getJoints() const; - MEDLOADER_EXPORT void setJoints( MEDFileJoints* joints ); + MEDLOADER_EXPORT void setJoints(MEDFileJoints* joints); private: ~MEDFileMeshMultiTS() { } void loadFromFile(const std::string& fileName, const std::string& mName); @@ -532,6 +546,7 @@ namespace ParaMEDMEM MEDLOADER_EXPORT MEDFileMesh *getMeshWithName(const std::string& mname) const; MEDLOADER_EXPORT std::vector getMeshesNames() const; MEDLOADER_EXPORT bool changeNames(const std::vector< std::pair >& modifTab); + MEDLOADER_EXPORT void cartesianizeMe(); // MEDLOADER_EXPORT void resize(int newSize); MEDLOADER_EXPORT void pushMesh(MEDFileMesh *mesh);