X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=src%2FMEDLoader%2FMEDFileMesh.hxx;h=8492b0b4aeef8f0af3933e0f73146af4e134ecd2;hb=88c09fef7506f47991febf579dba91e11baf91e1;hp=c501e45ad97a8c9f55d48772fb7ce40c819d3f48;hpb=2e364698aefe2bae4bde861cf24c684e2e1c05f2;p=tools%2Fmedcoupling.git diff --git a/src/MEDLoader/MEDFileMesh.hxx b/src/MEDLoader/MEDFileMesh.hxx index c501e45ad..8492b0b4a 100644 --- a/src/MEDLoader/MEDFileMesh.hxx +++ b/src/MEDLoader/MEDFileMesh.hxx @@ -31,6 +31,9 @@ namespace ParaMEDMEM { + class MEDFileFieldGlobsReal; + class MEDFileField1TSStructItem; + class MEDLOADER_EXPORT MEDFileMesh : public RefCountObject, public MEDFileWritable { public: @@ -44,12 +47,12 @@ namespace ParaMEDMEM virtual void clearNonDiscrAttributes() const; void setName(const char *name) { _name=name; } bool changeNames(const std::vector< std::pair >& modifTab) throw(INTERP_KERNEL::Exception); - const char *getName() const { return _name.c_str(); } + std::string getName() const { return _name; } const char *getUnivName() const { return _univ_name.c_str(); } bool getUnivNameWrStatus() const { return _univ_wr_status; } void setUnivNameWrStatus(bool newStatus) { _univ_wr_status=newStatus; } void setDescription(const char *name) { _desc_name=name; } - const char *getDescription() const { return _desc_name.c_str(); } + std::string getDescription() const { return _desc_name; } void setOrder(int order) { _order=order; } int getOrder() const { return _order; } void setIteration(int it) { _iteration=it; } @@ -70,6 +73,8 @@ namespace ParaMEDMEM virtual void write(med_idt fid) const throw(INTERP_KERNEL::Exception); virtual int getSizeAtLevel(int meshDimRelToMaxExt) const throw(INTERP_KERNEL::Exception) = 0; virtual MEDCouplingMesh *getGenMeshAtLevel(int meshDimRelToMax, bool renum=false) const throw(INTERP_KERNEL::Exception) = 0; + virtual std::vector getDistributionOfTypes(int meshDimRelToMax) const throw(INTERP_KERNEL::Exception); + virtual void whichAreNodesFetched(const MEDFileField1TSStructItem& st, const MEDFileFieldGlobsReal *globs, std::vector& nodesFetched) const throw(INTERP_KERNEL::Exception) = 0; // bool areFamsEqual(const MEDFileMesh *other, std::string& what) const; bool areGrpsEqual(const MEDFileMesh *other, std::string& what) const; @@ -207,6 +212,7 @@ namespace ParaMEDMEM const DataArrayInt *getRevNumberFieldAtLevel(int meshDimRelToMaxExt) const throw(INTERP_KERNEL::Exception); const DataArrayAsciiChar *getNameFieldAtLevel(int meshDimRelToMaxExt) const throw(INTERP_KERNEL::Exception); int getNumberOfNodes() const throw(INTERP_KERNEL::Exception); + void whichAreNodesFetched(const MEDFileField1TSStructItem& st, const MEDFileFieldGlobsReal *globs, std::vector& nodesFetched) const throw(INTERP_KERNEL::Exception); std::vector getNonEmptyLevels() const; std::vector getNonEmptyLevelsExt() const; std::vector getFamArrNonEmptyLevelsExt() const; @@ -229,10 +235,13 @@ namespace ParaMEDMEM DataArrayInt *getFamiliesArr(int meshDimRelToMaxExt, const std::vector& fams, bool renum=false) const throw(INTERP_KERNEL::Exception); MEDCouplingUMesh *getMeshAtLevel(int meshDimRelToMaxExt, bool renum=false) const throw(INTERP_KERNEL::Exception); MEDCouplingMesh *getGenMeshAtLevel(int meshDimRelToMax, bool renum=false) const throw(INTERP_KERNEL::Exception); + std::vector getDistributionOfTypes(int meshDimRelToMax) const throw(INTERP_KERNEL::Exception); MEDCouplingUMesh *getLevel0Mesh(bool renum=false) const throw(INTERP_KERNEL::Exception); MEDCouplingUMesh *getLevelM1Mesh(bool renum=false) const throw(INTERP_KERNEL::Exception); MEDCouplingUMesh *getLevelM2Mesh(bool renum=false) const throw(INTERP_KERNEL::Exception); MEDCouplingUMesh *getLevelM3Mesh(bool renum=false) const throw(INTERP_KERNEL::Exception); + std::vector getDirectUndergroundSingleGeoTypeMeshes(int meshDimRelToMax) const throw(INTERP_KERNEL::Exception); + MEDCoupling1GTUMesh *getDirectUndergroundSingleGeoTypeMesh(INTERP_KERNEL::NormalizedCellType gt) const throw(INTERP_KERNEL::Exception); // void setFamilyNameAttachedOnId(int id, const std::string& newFamName) throw(INTERP_KERNEL::Exception); void setCoords(DataArrayDouble *coords) throw(INTERP_KERNEL::Exception); @@ -301,12 +310,13 @@ namespace ParaMEDMEM MEDCouplingMesh *getGenMeshAtLevel(int meshDimRelToMax, bool renum=false) const throw(INTERP_KERNEL::Exception); int getSizeAtLevel(int meshDimRelToMaxExt) const throw(INTERP_KERNEL::Exception); int getNumberOfNodes() const throw(INTERP_KERNEL::Exception); + void whichAreNodesFetched(const MEDFileField1TSStructItem& st, const MEDFileFieldGlobsReal *globs, std::vector& nodesFetched) const throw(INTERP_KERNEL::Exception); // tools bool unPolyze(std::vector& oldCode, std::vector& newCode, DataArrayInt *& o2nRenumCell) throw(INTERP_KERNEL::Exception); protected: void changeFamilyIdArr(int oldId, int newId) throw(INTERP_KERNEL::Exception); void deepCpyAttributes() throw(INTERP_KERNEL::Exception); - void loadStrMeshFromFile(MEDFileStrMeshL2 *strm, med_idt fid, const char *mName, int dt, int it) throw(INTERP_KERNEL::Exception); + void loadStrMeshFromFile(MEDFileStrMeshL2 *strm, med_idt fid, const char *mName, int dt, int it, MEDFileMeshReadSelector *mrs) throw(INTERP_KERNEL::Exception); void writeStructuredLL(med_idt fid, const char *maa) const throw(INTERP_KERNEL::Exception); virtual const MEDCouplingStructuredMesh *getStructuredMesh() const = 0; static med_geometry_type GetGeoTypeFromMeshDim(int meshDim) throw(INTERP_KERNEL::Exception); @@ -326,8 +336,8 @@ namespace ParaMEDMEM friend class MEDFileMesh; public: static MEDFileCMesh *New(); - static MEDFileCMesh *New(const char *fileName) throw(INTERP_KERNEL::Exception); - static MEDFileCMesh *New(const char *fileName, const char *mName, int dt=-1, int it=-1) throw(INTERP_KERNEL::Exception); + static MEDFileCMesh *New(const char *fileName, MEDFileMeshReadSelector *mrs=0) throw(INTERP_KERNEL::Exception); + static MEDFileCMesh *New(const char *fileName, const char *mName, int dt=-1, int it=-1, MEDFileMeshReadSelector *mrs=0) throw(INTERP_KERNEL::Exception); std::size_t getHeapMemorySize() const; MEDFileMesh *createNewEmpty() const throw(INTERP_KERNEL::Exception); MEDFileMesh *deepCpy() const throw(INTERP_KERNEL::Exception); @@ -344,8 +354,8 @@ namespace ParaMEDMEM void writeLL(med_idt fid) const throw(INTERP_KERNEL::Exception); MEDFileCMesh(); void synchronizeTinyInfoOnLeaves() const; - MEDFileCMesh(med_idt fid, const char *mName, int dt, int it) throw(INTERP_KERNEL::Exception); - void loadCMeshFromFile(med_idt fid, const char *mName, int dt, int it) throw(INTERP_KERNEL::Exception); + MEDFileCMesh(med_idt fid, const char *mName, int dt, int it, MEDFileMeshReadSelector *mrs) throw(INTERP_KERNEL::Exception); + void loadCMeshFromFile(med_idt fid, const char *mName, int dt, int it, MEDFileMeshReadSelector *mrs) throw(INTERP_KERNEL::Exception); private: MEDCouplingAutoRefCountObjectPtr _cmesh; }; @@ -355,8 +365,8 @@ namespace ParaMEDMEM friend class MEDFileMesh; public: static MEDFileCurveLinearMesh *New(); - static MEDFileCurveLinearMesh *New(const char *fileName) throw(INTERP_KERNEL::Exception); - static MEDFileCurveLinearMesh *New(const char *fileName, const char *mName, int dt=-1, int it=-1) throw(INTERP_KERNEL::Exception); + static MEDFileCurveLinearMesh *New(const char *fileName, MEDFileMeshReadSelector *mrs=0) throw(INTERP_KERNEL::Exception); + static MEDFileCurveLinearMesh *New(const char *fileName, const char *mName, int dt=-1, int it=-1, MEDFileMeshReadSelector *mrs=0) throw(INTERP_KERNEL::Exception); std::size_t getHeapMemorySize() const; MEDFileMesh *createNewEmpty() const throw(INTERP_KERNEL::Exception); MEDFileMesh *deepCpy() const throw(INTERP_KERNEL::Exception); @@ -370,11 +380,11 @@ namespace ParaMEDMEM void setMesh(MEDCouplingCurveLinearMesh *m) throw(INTERP_KERNEL::Exception); private: MEDFileCurveLinearMesh(); - MEDFileCurveLinearMesh(med_idt fid, const char *mName, int dt, int it) throw(INTERP_KERNEL::Exception); + MEDFileCurveLinearMesh(med_idt fid, const char *mName, int dt, int it, MEDFileMeshReadSelector *mrs) throw(INTERP_KERNEL::Exception); const MEDCouplingStructuredMesh *getStructuredMesh() const; void synchronizeTinyInfoOnLeaves() const; void writeLL(med_idt fid) const throw(INTERP_KERNEL::Exception); - void loadCLMeshFromFile(med_idt fid, const char *mName, int dt, int it) throw(INTERP_KERNEL::Exception);//to imp + void loadCLMeshFromFile(med_idt fid, const char *mName, int dt, int it, MEDFileMeshReadSelector *mrs) throw(INTERP_KERNEL::Exception);//to imp private: MEDCouplingAutoRefCountObjectPtr _clmesh; }; @@ -387,7 +397,7 @@ namespace ParaMEDMEM static MEDFileMeshMultiTS *New(const char *fileName, const char *mName) throw(INTERP_KERNEL::Exception); MEDFileMeshMultiTS *deepCpy() const throw(INTERP_KERNEL::Exception); std::size_t getHeapMemorySize() const; - const char *getName() const throw(INTERP_KERNEL::Exception); + std::string getName() const throw(INTERP_KERNEL::Exception); void setName(const char *newMeshName) throw(INTERP_KERNEL::Exception); bool changeNames(const std::vector< std::pair >& modifTab) throw(INTERP_KERNEL::Exception); MEDFileMesh *getOneTimeStep() const throw(INTERP_KERNEL::Exception);