- /*!
- * SDA is for Shared Data Arrays such as profiles.
- */
- class MEDFileAnyTypeField1TSWithoutSDA : public RefCountObject, public MEDFileFieldNameScope
- {
- public:
- MEDLOADER_EXPORT MEDFileAnyTypeField1TSWithoutSDA();
- MEDLOADER_EXPORT MEDFileAnyTypeField1TSWithoutSDA(const std::string& fieldName, int csit, int iteration, int order);
- MEDLOADER_EXPORT int getIteration() const { return _iteration; }
- MEDLOADER_EXPORT int getOrder() const { return _order; }
- MEDLOADER_EXPORT double getTime(int& iteration, int& order) const { iteration=_iteration; order=_order; return _dt; }
- MEDLOADER_EXPORT void setTime(int iteration, int order, double val) { _dt=val; _iteration=iteration; _order=order; }
- MEDLOADER_EXPORT int getDimension() const;
- MEDLOADER_EXPORT std::string getMeshName() const;
- MEDLOADER_EXPORT void setMeshName(const std::string& newMeshName);
- MEDLOADER_EXPORT bool changeMeshNames(const std::vector< std::pair<std::string,std::string> >& modifTab);
- MEDLOADER_EXPORT int getMeshIteration() const;
- MEDLOADER_EXPORT int getMeshOrder() const;
- MEDLOADER_EXPORT bool isDealingTS(int iteration, int order) const;
- MEDLOADER_EXPORT std::pair<int,int> getDtIt() const;
- MEDLOADER_EXPORT void fillIteration(std::pair<int,int>& p) const;
- MEDLOADER_EXPORT void fillTypesOfFieldAvailable(std::vector<TypeOfField>& types) const;
- MEDLOADER_EXPORT std::vector<TypeOfField> getTypesOfFieldAvailable() const;
- //
- MEDLOADER_EXPORT std::vector<std::string> getPflsReallyUsed2() const;
- MEDLOADER_EXPORT std::vector<std::string> getLocsReallyUsed2() const;
- MEDLOADER_EXPORT std::vector<std::string> getPflsReallyUsedMulti2() const;
- MEDLOADER_EXPORT std::vector<std::string> getLocsReallyUsedMulti2() const;
- MEDLOADER_EXPORT void changePflsRefsNamesGen2(const std::vector< std::pair<std::vector<std::string>, std::string > >& mapOfModif);
- MEDLOADER_EXPORT void changeLocsRefsNamesGen2(const std::vector< std::pair<std::vector<std::string>, std::string > >& mapOfModif);
- //
- MEDLOADER_EXPORT int getNonEmptyLevels(const std::string& mname, std::vector<int>& levs) const;
- MEDLOADER_EXPORT std::vector< std::vector<std::pair<int,int> > > getFieldSplitedByType(const std::string& mname, std::vector<INTERP_KERNEL::NormalizedCellType>& types, std::vector< std::vector<TypeOfField> >& typesF, std::vector< std::vector<std::string> >& pfls, std::vector< std::vector<std::string> >& locs) const;
- //
- MEDLOADER_EXPORT MEDFileFieldPerMeshPerTypePerDisc *getLeafGivenMeshAndTypeAndLocId(const std::string& mName, INTERP_KERNEL::NormalizedCellType typ, int locId);
- MEDLOADER_EXPORT const MEDFileFieldPerMeshPerTypePerDisc *getLeafGivenMeshAndTypeAndLocId(const std::string& mName, INTERP_KERNEL::NormalizedCellType typ, int locId) const;
- MEDLOADER_EXPORT void deepCpyLeavesFrom(const MEDFileAnyTypeField1TSWithoutSDA& other);
- public:
- MEDLOADER_EXPORT int getNumberOfComponents() const;
- MEDLOADER_EXPORT const std::vector<std::string>& getInfo() const;
- MEDLOADER_EXPORT std::vector<std::string>& getInfo();
- MEDLOADER_EXPORT bool presenceOfMultiDiscPerGeoType() const;
- MEDLOADER_EXPORT void setInfo(const std::vector<std::string>& infos);
- MEDLOADER_EXPORT std::size_t getHeapMemorySizeWithoutChildren() const;
- MEDLOADER_EXPORT std::vector<const BigMemoryObject *> getDirectChildrenWithNull() const;
- MEDLOADER_EXPORT int copyTinyInfoFrom(const MEDCouplingFieldDouble *field, const DataArray *arr);
- MEDLOADER_EXPORT void setFieldNoProfileSBT(const MEDCouplingFieldDouble *field, const DataArray *arr, MEDFileFieldGlobsReal& glob, const MEDFileFieldNameScope& nasc);
- MEDLOADER_EXPORT void setFieldProfile(const MEDCouplingFieldDouble *field, const DataArray *arrOfVals, const MEDFileMesh *mesh, int meshDimRelToMax, const DataArrayInt *profile, MEDFileFieldGlobsReal& glob, const MEDFileFieldNameScope& nasc);
- MEDLOADER_EXPORT virtual void simpleRepr(int bkOffset, std::ostream& oss, int f1tsId) const;
- MEDLOADER_EXPORT virtual MEDFileAnyTypeField1TSWithoutSDA *deepCpy() const = 0;
- MEDLOADER_EXPORT virtual MEDFileAnyTypeField1TSWithoutSDA *shallowCpy() const = 0;
- MEDLOADER_EXPORT virtual std::vector< MEDCouplingAutoRefCountObjectPtr<MEDFileAnyTypeField1TSWithoutSDA> > splitComponents() const;
- MEDLOADER_EXPORT virtual const char *getTypeStr() const = 0;
- MEDLOADER_EXPORT virtual DataArray *getUndergroundDataArray() const = 0;
- MEDLOADER_EXPORT virtual DataArray *getUndergroundDataArrayExt(std::vector< std::pair<std::pair<INTERP_KERNEL::NormalizedCellType,int>,std::pair<int,int> > >& entries) const = 0;
- MEDLOADER_EXPORT virtual void setArray(DataArray *arr) = 0;
- MEDLOADER_EXPORT virtual DataArray *createNewEmptyDataArrayInstance() const = 0;
- MEDLOADER_EXPORT virtual DataArray *getOrCreateAndGetArray() = 0;
- MEDLOADER_EXPORT virtual const DataArray *getOrCreateAndGetArray() const = 0;
- public:
- MEDLOADER_EXPORT MEDCouplingFieldDouble *getFieldAtLevel(TypeOfField type, int meshDimRelToMax, const std::string& mName, int renumPol, const MEDFileFieldGlobsReal *glob, MEDCouplingAutoRefCountObjectPtr<DataArray> &arrOut, const MEDFileFieldNameScope& nasc) const;
- MEDLOADER_EXPORT MEDCouplingFieldDouble *getFieldOnMeshAtLevel(TypeOfField type, int meshDimRelToMax, int renumPol, const MEDFileFieldGlobsReal *glob, const MEDFileMesh *mesh, MEDCouplingAutoRefCountObjectPtr<DataArray> &arrOut, const MEDFileFieldNameScope& nasc) const;
- MEDLOADER_EXPORT MEDCouplingFieldDouble *getFieldAtTopLevel(TypeOfField type, const std::string& mName, int renumPol, const MEDFileFieldGlobsReal *glob, MEDCouplingAutoRefCountObjectPtr<DataArray> &arrOut, const MEDFileFieldNameScope& nasc) const;
- MEDLOADER_EXPORT MEDCouplingFieldDouble *getFieldOnMeshAtLevel(TypeOfField type, int renumPol, const MEDFileFieldGlobsReal *glob, const MEDCouplingMesh *mesh, const DataArrayInt *cellRenum, const DataArrayInt *nodeRenum, MEDCouplingAutoRefCountObjectPtr<DataArray> &arrOut, const MEDFileFieldNameScope& nasc) const;
- DataArray *getFieldWithProfile(TypeOfField type, int meshDimRelToMax, const MEDFileMesh *mesh, DataArrayInt *&pfl, const MEDFileFieldGlobsReal *glob, const MEDFileFieldNameScope& nasc) const;
- public:
- MEDLOADER_EXPORT bool renumberEntitiesLyingOnMesh(const std::string& meshName, const std::vector<int>& oldCode, const std::vector<int>& newCode, const DataArrayInt *renumO2N, MEDFileFieldGlobsReal& glob);
- MEDLOADER_EXPORT std::vector< MEDCouplingAutoRefCountObjectPtr<MEDFileAnyTypeField1TSWithoutSDA> > splitDiscretizations() const;
- MEDLOADER_EXPORT std::vector< MEDCouplingAutoRefCountObjectPtr<MEDFileAnyTypeField1TSWithoutSDA> > splitMultiDiscrPerGeoTypes() const;
- MEDLOADER_EXPORT int keepOnlySpatialDiscretization(TypeOfField tof, std::vector< std::pair<int,int> >& its);
- MEDLOADER_EXPORT int keepOnlyGaussDiscretization(std::size_t idOfDisc, std::vector< std::pair<int,int> >& its);
- public:
- MEDLOADER_EXPORT void allocNotFromFile(int newNbOfTuples);
- MEDLOADER_EXPORT bool allocIfNecessaryTheArrayToReceiveDataFromFile();
- MEDLOADER_EXPORT void loadOnlyStructureOfDataRecursively(med_idt fid, const MEDFileFieldNameScope& nasc, const MEDFileMeshes *ms, const std::vector< std::pair<TypeOfField,INTERP_KERNEL::NormalizedCellType> > *entities);
- MEDLOADER_EXPORT void loadBigArraysRecursively(med_idt fid, const MEDFileFieldNameScope& nasc);
- MEDLOADER_EXPORT void loadBigArraysRecursivelyIfNecessary(med_idt fid, const MEDFileFieldNameScope& nasc);
- MEDLOADER_EXPORT void loadStructureAndBigArraysRecursively(med_idt fid, const MEDFileFieldNameScope& nasc, const MEDFileMeshes *ms, const std::vector< std::pair<TypeOfField,INTERP_KERNEL::NormalizedCellType> > *entities);
- MEDLOADER_EXPORT void unloadArrays();
- MEDLOADER_EXPORT void writeLL(med_idt fid, const MEDFileWritable& opts, const MEDFileFieldNameScope& nasc) const;
- protected:
- int getMeshIdFromMeshName(const std::string& mName) const;
- int addNewEntryIfNecessary(const MEDCouplingMesh *mesh);
- void updateData(int newLgth, const std::vector< std::pair<int,int> >& oldStartStops);
- protected:
- std::vector< MEDCouplingAutoRefCountObjectPtr< MEDFileFieldPerMesh > > _field_per_mesh;
- int _iteration;
- int _order;
- double _dt;
- public:
- //! only useable on reading
- mutable int _csit;
- // -3 means allocated and build from scratch
- // -2 means allocated and read from a file
- // -1 means not allocated and build from scratch
- // >=0 means not allocated and read from a file
- mutable int _nb_of_tuples_to_be_allocated;
- };
-
- class MEDFileIntField1TSWithoutSDA;
-
- /*!
- * SDA is for Shared Data Arrays such as profiles.
- */
- class MEDFileField1TSWithoutSDA : public MEDFileAnyTypeField1TSWithoutSDA
- {
- public:
- MEDLOADER_EXPORT const char *getTypeStr() const;
- MEDLOADER_EXPORT DataArray *getUndergroundDataArray() const;
- MEDLOADER_EXPORT DataArray *getUndergroundDataArrayExt(std::vector< std::pair<std::pair<INTERP_KERNEL::NormalizedCellType,int>,std::pair<int,int> > >& entries) const;
- MEDLOADER_EXPORT DataArrayDouble *getUndergroundDataArrayDouble() const;
- MEDLOADER_EXPORT DataArrayDouble *getUndergroundDataArrayDoubleExt(std::vector< std::pair<std::pair<INTERP_KERNEL::NormalizedCellType,int>,std::pair<int,int> > >& entries) const;
- MEDLOADER_EXPORT std::vector< std::vector<DataArrayDouble *> > getFieldSplitedByType2(const std::string& mname, std::vector<INTERP_KERNEL::NormalizedCellType>& types, std::vector< std::vector<TypeOfField> >& typesF, std::vector< std::vector<std::string> >& pfls, std::vector< std::vector<std::string> >& locs) const;
- MEDLOADER_EXPORT static void CheckMeshDimRel(int meshDimRelToMax);
- MEDLOADER_EXPORT static std::vector<int> CheckSBTMesh(const MEDCouplingMesh *mesh);
- MEDLOADER_EXPORT static MEDFileField1TSWithoutSDA *New(const std::string& fieldName, int csit, int iteration, int order, const std::vector<std::string>& infos);
- public:
- MEDLOADER_EXPORT MEDFileField1TSWithoutSDA();
- MEDLOADER_EXPORT MEDFileField1TSWithoutSDA(const std::string& fieldName, int csit, int iteration, int order, const std::vector<std::string>& infos);
- MEDLOADER_EXPORT MEDFileAnyTypeField1TSWithoutSDA *shallowCpy() const;
- MEDLOADER_EXPORT MEDFileAnyTypeField1TSWithoutSDA *deepCpy() const;
- MEDLOADER_EXPORT void setArray(DataArray *arr);
- MEDLOADER_EXPORT DataArray *createNewEmptyDataArrayInstance() const;
- MEDLOADER_EXPORT DataArray *getOrCreateAndGetArray();
- MEDLOADER_EXPORT const DataArray *getOrCreateAndGetArray() const;
- MEDLOADER_EXPORT DataArrayDouble *getOrCreateAndGetArrayDouble();
- MEDLOADER_EXPORT const DataArrayDouble *getOrCreateAndGetArrayDouble() const;
- MEDLOADER_EXPORT MEDFileIntField1TSWithoutSDA *convertToInt() const;
- protected:
- MEDCouplingAutoRefCountObjectPtr< DataArrayDouble > _arr;
- public:
- static const char TYPE_STR[];
- };
-
- /*!
- * SDA is for Shared Data Arrays such as profiles.
- */
- class MEDFileIntField1TSWithoutSDA : public MEDFileAnyTypeField1TSWithoutSDA
- {
- public:
- MEDLOADER_EXPORT MEDFileIntField1TSWithoutSDA();
- MEDLOADER_EXPORT static MEDFileIntField1TSWithoutSDA *New(const std::string& fieldName, int csit, int iteration, int order, const std::vector<std::string>& infos);
- MEDLOADER_EXPORT MEDFileAnyTypeField1TSWithoutSDA *deepCpy() const;
- MEDLOADER_EXPORT MEDFileAnyTypeField1TSWithoutSDA *shallowCpy() const;
- MEDLOADER_EXPORT const char *getTypeStr() const;
- MEDLOADER_EXPORT DataArray *getUndergroundDataArray() const;
- MEDLOADER_EXPORT DataArray *getUndergroundDataArrayExt(std::vector< std::pair<std::pair<INTERP_KERNEL::NormalizedCellType,int>,std::pair<int,int> > >& entries) const;
- MEDLOADER_EXPORT void setArray(DataArray *arr);
- MEDLOADER_EXPORT DataArray *createNewEmptyDataArrayInstance() const;
- MEDLOADER_EXPORT DataArray *getOrCreateAndGetArray();
- MEDLOADER_EXPORT const DataArray *getOrCreateAndGetArray() const;
- MEDLOADER_EXPORT DataArrayInt *getOrCreateAndGetArrayInt();
- MEDLOADER_EXPORT const DataArrayInt *getOrCreateAndGetArrayInt() const;
- MEDLOADER_EXPORT DataArrayInt *getUndergroundDataArrayInt() const;
- MEDLOADER_EXPORT DataArrayInt *getUndergroundDataArrayIntExt(std::vector< std::pair<std::pair<INTERP_KERNEL::NormalizedCellType,int>,std::pair<int,int> > >& entries) const;
- MEDLOADER_EXPORT MEDFileField1TSWithoutSDA *convertToDouble() const;
- protected:
- MEDFileIntField1TSWithoutSDA(const std::string& fieldName, int csit, int iteration, int order, const std::vector<std::string>& infos);
- protected:
- MEDCouplingAutoRefCountObjectPtr< DataArrayInt > _arr;
- public:
- MEDLOADER_EXPORT static const char TYPE_STR[];
- };
-
- /*!
- * User class.
- */
- class MEDFileAnyTypeField1TS : public RefCountObject, public MEDFileWritable, public MEDFileFieldGlobsReal
- {
- protected:
- MEDLOADER_EXPORT MEDFileAnyTypeField1TS();
- MEDLOADER_EXPORT MEDFileAnyTypeField1TS(const std::string& fileName, bool loadAll, const MEDFileMeshes *ms);
- MEDLOADER_EXPORT MEDFileAnyTypeField1TS(const std::string& fileName, const std::string& fieldName, bool loadAll, const MEDFileMeshes *ms);
- MEDLOADER_EXPORT MEDFileAnyTypeField1TS(const std::string& fileName, const std::string& fieldName, int iteration, int order, bool loadAll, const MEDFileMeshes *ms);
- MEDLOADER_EXPORT MEDFileAnyTypeField1TS(const MEDFileAnyTypeField1TSWithoutSDA& other, bool shallowCopyOfContent);
- MEDLOADER_EXPORT static MEDFileAnyTypeField1TS *BuildNewInstanceFromContent(MEDFileAnyTypeField1TSWithoutSDA *c, const std::string& fileName);
- MEDLOADER_EXPORT static MEDFileAnyTypeField1TSWithoutSDA *BuildContentFrom(med_idt fid, const std::string& fileName, bool loadAll, const MEDFileMeshes *ms);
- MEDLOADER_EXPORT static MEDFileAnyTypeField1TSWithoutSDA *BuildContentFrom(med_idt fid, const std::string& fileName, const std::string& fieldName, bool loadAll, const MEDFileMeshes *ms);
- MEDLOADER_EXPORT static MEDFileAnyTypeField1TSWithoutSDA *BuildContentFrom(med_idt fid, const std::string& fileName, const std::string& fieldName, int iteration, int order, bool loadAll, const MEDFileMeshes *ms);
- MEDLOADER_EXPORT void writeLL(med_idt fid) const;
- // direct forwarding to MEDFileAnyTypeField1TSWithoutSDA instance _content
- public:
- MEDLOADER_EXPORT static MEDFileAnyTypeField1TS *New(const std::string& fileName, bool loadAll=true);
- MEDLOADER_EXPORT static MEDFileAnyTypeField1TS *New(const std::string& fileName, const std::string& fieldName, bool loadAll=true);
- MEDLOADER_EXPORT static MEDFileAnyTypeField1TS *New(const std::string& fileName, const std::string& fieldName, int iteration, int order, bool loadAll=true);
- MEDLOADER_EXPORT int getDimension() const;
- MEDLOADER_EXPORT int getIteration() const;
- MEDLOADER_EXPORT int getOrder() const;
- MEDLOADER_EXPORT double getTime(int& iteration, int& order) const;
- MEDLOADER_EXPORT void setTime(int iteration, int order, double val);
- MEDLOADER_EXPORT std::string getName() const;
- MEDLOADER_EXPORT void setName(const std::string& name);
- MEDLOADER_EXPORT std::string simpleRepr() const;
- MEDLOADER_EXPORT void simpleRepr(int bkOffset, std::ostream& oss, int f1tsId) const;
- MEDLOADER_EXPORT std::string getDtUnit() const;
- MEDLOADER_EXPORT void setDtUnit(const std::string& dtUnit);
- MEDLOADER_EXPORT std::string getMeshName() const;
- MEDLOADER_EXPORT void setMeshName(const std::string& newMeshName);
- MEDLOADER_EXPORT bool changeMeshNames(const std::vector< std::pair<std::string,std::string> >& modifTab);
- MEDLOADER_EXPORT int getMeshIteration() const;
- MEDLOADER_EXPORT int getMeshOrder() const;
- MEDLOADER_EXPORT int getNumberOfComponents() const;
- MEDLOADER_EXPORT bool isDealingTS(int iteration, int order) const;
- MEDLOADER_EXPORT std::pair<int,int> getDtIt() const;
- MEDLOADER_EXPORT void fillIteration(std::pair<int,int>& p) const;
- MEDLOADER_EXPORT void fillTypesOfFieldAvailable(std::vector<TypeOfField>& types) const;
- MEDLOADER_EXPORT void setInfo(const std::vector<std::string>& infos);
- MEDLOADER_EXPORT const std::vector<std::string>& getInfo() const;
- MEDLOADER_EXPORT std::vector<std::string>& getInfo();
- MEDLOADER_EXPORT bool presenceOfMultiDiscPerGeoType() const;
- MEDLOADER_EXPORT std::vector<TypeOfField> getTypesOfFieldAvailable() const;
- MEDLOADER_EXPORT std::vector< std::vector<std::pair<int,int> > > getFieldSplitedByType(const std::string& mname, std::vector<INTERP_KERNEL::NormalizedCellType>& types, std::vector< std::vector<TypeOfField> >& typesF,
- std::vector< std::vector<std::string> >& pfls, std::vector< std::vector<std::string> >& locs) const;
- MEDLOADER_EXPORT MEDFileFieldPerMeshPerTypePerDisc *getLeafGivenMeshAndTypeAndLocId(const std::string& mName, INTERP_KERNEL::NormalizedCellType typ, int locId);
- MEDLOADER_EXPORT const MEDFileFieldPerMeshPerTypePerDisc *getLeafGivenMeshAndTypeAndLocId(const std::string& mName, INTERP_KERNEL::NormalizedCellType typ, int locId) const;
- MEDLOADER_EXPORT int getNonEmptyLevels(const std::string& mname, std::vector<int>& levs) const;
- public:
- MEDLOADER_EXPORT void write(const std::string& fileName, int mode) const;
- MEDLOADER_EXPORT void loadArrays();
- MEDLOADER_EXPORT void loadArraysIfNecessary();
- MEDLOADER_EXPORT void unloadArrays();
- MEDLOADER_EXPORT void unloadArraysWithoutDataLoss();
- MEDLOADER_EXPORT std::vector< MEDCouplingAutoRefCountObjectPtr< MEDFileAnyTypeField1TS > > splitComponents() const;
- MEDLOADER_EXPORT std::vector< MEDCouplingAutoRefCountObjectPtr< MEDFileAnyTypeField1TS > > splitDiscretizations() const;
- MEDLOADER_EXPORT std::vector< MEDCouplingAutoRefCountObjectPtr< MEDFileAnyTypeField1TS > > splitMultiDiscrPerGeoTypes() const;
- MEDLOADER_EXPORT MEDFileAnyTypeField1TS *deepCpy() const;
- MEDLOADER_EXPORT int copyTinyInfoFrom(const MEDCouplingFieldDouble *field, const DataArray *arr);
- MEDLOADER_EXPORT virtual MEDFileAnyTypeField1TS *shallowCpy() const = 0;
- public:
- //! underground method see MEDFileField1TSWithoutSDA::setProfileNameOnLeaf
- MEDLOADER_EXPORT void setProfileNameOnLeaf(const std::string& mName, INTERP_KERNEL::NormalizedCellType typ, int locId, const std::string& newPflName, bool forceRenameOnGlob=false);
- //! underground method see MEDFileField1TSWithoutSDA::setLocNameOnLeaf
- MEDLOADER_EXPORT void setLocNameOnLeaf(const std::string& mName, INTERP_KERNEL::NormalizedCellType typ, int locId, const std::string& newLocName, bool forceRenameOnGlob=false);
- MEDLOADER_EXPORT std::size_t getHeapMemorySizeWithoutChildren() const;
- MEDLOADER_EXPORT std::vector<const BigMemoryObject *> getDirectChildrenWithNull() const;
- MEDLOADER_EXPORT std::vector<std::string> getPflsReallyUsed() const;
- MEDLOADER_EXPORT std::vector<std::string> getLocsReallyUsed() const;
- MEDLOADER_EXPORT std::vector<std::string> getPflsReallyUsedMulti() const;
- MEDLOADER_EXPORT std::vector<std::string> getLocsReallyUsedMulti() const;
- MEDLOADER_EXPORT void changePflsRefsNamesGen(const std::vector< std::pair<std::vector<std::string>, std::string > >& mapOfModif);
- MEDLOADER_EXPORT void changeLocsRefsNamesGen(const std::vector< std::pair<std::vector<std::string>, std::string > >& mapOfModif);
- public:
- MEDLOADER_EXPORT static int LocateField2(med_idt fid, const std::string& fileName, int fieldIdCFormat, bool checkFieldId, std::string& fieldName, med_field_type& typcha, std::vector<std::string>& infos, std::string& dtunitOut);
- MEDLOADER_EXPORT static int LocateField(med_idt fid, const std::string& fileName, const std::string& fieldName, int& posCFormat, med_field_type& typcha, std::vector<std::string>& infos, std::string& dtunitOut);
- public:
- MEDLOADER_EXPORT virtual med_field_type getMEDFileFieldType() const = 0;
- MEDLOADER_EXPORT MEDFileAnyTypeField1TSWithoutSDA *contentNotNullBase();
- MEDLOADER_EXPORT const MEDFileAnyTypeField1TSWithoutSDA *contentNotNullBase() const;
- protected:
- MEDCouplingAutoRefCountObjectPtr<MEDFileAnyTypeField1TSWithoutSDA> _content;
- };
-
- class MEDFileIntField1TS;
-
- /*!
- * User class.
- */
- class MEDFileField1TS : public MEDFileAnyTypeField1TS
- {
- public:
- MEDLOADER_EXPORT static MEDFileField1TS *New(const std::string& fileName, bool loadAll=true);
- MEDLOADER_EXPORT static MEDFileField1TS *New(const std::string& fileName, const std::string& fieldName, bool loadAll=true);
- MEDLOADER_EXPORT static MEDFileField1TS *New(const std::string& fileName, const std::string& fieldName, int iteration, int order, bool loadAll=true);
- MEDLOADER_EXPORT static MEDFileField1TS *New(const MEDFileField1TSWithoutSDA& other, bool shallowCopyOfContent);
- MEDLOADER_EXPORT static MEDFileField1TS *New();
- MEDLOADER_EXPORT MEDFileIntField1TS *convertToInt(bool isDeepCpyGlobs=true) const;
- //
- MEDLOADER_EXPORT MEDCouplingFieldDouble *getFieldAtLevel(TypeOfField type, int meshDimRelToMax, int renumPol=0) const;
- MEDLOADER_EXPORT MEDCouplingFieldDouble *getFieldAtTopLevel(TypeOfField type, int renumPol=0) const;
- MEDLOADER_EXPORT MEDCouplingFieldDouble *getFieldOnMeshAtLevel(TypeOfField type, int meshDimRelToMax, const MEDFileMesh *mesh, int renumPol=0) const;
- MEDLOADER_EXPORT MEDCouplingFieldDouble *getFieldOnMeshAtLevel(TypeOfField type, const MEDCouplingMesh *mesh, int renumPol=0) const;
- MEDLOADER_EXPORT MEDCouplingFieldDouble *getFieldAtLevelOld(TypeOfField type, const std::string& mname, int meshDimRelToMax, int renumPol=0) const;
- MEDLOADER_EXPORT DataArrayDouble *getFieldWithProfile(TypeOfField type, int meshDimRelToMax, const MEDFileMesh *mesh, DataArrayInt *&pfl) const;
- //
- MEDLOADER_EXPORT void setFieldNoProfileSBT(const MEDCouplingFieldDouble *field);
- MEDLOADER_EXPORT void setFieldProfile(const MEDCouplingFieldDouble *field, const MEDFileMesh *mesh, int meshDimRelToMax, const DataArrayInt *profile);
- // direct forwarding to MEDFileField1TSWithoutSDA instance _content
- public:
- MEDLOADER_EXPORT MEDFileAnyTypeField1TS *shallowCpy() const;
- MEDLOADER_EXPORT DataArrayDouble *getUndergroundDataArray() const;
- MEDLOADER_EXPORT DataArrayDouble *getUndergroundDataArrayExt(std::vector< std::pair<std::pair<INTERP_KERNEL::NormalizedCellType,int>,std::pair<int,int> > >& entries) const;
-
- MEDLOADER_EXPORT std::vector< std::vector<DataArrayDouble *> > getFieldSplitedByType2(const std::string& mname, std::vector<INTERP_KERNEL::NormalizedCellType>& types, std::vector< std::vector<TypeOfField> >& typesF,
- std::vector< std::vector<std::string> >& pfls, std::vector< std::vector<std::string> >& locs) const;
- public:
- MEDLOADER_EXPORT static void SetDataArrayDoubleInField(MEDCouplingFieldDouble *f, MEDCouplingAutoRefCountObjectPtr<DataArray>& arr);
- MEDLOADER_EXPORT static DataArrayDouble *ReturnSafelyDataArrayDouble(MEDCouplingAutoRefCountObjectPtr<DataArray>& arr);
- private:
- med_field_type getMEDFileFieldType() const { return MED_FLOAT64; }
- const MEDFileField1TSWithoutSDA *contentNotNull() const;
- MEDFileField1TSWithoutSDA *contentNotNull();
- private:
- ~MEDFileField1TS() { }
- MEDFileField1TS(const std::string& fileName, bool loadAll, const MEDFileMeshes *ms);
- MEDFileField1TS(const std::string& fileName, const std::string& fieldName, bool loadAll, const MEDFileMeshes *ms);
- MEDFileField1TS(const std::string& fileName, const std::string& fieldName, int iteration, int order, bool loadAll, const MEDFileMeshes *ms);
- MEDFileField1TS(const MEDFileField1TSWithoutSDA& other, bool shallowCopyOfContent);
- MEDFileField1TS();
- };
-
- class MEDFileIntField1TS : public MEDFileAnyTypeField1TS
- {
- public:
- MEDLOADER_EXPORT static MEDFileIntField1TS *New();
- MEDLOADER_EXPORT static MEDFileIntField1TS *New(const std::string& fileName, bool loadAll=true);
- MEDLOADER_EXPORT static MEDFileIntField1TS *New(const std::string& fileName, const std::string& fieldName, bool loadAll=true);
- MEDLOADER_EXPORT static MEDFileIntField1TS *New(const std::string& fileName, const std::string& fieldName, int iteration, int order, bool loadAll=true);
- MEDLOADER_EXPORT static MEDFileIntField1TS *New(const MEDFileIntField1TSWithoutSDA& other, bool shallowCopyOfContent);
- MEDLOADER_EXPORT MEDFileField1TS *convertToDouble(bool isDeepCpyGlobs=true) const;
- MEDLOADER_EXPORT MEDFileAnyTypeField1TS *shallowCpy() const;
- //
- MEDLOADER_EXPORT MEDCouplingFieldDouble *getFieldAtLevel(TypeOfField type, int meshDimRelToMax, DataArrayInt* &arrOut, int renumPol=0) const;
- MEDLOADER_EXPORT MEDCouplingFieldDouble *getFieldAtTopLevel(TypeOfField type, DataArrayInt* &arrOut, int renumPol=0) const;
- MEDLOADER_EXPORT MEDCouplingFieldDouble *getFieldOnMeshAtLevel(TypeOfField type, int meshDimRelToMax, const MEDFileMesh *mesh, DataArrayInt* &arrOut, int renumPol=0) const;
- MEDLOADER_EXPORT MEDCouplingFieldDouble *getFieldOnMeshAtLevel(TypeOfField type, const MEDCouplingMesh *mesh, DataArrayInt* &arrOut, int renumPol=0) const;
- MEDLOADER_EXPORT MEDCouplingFieldDouble *getFieldAtLevelOld(TypeOfField type, const std::string& mname, int meshDimRelToMax, DataArrayInt* &arrOut, int renumPol=0) const;
- MEDLOADER_EXPORT DataArrayInt *getFieldWithProfile(TypeOfField type, int meshDimRelToMax, const MEDFileMesh *mesh, DataArrayInt *&pfl) const;
- //
- MEDLOADER_EXPORT void setFieldNoProfileSBT(const MEDCouplingFieldDouble *field, const DataArrayInt *arrOfVals);
- MEDLOADER_EXPORT void setFieldProfile(const MEDCouplingFieldDouble *field, const DataArrayInt *arrOfVals, const MEDFileMesh *mesh, int meshDimRelToMax, const DataArrayInt *profile);
- MEDLOADER_EXPORT DataArrayInt *getUndergroundDataArray() const;
- public:
- MEDLOADER_EXPORT static DataArrayInt *ReturnSafelyDataArrayInt(MEDCouplingAutoRefCountObjectPtr<DataArray>& arr);
- private:
- med_field_type getMEDFileFieldType() const { return MED_INT32; }
- const MEDFileIntField1TSWithoutSDA *contentNotNull() const;
- MEDFileIntField1TSWithoutSDA *contentNotNull();
- private:
- ~MEDFileIntField1TS() { }
- MEDFileIntField1TS();
- MEDFileIntField1TS(const std::string& fileName, bool loadAll, const MEDFileMeshes *ms);
- MEDFileIntField1TS(const std::string& fileName, const std::string& fieldName, bool loadAll, const MEDFileMeshes *ms);
- MEDFileIntField1TS(const std::string& fileName, const std::string& fieldName, int iteration, int order, bool loadAll, const MEDFileMeshes *ms);
- MEDFileIntField1TS(const MEDFileIntField1TSWithoutSDA& other, bool shallowCopyOfContent);
- };
-
- class MEDFileAnyTypeFieldMultiTSWithoutSDA : public RefCountObject, public MEDFileFieldNameScope
- {
- protected:
- MEDFileAnyTypeFieldMultiTSWithoutSDA();
- MEDFileAnyTypeFieldMultiTSWithoutSDA(const std::string& fieldName);
- MEDFileAnyTypeFieldMultiTSWithoutSDA(med_idt fid, int fieldId, bool loadAll, const MEDFileMeshes *ms, const std::vector< std::pair<TypeOfField,INTERP_KERNEL::NormalizedCellType> > *entities);
- MEDFileAnyTypeFieldMultiTSWithoutSDA(med_idt fid, const std::string& fieldName, med_field_type fieldTyp, const std::vector<std::string>& infos, int nbOfStep, const std::string& dtunit, bool loadAll, const MEDFileMeshes *ms, const std::vector< std::pair<TypeOfField,INTERP_KERNEL::NormalizedCellType> > *entities);
- public:
- MEDLOADER_EXPORT std::size_t getHeapMemorySizeWithoutChildren() const;
- MEDLOADER_EXPORT std::vector<const BigMemoryObject *> getDirectChildrenWithNull() const;
- MEDLOADER_EXPORT virtual MEDFileAnyTypeFieldMultiTSWithoutSDA *deepCpy() const;
- MEDLOADER_EXPORT virtual std::vector< MEDCouplingAutoRefCountObjectPtr<MEDFileAnyTypeFieldMultiTSWithoutSDA> > splitComponents() const;
- MEDLOADER_EXPORT virtual std::vector< MEDCouplingAutoRefCountObjectPtr<MEDFileAnyTypeFieldMultiTSWithoutSDA> > splitDiscretizations() const;
- MEDLOADER_EXPORT virtual std::vector< MEDCouplingAutoRefCountObjectPtr<MEDFileAnyTypeFieldMultiTSWithoutSDA> > splitMultiDiscrPerGeoTypes() const;
- MEDLOADER_EXPORT virtual const char *getTypeStr() const = 0;
- MEDLOADER_EXPORT virtual MEDFileAnyTypeFieldMultiTSWithoutSDA *shallowCpy() const = 0;
- MEDLOADER_EXPORT virtual MEDFileAnyTypeFieldMultiTSWithoutSDA *createNew() const = 0;
- MEDLOADER_EXPORT virtual MEDFileAnyTypeField1TSWithoutSDA *createNew1TSWithoutSDAEmptyInstance() const = 0;
- MEDLOADER_EXPORT virtual void checkCoherencyOfType(const MEDFileAnyTypeField1TSWithoutSDA *f1ts) const = 0;
- MEDLOADER_EXPORT const std::vector<std::string>& getInfo() const;
- MEDLOADER_EXPORT bool presenceOfMultiDiscPerGeoType() const;
- MEDLOADER_EXPORT void setInfo(const std::vector<std::string>& info);
- MEDLOADER_EXPORT int getTimeStepPos(int iteration, int order) const;
- MEDLOADER_EXPORT const MEDFileAnyTypeField1TSWithoutSDA& getTimeStepEntry(int iteration, int order) const;
- MEDLOADER_EXPORT MEDFileAnyTypeField1TSWithoutSDA& getTimeStepEntry(int iteration, int order);
- MEDLOADER_EXPORT std::string getMeshName() const;
- MEDLOADER_EXPORT void setMeshName(const std::string& newMeshName);
- MEDLOADER_EXPORT bool changeMeshNames(const std::vector< std::pair<std::string,std::string> >& modifTab);
- MEDLOADER_EXPORT int getNumberOfTS() const;
- MEDLOADER_EXPORT void eraseEmptyTS();
- MEDLOADER_EXPORT void eraseTimeStepIds(const int *startIds, const int *endIds);
- MEDLOADER_EXPORT void eraseTimeStepIds2(int bg, int end, int step);
- MEDLOADER_EXPORT MEDFileAnyTypeFieldMultiTSWithoutSDA *buildFromTimeStepIds(const int *startIds, const int *endIds) const;
- MEDLOADER_EXPORT MEDFileAnyTypeFieldMultiTSWithoutSDA *buildFromTimeStepIds2(int bg, int end, int step) const;
- MEDLOADER_EXPORT MEDFileAnyTypeFieldMultiTSWithoutSDA *partOfThisLyingOnSpecifiedTimeSteps(const std::vector< std::pair<int,int> >& timeSteps) const;
- MEDLOADER_EXPORT MEDFileAnyTypeFieldMultiTSWithoutSDA *partOfThisNotLyingOnSpecifiedTimeSteps(const std::vector< std::pair<int,int> >& timeSteps) const;
- MEDLOADER_EXPORT int getPosOfTimeStep(int iteration, int order) const;
- MEDLOADER_EXPORT int getPosGivenTime(double time, double eps=1e-8) const;
- MEDLOADER_EXPORT std::vector< std::pair<int,int> > getIterations() const;
- MEDLOADER_EXPORT std::vector< std::pair<int,int> > getTimeSteps(std::vector<double>& ret1) const;
- MEDLOADER_EXPORT void pushBackTimeStep(MEDCouplingAutoRefCountObjectPtr<MEDFileAnyTypeField1TSWithoutSDA>& tse);
- MEDLOADER_EXPORT void synchronizeNameScope();
- MEDLOADER_EXPORT void simpleRepr(int bkOffset, std::ostream& oss, int fmtsId) const;
- MEDLOADER_EXPORT int getNonEmptyLevels(int iteration, int order, const std::string& mname, std::vector<int>& levs) const;
- MEDLOADER_EXPORT void appendFieldNoProfileSBT(const MEDCouplingFieldDouble *field, const DataArray *arr, MEDFileFieldGlobsReal& glob);
- MEDLOADER_EXPORT void appendFieldProfile(const MEDCouplingFieldDouble *field, const DataArray *arr, const MEDFileMesh *mesh, int meshDimRelToMax, const DataArrayInt *profile, MEDFileFieldGlobsReal& glob);
- MEDLOADER_EXPORT std::vector< std::vector< std::pair<int,int> > > getFieldSplitedByType(int iteration, int order, const std::string& mname, std::vector<INTERP_KERNEL::NormalizedCellType>& types, std::vector< std::vector<TypeOfField> >& typesF, std::vector< std::vector<std::string> >& pfls, std::vector< std::vector<std::string> >& locs) const;
- MEDLOADER_EXPORT std::vector< std::vector<TypeOfField> > getTypesOfFieldAvailable() const;
- MEDLOADER_EXPORT DataArray *getUndergroundDataArray(int iteration, int order) const;
- MEDLOADER_EXPORT DataArray *getUndergroundDataArrayExt(int iteration, int order, std::vector< std::pair<std::pair<INTERP_KERNEL::NormalizedCellType,int>,std::pair<int,int> > >& entries) const;
- MEDLOADER_EXPORT bool renumberEntitiesLyingOnMesh(const std::string& meshName, const std::vector<int>& oldCode, const std::vector<int>& newCode, const DataArrayInt *renumO2N, MEDFileFieldGlobsReal& glob);
- MEDLOADER_EXPORT void loadStructureOrStructureAndBigArraysRecursively(med_idt fid, int nbPdt, med_field_type fieldTyp, bool loadAll, const MEDFileMeshes *ms, const std::vector< std::pair<TypeOfField,INTERP_KERNEL::NormalizedCellType> > *entities);
- MEDLOADER_EXPORT void writeLL(med_idt fid, const MEDFileWritable& opts) const;
- MEDLOADER_EXPORT void loadBigArraysRecursively(med_idt fid, const MEDFileFieldNameScope& nasc);
- MEDLOADER_EXPORT void loadBigArraysRecursivelyIfNecessary(med_idt fid, const MEDFileFieldNameScope& nasc);
- MEDLOADER_EXPORT void unloadArrays();
- public:
- MEDLOADER_EXPORT const MEDFileAnyTypeField1TSWithoutSDA *getTimeStepAtPos2(int pos) const;
- MEDLOADER_EXPORT MEDFileAnyTypeField1TSWithoutSDA *getTimeStepAtPos2(int pos);
- MEDLOADER_EXPORT std::vector<std::string> getPflsReallyUsed2() const;
- MEDLOADER_EXPORT std::vector<std::string> getLocsReallyUsed2() const;
- MEDLOADER_EXPORT std::vector<std::string> getPflsReallyUsedMulti2() const;
- MEDLOADER_EXPORT std::vector<std::string> getLocsReallyUsedMulti2() const;
- MEDLOADER_EXPORT void changePflsRefsNamesGen2(const std::vector< std::pair<std::vector<std::string>, std::string > >& mapOfModif);
- MEDLOADER_EXPORT void changeLocsRefsNamesGen2(const std::vector< std::pair<std::vector<std::string>, std::string > >& mapOfModif);
- MEDLOADER_EXPORT void setIteration(int i, MEDCouplingAutoRefCountObjectPtr<MEDFileAnyTypeField1TSWithoutSDA> ts);
- protected:
- virtual med_field_type getMEDFileFieldType() const = 0;
- void copyTinyInfoFrom(const MEDCouplingFieldDouble *field, const DataArray *arr);
- void checkCoherencyOfTinyInfo(const MEDCouplingFieldDouble *field, const DataArray *arr) const;
- void checkThatComponentsMatch(const std::vector<std::string>& compos) const;
- void checkThatNbOfCompoOfTSMatchThis() const;
- protected:
- std::vector<std::string> _infos;
- std::vector< MEDCouplingAutoRefCountObjectPtr<MEDFileAnyTypeField1TSWithoutSDA> > _time_steps;
- };
-
- class MEDFileIntFieldMultiTSWithoutSDA;
-
- class MEDFileFieldMultiTSWithoutSDA : public MEDFileAnyTypeFieldMultiTSWithoutSDA
- {
- public:
- MEDLOADER_EXPORT static MEDFileFieldMultiTSWithoutSDA *New(med_idt fid, const std::string& fieldName, med_field_type fieldTyp, const std::vector<std::string>& infos, int nbOfStep, const std::string& dtunit, bool loadAll, const MEDFileMeshes *ms, const std::vector< std::pair<TypeOfField,INTERP_KERNEL::NormalizedCellType> > *entities);
- MEDLOADER_EXPORT MEDFileFieldMultiTSWithoutSDA(med_idt fid, int fieldId, bool loadAll, const MEDFileMeshes *ms, const std::vector< std::pair<TypeOfField,INTERP_KERNEL::NormalizedCellType> > *entities);
- MEDLOADER_EXPORT const char *getTypeStr() const;
- MEDLOADER_EXPORT MEDFileAnyTypeFieldMultiTSWithoutSDA *shallowCpy() const;
- MEDLOADER_EXPORT MEDFileAnyTypeFieldMultiTSWithoutSDA *createNew() const;
- MEDLOADER_EXPORT std::vector< std::vector<DataArrayDouble *> > getFieldSplitedByType2(int iteration, int order, const std::string& mname, std::vector<INTERP_KERNEL::NormalizedCellType>& types, std::vector< std::vector<TypeOfField> >& typesF, std::vector< std::vector<std::string> >& pfls, std::vector< std::vector<std::string> >& locs) const;
- MEDLOADER_EXPORT MEDFileIntFieldMultiTSWithoutSDA *convertToInt() const;
- protected:
- MEDFileFieldMultiTSWithoutSDA(const std::string& fieldName);
- MEDFileFieldMultiTSWithoutSDA(med_idt fid, const std::string& fieldName, med_field_type fieldTyp, const std::vector<std::string>& infos, int nbOfStep, const std::string& dtunit, bool loadAll, const MEDFileMeshes *ms, const std::vector< std::pair<TypeOfField,INTERP_KERNEL::NormalizedCellType> > *entities);
- med_field_type getMEDFileFieldType() const { return MED_FLOAT64; }
- MEDFileAnyTypeField1TSWithoutSDA *createNew1TSWithoutSDAEmptyInstance() const;
- void checkCoherencyOfType(const MEDFileAnyTypeField1TSWithoutSDA *f1ts) const;
- public:
- MEDLOADER_EXPORT MEDFileFieldMultiTSWithoutSDA();
- };
-
- class MEDFileIntFieldMultiTSWithoutSDA : public MEDFileAnyTypeFieldMultiTSWithoutSDA
- {
- public:
- MEDLOADER_EXPORT static MEDFileIntFieldMultiTSWithoutSDA *New(med_idt fid, const std::string& fieldName, med_field_type fieldTyp, const std::vector<std::string>& infos, int nbOfStep, const std::string& dtunit, bool loadAll, const MEDFileMeshes *ms, const std::vector< std::pair<TypeOfField,INTERP_KERNEL::NormalizedCellType> > *entities);
- MEDLOADER_EXPORT MEDFileIntFieldMultiTSWithoutSDA(med_idt fid, int fieldId, bool loadAll, const MEDFileMeshes *ms, const std::vector< std::pair<TypeOfField,INTERP_KERNEL::NormalizedCellType> > *entities);
- MEDLOADER_EXPORT const char *getTypeStr() const;
- MEDLOADER_EXPORT MEDFileAnyTypeFieldMultiTSWithoutSDA *shallowCpy() const;
- MEDLOADER_EXPORT MEDFileAnyTypeFieldMultiTSWithoutSDA *createNew() const;
- MEDLOADER_EXPORT MEDFileFieldMultiTSWithoutSDA *convertToDouble() const;
- protected:
- MEDFileIntFieldMultiTSWithoutSDA(const std::string& fieldName);
- MEDFileIntFieldMultiTSWithoutSDA(med_idt fid, const std::string& fieldName, med_field_type fieldTyp, const std::vector<std::string>& infos, int nbOfStep, const std::string& dtunit, bool loadAll, const MEDFileMeshes *ms, const std::vector< std::pair<TypeOfField,INTERP_KERNEL::NormalizedCellType> > *entities);
- med_field_type getMEDFileFieldType() const { return MED_INT32; }
- MEDFileAnyTypeField1TSWithoutSDA *createNew1TSWithoutSDAEmptyInstance() const;
- void checkCoherencyOfType(const MEDFileAnyTypeField1TSWithoutSDA *f1ts) const;
- public:
- MEDLOADER_EXPORT MEDFileIntFieldMultiTSWithoutSDA();
- };
-
- class MEDFileAnyTypeFieldMultiTSIterator;
- class MEDFileFastCellSupportComparator;
- /*!
- * User class.
- */
- class MEDFileAnyTypeFieldMultiTS : public RefCountObject, public MEDFileWritable, public MEDFileFieldGlobsReal
- {
- protected:
- MEDFileAnyTypeFieldMultiTS();
- MEDFileAnyTypeFieldMultiTS(const std::string& fileName, bool loadAll, const MEDFileMeshes *ms);
- MEDFileAnyTypeFieldMultiTS(const std::string& fileName, const std::string& fieldName, bool loadAll, const MEDFileMeshes *ms, const std::vector< std::pair<TypeOfField,INTERP_KERNEL::NormalizedCellType> > *entities=0);
- MEDFileAnyTypeFieldMultiTS(const MEDFileAnyTypeFieldMultiTSWithoutSDA& other, bool shallowCopyOfContent);
- static MEDFileAnyTypeFieldMultiTS *BuildNewInstanceFromContent(MEDFileAnyTypeFieldMultiTSWithoutSDA *c, const std::string& fileName);
- static MEDFileAnyTypeFieldMultiTSWithoutSDA *BuildContentFrom(med_idt fid, const std::string& fileName, bool loadAll, const MEDFileMeshes *ms);
- static MEDFileAnyTypeFieldMultiTSWithoutSDA *BuildContentFrom(med_idt fid, const std::string& fileName, const std::string& fieldName, bool loadAll, const MEDFileMeshes *ms, const std::vector< std::pair<TypeOfField,INTERP_KERNEL::NormalizedCellType> > *entities);
- public:
- MEDLOADER_EXPORT static MEDFileAnyTypeFieldMultiTS *New(const std::string& fileName, bool loadAll=true);
- MEDLOADER_EXPORT static MEDFileAnyTypeFieldMultiTS *New(const std::string& fileName, const std::string& fieldName, bool loadAll=true);
- MEDLOADER_EXPORT void loadArrays();
- MEDLOADER_EXPORT void loadArraysIfNecessary();
- MEDLOADER_EXPORT void unloadArrays();
- MEDLOADER_EXPORT void unloadArraysWithoutDataLoss();
- MEDLOADER_EXPORT void write(const std::string& fileName, int mode) const;
- MEDLOADER_EXPORT void writeLL(med_idt fid) const;
- MEDLOADER_EXPORT std::size_t getHeapMemorySizeWithoutChildren() const;
- MEDLOADER_EXPORT std::vector<const BigMemoryObject *> getDirectChildrenWithNull() const;
- MEDLOADER_EXPORT virtual MEDFileAnyTypeFieldMultiTS *deepCpy() const;
- MEDLOADER_EXPORT std::vector< MEDCouplingAutoRefCountObjectPtr< MEDFileAnyTypeFieldMultiTS > > splitComponents() const;
- MEDLOADER_EXPORT std::vector< MEDCouplingAutoRefCountObjectPtr< MEDFileAnyTypeFieldMultiTS > > splitDiscretizations() const;
- MEDLOADER_EXPORT std::vector< MEDCouplingAutoRefCountObjectPtr< MEDFileAnyTypeFieldMultiTS > > splitMultiDiscrPerGeoTypes() const;
- MEDLOADER_EXPORT virtual MEDFileAnyTypeFieldMultiTS *shallowCpy() const = 0;
- MEDLOADER_EXPORT virtual void checkCoherencyOfType(const MEDFileAnyTypeField1TS *f1ts) const = 0;
- //
- MEDLOADER_EXPORT virtual MEDFileAnyTypeField1TS *getTimeStepAtPos(int pos) const = 0;
- MEDLOADER_EXPORT MEDFileAnyTypeField1TS *getTimeStep(int iteration, int order) const;
- MEDLOADER_EXPORT MEDFileAnyTypeField1TS *getTimeStepGivenTime(double time, double eps=1e-8) const;
- MEDLOADER_EXPORT static std::vector< std::vector<MEDFileAnyTypeFieldMultiTS *> > SplitIntoCommonTimeSeries(const std::vector<MEDFileAnyTypeFieldMultiTS *>& vectFMTS);
- MEDLOADER_EXPORT static std::vector< std::vector<MEDFileAnyTypeFieldMultiTS *> > SplitPerCommonSupport(const std::vector<MEDFileAnyTypeFieldMultiTS *>& vectFMTS, const MEDFileMesh *mesh, std::vector< MEDCouplingAutoRefCountObjectPtr<MEDFileFastCellSupportComparator> >& fsc);
- MEDLOADER_EXPORT static int CheckSupportAcrossTime(MEDFileAnyTypeFieldMultiTS *f0, MEDFileAnyTypeFieldMultiTS *f1, const MEDFileMesh *mesh, TypeOfField& tof0, TypeOfField& tof1);
- public:// direct forwarding to MEDFileField1TSWithoutSDA instance _content
- MEDLOADER_EXPORT std::string getName() const;
- MEDLOADER_EXPORT void setName(const std::string& name);
- MEDLOADER_EXPORT std::string getDtUnit() const;
- MEDLOADER_EXPORT void setDtUnit(const std::string& dtUnit);
- MEDLOADER_EXPORT std::string getMeshName() const;
- MEDLOADER_EXPORT void setMeshName(const std::string& newMeshName);
- MEDLOADER_EXPORT std::string simpleRepr() const;
- MEDLOADER_EXPORT void simpleRepr(int bkOffset, std::ostream& oss, int fmtsId) const;
- MEDLOADER_EXPORT int getNumberOfTS() const;
- MEDLOADER_EXPORT void eraseEmptyTS();
- MEDLOADER_EXPORT void eraseTimeStepIds(const int *startIds, const int *endIds);
- MEDLOADER_EXPORT void eraseTimeStepIds2(int bg, int end, int step);
- MEDLOADER_EXPORT MEDFileAnyTypeFieldMultiTS *buildSubPart(const int *startIds, const int *endIds) const;
- MEDLOADER_EXPORT MEDFileAnyTypeFieldMultiTS *buildSubPartSlice(int bg, int end, int step) const;
- MEDLOADER_EXPORT std::vector< std::pair<int,int> > getTimeSteps(std::vector<double>& ret1) const;
- MEDLOADER_EXPORT std::vector< std::pair<int,int> > getIterations() const;
- MEDLOADER_EXPORT void pushBackTimeSteps(const std::vector<MEDFileAnyTypeField1TS *>& f1ts);
- MEDLOADER_EXPORT void pushBackTimeStep(MEDFileAnyTypeField1TS *f1ts);
- MEDLOADER_EXPORT void synchronizeNameScope();
- MEDLOADER_EXPORT int getPosOfTimeStep(int iteration, int order) const;
- MEDLOADER_EXPORT int getPosGivenTime(double time, double eps=1e-8) const;
- MEDLOADER_EXPORT MEDFileAnyTypeFieldMultiTSIterator *iterator();
- MEDLOADER_EXPORT bool changeMeshNames(const std::vector< std::pair<std::string,std::string> >& modifTab);
- MEDLOADER_EXPORT const std::vector<std::string>& getInfo() const;
- MEDLOADER_EXPORT bool presenceOfMultiDiscPerGeoType() const;
- MEDLOADER_EXPORT void setInfo(const std::vector<std::string>& info);
- MEDLOADER_EXPORT int getNumberOfComponents() const;
- MEDLOADER_EXPORT int getNonEmptyLevels(int iteration, int order, const std::string& mname, std::vector<int>& levs) const;
- MEDLOADER_EXPORT std::vector< std::vector<TypeOfField> > getTypesOfFieldAvailable() const;
- MEDLOADER_EXPORT std::vector< std::vector< std::pair<int,int> > > getFieldSplitedByType(int iteration, int order, const std::string& mname, std::vector<INTERP_KERNEL::NormalizedCellType>& types, std::vector< std::vector<TypeOfField> >& typesF, std::vector< std::vector<std::string> >& pfls, std::vector< std::vector<std::string> >& locs) const;
- MEDLOADER_EXPORT MEDCouplingAutoRefCountObjectPtr<MEDFileAnyTypeFieldMultiTSWithoutSDA> getContent();
- public:
- MEDLOADER_EXPORT std::vector<std::string> getPflsReallyUsed() const;
- MEDLOADER_EXPORT std::vector<std::string> getLocsReallyUsed() const;
- MEDLOADER_EXPORT std::vector<std::string> getPflsReallyUsedMulti() const;
- MEDLOADER_EXPORT std::vector<std::string> getLocsReallyUsedMulti() const;
- MEDLOADER_EXPORT void changePflsRefsNamesGen(const std::vector< std::pair<std::vector<std::string>, std::string > >& mapOfModif);
- MEDLOADER_EXPORT void changeLocsRefsNamesGen(const std::vector< std::pair<std::vector<std::string>, std::string > >& mapOfModif);
- protected:
- MEDFileAnyTypeFieldMultiTSWithoutSDA *contentNotNullBase();
- const MEDFileAnyTypeFieldMultiTSWithoutSDA *contentNotNullBase() const;
- private:
- static std::vector< std::vector<MEDFileAnyTypeFieldMultiTS *> > SplitPerCommonSupportNotNodesAlg(const std::vector<MEDFileAnyTypeFieldMultiTS *>& vectFMTS, const MEDFileMesh *mesh, std::vector< MEDCouplingAutoRefCountObjectPtr<MEDFileFastCellSupportComparator> >& cmps);
- protected:
- MEDCouplingAutoRefCountObjectPtr<MEDFileAnyTypeFieldMultiTSWithoutSDA> _content;
- };
-
- class MEDFileIntFieldMultiTS;
-
- /*!
- * User class.
- */
- class MEDFileFieldMultiTS : public MEDFileAnyTypeFieldMultiTS
- {
- public:
- MEDLOADER_EXPORT static MEDFileFieldMultiTS *New();
- MEDLOADER_EXPORT static MEDFileFieldMultiTS *New(const std::string& fileName, bool loadAll=true);
- MEDLOADER_EXPORT static MEDFileFieldMultiTS *New(const std::string& fileName, const std::string& fieldName, bool loadAll=true);
- MEDLOADER_EXPORT static MEDFileFieldMultiTS *New(const MEDFileFieldMultiTSWithoutSDA& other, bool shallowCopyOfContent);
- MEDLOADER_EXPORT static MEDFileFieldMultiTS *LoadSpecificEntities(const std::string& fileName, const std::string& fieldName, const std::vector< std::pair<TypeOfField,INTERP_KERNEL::NormalizedCellType> >& entities, bool loadAll=true);
- MEDLOADER_EXPORT MEDFileAnyTypeFieldMultiTS *shallowCpy() const;
- MEDLOADER_EXPORT void checkCoherencyOfType(const MEDFileAnyTypeField1TS *f1ts) const;
- MEDLOADER_EXPORT MEDFileIntFieldMultiTS *convertToInt(bool isDeepCpyGlobs=true) const;
- //
- MEDLOADER_EXPORT MEDFileAnyTypeField1TS *getTimeStepAtPos(int pos) const;
- MEDLOADER_EXPORT MEDFileAnyTypeField1TS *getTimeStep(int iteration, int order) const;
- MEDLOADER_EXPORT MEDFileAnyTypeField1TS *getTimeStepGivenTime(double time, double eps=1e-8) const;
- //
- MEDLOADER_EXPORT MEDCouplingFieldDouble *getFieldAtLevel(TypeOfField type, int iteration, int order, int meshDimRelToMax, int renumPol=0) const;
- MEDLOADER_EXPORT MEDCouplingFieldDouble *getFieldAtTopLevel(TypeOfField type, int iteration, int order, int renumPol=0) const;
- MEDLOADER_EXPORT MEDCouplingFieldDouble *getFieldOnMeshAtLevel(TypeOfField type, int iteration, int order, int meshDimRelToMax, const MEDFileMesh *mesh, int renumPol=0) const;
- MEDLOADER_EXPORT MEDCouplingFieldDouble *getFieldOnMeshAtLevel(TypeOfField type, int iteration, int order, const MEDCouplingMesh *mesh, int renumPol=0) const;
- MEDLOADER_EXPORT MEDCouplingFieldDouble *getFieldAtLevelOld(TypeOfField type, const std::string& mname, int iteration, int order, int meshDimRelToMax, int renumPol=0) const;
- MEDLOADER_EXPORT DataArrayDouble *getFieldWithProfile(TypeOfField type, int iteration, int order, int meshDimRelToMax, const MEDFileMesh *mesh, DataArrayInt *&pfl) const;
- //
- MEDLOADER_EXPORT void appendFieldNoProfileSBT(const MEDCouplingFieldDouble *field);
- MEDLOADER_EXPORT void appendFieldProfile(const MEDCouplingFieldDouble *field, const MEDFileMesh *mesh, int meshDimRelToMax, const DataArrayInt *profile);
- MEDLOADER_EXPORT std::vector< std::vector<DataArrayDouble *> > getFieldSplitedByType2(int iteration, int order, const std::string& mname, std::vector<INTERP_KERNEL::NormalizedCellType>& types, std::vector< std::vector<TypeOfField> >& typesF, std::vector< std::vector<std::string> >& pfls, std::vector< std::vector<std::string> >& locs) const;
- MEDLOADER_EXPORT DataArrayDouble *getUndergroundDataArray(int iteration, int order) const;
- MEDLOADER_EXPORT DataArrayDouble *getUndergroundDataArrayExt(int iteration, int order, std::vector< std::pair<std::pair<INTERP_KERNEL::NormalizedCellType,int>,std::pair<int,int> > >& entries) const;
- private:
- const MEDFileFieldMultiTSWithoutSDA *contentNotNull() const;
- MEDFileFieldMultiTSWithoutSDA *contentNotNull();
- private:
- ~MEDFileFieldMultiTS() { }
- MEDFileFieldMultiTS();
- MEDFileFieldMultiTS(const MEDFileFieldMultiTSWithoutSDA& other, bool shallowCopyOfContent);
- MEDFileFieldMultiTS(const std::string& fileName, bool loadAll, const MEDFileMeshes *ms);
- MEDFileFieldMultiTS(const std::string& fileName, const std::string& fieldName, bool loadAll, const MEDFileMeshes *ms, const std::vector< std::pair<TypeOfField,INTERP_KERNEL::NormalizedCellType> > *entities=0);
- };
-
- /*!
- * User class.
- */
- class MEDFileIntFieldMultiTS : public MEDFileAnyTypeFieldMultiTS
- {
- public:
- MEDLOADER_EXPORT static MEDFileIntFieldMultiTS *New();
- MEDLOADER_EXPORT static MEDFileIntFieldMultiTS *New(const std::string& fileName, bool loadAll=true);
- MEDLOADER_EXPORT static MEDFileIntFieldMultiTS *New(const std::string& fileName, const std::string& fieldName, bool loadAll=true);
- MEDLOADER_EXPORT static MEDFileIntFieldMultiTS *New(const MEDFileIntFieldMultiTSWithoutSDA& other, bool shallowCopyOfContent);
- MEDLOADER_EXPORT static MEDFileIntFieldMultiTS *LoadSpecificEntities(const std::string& fileName, const std::string& fieldName, const std::vector< std::pair<TypeOfField,INTERP_KERNEL::NormalizedCellType> >& entities, bool loadAll=true);
- MEDLOADER_EXPORT MEDFileAnyTypeFieldMultiTS *shallowCpy() const;
- MEDLOADER_EXPORT void checkCoherencyOfType(const MEDFileAnyTypeField1TS *f1ts) const;
- MEDLOADER_EXPORT MEDFileAnyTypeField1TS *getTimeStepAtPos(int pos) const;
- MEDLOADER_EXPORT MEDFileFieldMultiTS *convertToDouble(bool isDeepCpyGlobs=true) const;
- //
- MEDLOADER_EXPORT MEDCouplingFieldDouble *getFieldAtLevel(TypeOfField type, int iteration, int order, int meshDimRelToMax, DataArrayInt* &arrOut, int renumPol=0) const;
- MEDLOADER_EXPORT MEDCouplingFieldDouble *getFieldAtTopLevel(TypeOfField type, int iteration, int order, DataArrayInt* &arrOut, int renumPol=0) const;
- MEDLOADER_EXPORT MEDCouplingFieldDouble *getFieldOnMeshAtLevel(TypeOfField type, int iteration, int order, int meshDimRelToMax, const MEDFileMesh *mesh, DataArrayInt* &arrOut, int renumPol=0) const;
- MEDLOADER_EXPORT MEDCouplingFieldDouble *getFieldOnMeshAtLevel(TypeOfField type, int iteration, int order, const MEDCouplingMesh *mesh, DataArrayInt* &arrOut, int renumPol=0) const;
- MEDLOADER_EXPORT MEDCouplingFieldDouble *getFieldAtLevelOld(TypeOfField type, int iteration, int order, const std::string& mname, int meshDimRelToMax, DataArrayInt* &arrOut, int renumPol=0) const;
- MEDLOADER_EXPORT DataArrayInt *getFieldWithProfile(TypeOfField type, int iteration, int order, int meshDimRelToMax, const MEDFileMesh *mesh, DataArrayInt *&pfl) const;
- //
- MEDLOADER_EXPORT void appendFieldNoProfileSBT(const MEDCouplingFieldDouble *field, const DataArrayInt *arrOfVals);
- MEDLOADER_EXPORT void appendFieldProfile(const MEDCouplingFieldDouble *field, const DataArrayInt *arrOfVals, const MEDFileMesh *mesh, int meshDimRelToMax, const DataArrayInt *profile);
- //
- MEDLOADER_EXPORT DataArrayInt *getUndergroundDataArray(int iteration, int order) const;
- private:
- const MEDFileIntFieldMultiTSWithoutSDA *contentNotNull() const;
- MEDFileIntFieldMultiTSWithoutSDA *contentNotNull();
- private:
- ~MEDFileIntFieldMultiTS() { }
- MEDFileIntFieldMultiTS();
- MEDFileIntFieldMultiTS(const MEDFileIntFieldMultiTSWithoutSDA& other, bool shallowCopyOfContent);
- MEDFileIntFieldMultiTS(const std::string& fileName, bool loadAll, const MEDFileMeshes *ms);
- MEDFileIntFieldMultiTS(const std::string& fileName, const std::string& fieldName, bool loadAll, const MEDFileMeshes *ms, const std::vector< std::pair<TypeOfField,INTERP_KERNEL::NormalizedCellType> > *entities=0);
- };
-
- class MEDFileAnyTypeFieldMultiTSIterator
- {
- public:
- MEDLOADER_EXPORT MEDFileAnyTypeFieldMultiTSIterator(MEDFileAnyTypeFieldMultiTS *fmts);
- MEDLOADER_EXPORT ~MEDFileAnyTypeFieldMultiTSIterator();
- MEDLOADER_EXPORT MEDFileAnyTypeField1TS *nextt();
- private:
- MEDCouplingAutoRefCountObjectPtr<MEDFileAnyTypeFieldMultiTS> _fmts;
- int _iter_id;
- int _nb_iter;
- };
-