1 // Copyright (C) 2007-2013 CEA/DEN, EDF R&D
3 // This library is free software; you can redistribute it and/or
4 // modify it under the terms of the GNU Lesser General Public
5 // License as published by the Free Software Foundation; either
6 // version 2.1 of the License.
8 // This library is distributed in the hope that it will be useful,
9 // but WITHOUT ANY WARRANTY; without even the implied warranty of
10 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
11 // Lesser General Public License for more details.
13 // You should have received a copy of the GNU Lesser General Public
14 // License along with this library; if not, write to the Free Software
15 // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
17 // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
19 // Author : Anthony Geay (CEA/DEN)
21 #ifndef __MEDFILEFIELD_HXX__
22 #define __MEDFILEFIELD_HXX__
24 #include "MEDLoaderDefines.hxx"
26 #include "MEDFileUtilities.hxx"
28 #include "MEDCouplingAutoRefCountObjectPtr.hxx"
29 #include "MEDCouplingRefCountObject.hxx"
30 #include "MEDCouplingMemArray.hxx"
32 #include "NormalizedUnstructuredMesh.hxx"
33 #include "InterpKernelException.hxx"
44 class MEDFileFieldGlobs;
45 class MEDCouplingMesh;
46 class MEDCouplingFieldDouble;
49 class MEDFileFieldLoc : public RefCountObject
52 void MEDLOADER_EXPORT simpleRepr(std::ostream& oss) const;
53 const MEDLOADER_EXPORT std::string& getName() const { return _name; }
54 void MEDLOADER_EXPORT setName(const char *name);
55 static MEDFileFieldLoc *New(med_idt fid, const char *locName);
56 static MEDFileFieldLoc *New(med_idt fid, int id);
57 static MEDFileFieldLoc *New(const char *locName, INTERP_KERNEL::NormalizedCellType geoType, const std::vector<double>& refCoo, const std::vector<double>& gsCoo, const std::vector<double>& w);
58 std::size_t getHeapMemorySize() const;
59 MEDFileFieldLoc *deepCpy() const;
60 int MEDLOADER_EXPORT getNbOfGaussPtPerCell() const { return _nb_gauss_pt; }
61 void MEDLOADER_EXPORT writeLL(med_idt fid) const;
62 std::string MEDLOADER_EXPORT repr() const;
63 bool MEDLOADER_EXPORT isName(const char *name) const { return _name==name; }
64 int MEDLOADER_EXPORT getDimension() const { return _dim; }
65 int MEDLOADER_EXPORT getNumberOfGaussPoints() const { return _nb_gauss_pt; }
66 int MEDLOADER_EXPORT getNumberOfPointsInCells() const { return _nb_node_per_cell; }
67 const MEDLOADER_EXPORT std::vector<double>& getRefCoords() const { return _ref_coo; }
68 const MEDLOADER_EXPORT std::vector<double>& getGaussCoords() const { return _gs_coo; }
69 const MEDLOADER_EXPORT std::vector<double>& getGaussWeights() const { return _w; }
70 bool MEDLOADER_EXPORT isEqual(const MEDFileFieldLoc& other, double eps) const;
72 MEDFileFieldLoc(med_idt fid, const char *locName);
73 MEDFileFieldLoc(med_idt fid, int id);
74 MEDFileFieldLoc(const char *locName, INTERP_KERNEL::NormalizedCellType geoType, const std::vector<double>& refCoo, const std::vector<double>& gsCoo, const std::vector<double>& w);
78 int _nb_node_per_cell;
80 INTERP_KERNEL::NormalizedCellType _geo_type;
81 std::vector<double> _ref_coo;
82 std::vector<double> _gs_coo;
83 std::vector<double> _w;
87 class MEDFileAnyTypeField1TSWithoutSDA;
88 class MEDFileFieldPerMeshPerType;
89 class MEDFileField1TSWithoutSDA;
90 class MEDFileFieldNameScope;
91 class MEDFileFieldGlobsReal;
92 class MEDFileFieldPerMesh;
94 class MEDFileFieldPerMeshPerTypePerDisc : public RefCountObject, public MEDFileWritable
97 static MEDFileFieldPerMeshPerTypePerDisc *NewOnRead(MEDFileFieldPerMeshPerType *fath, TypeOfField type, int profileIt) throw(INTERP_KERNEL::Exception);
98 static MEDFileFieldPerMeshPerTypePerDisc *New(MEDFileFieldPerMeshPerType *fath, TypeOfField type, int locId);
99 static MEDFileFieldPerMeshPerTypePerDisc *New(const MEDFileFieldPerMeshPerTypePerDisc& other);
100 std::size_t getHeapMemorySize() const;
101 MEDFileFieldPerMeshPerTypePerDisc *deepCpy(MEDFileFieldPerMeshPerType *father) const throw(INTERP_KERNEL::Exception);
102 void assignFieldNoProfile(int& start, int offset, int nbOfCells, const MEDCouplingFieldDouble *field, const DataArray *arrr, MEDFileFieldGlobsReal& glob, const MEDFileFieldNameScope& nasc) throw(INTERP_KERNEL::Exception);
103 void assignFieldProfile(int& start, const DataArrayInt *multiTypePfl, const DataArrayInt *idsInPfl, DataArrayInt *locIds, int nbOfEltsInWholeMesh, const MEDCouplingFieldDouble *field, const DataArray *arrr, const MEDCouplingMesh *mesh, MEDFileFieldGlobsReal& glob, const MEDFileFieldNameScope& nasc) throw(INTERP_KERNEL::Exception);
104 void assignNodeFieldNoProfile(int& start, const MEDCouplingFieldDouble *field, const DataArray *arrr, MEDFileFieldGlobsReal& glob) throw(INTERP_KERNEL::Exception);
105 void getCoarseData(TypeOfField& type, std::pair<int,int>& dad, std::string& pfl, std::string& loc) const throw(INTERP_KERNEL::Exception);
106 void writeLL(med_idt fid, const MEDFileFieldNameScope& nasc) const throw(INTERP_KERNEL::Exception);
107 const MEDFileFieldPerMeshPerType *getFather() const;
108 void loadOnlyStructureOfDataRecursively(med_idt fid, int profileIt, int& start, const MEDFileFieldNameScope& nasc) throw(INTERP_KERNEL::Exception);
109 void loadBigArray(med_idt fid, int profileIt, const MEDFileFieldNameScope& nasc) throw(INTERP_KERNEL::Exception);
110 void setNewStart(int newValueOfStart) throw(INTERP_KERNEL::Exception);
111 int getIteration() const;
112 int getOrder() const;
113 double getTime() const;
114 std::string getMeshName() const;
115 TypeOfField getType() const;
116 void simpleRepr(int bkOffset, std::ostream& oss, int id) const;
117 void fillTypesOfFieldAvailable(std::set<TypeOfField>& types) const throw(INTERP_KERNEL::Exception);
118 void setType(TypeOfField newType);
119 INTERP_KERNEL::NormalizedCellType getGeoType() const;
120 int getNumberOfComponents() const;
121 int getNumberOfTuples() const;
122 int getStart() const { return _start; }
123 int getEnd() const { return _end; }
124 DataArray *getOrCreateAndGetArray();
125 const DataArray *getOrCreateAndGetArray() const;
126 const std::vector<std::string>& getInfo() const;
127 std::string getProfile() const;
128 void setProfile(const char *newPflName);
129 std::string getLocalization() const;
130 void setLocalization(const char *newLocName);
131 int getLocId() const { return _loc_id; }
132 void setLocId(int newId) const { _loc_id=newId; }
133 void setFather(MEDFileFieldPerMeshPerType *newFather) { _father=newFather; }
134 void changePflsRefsNamesGen(const std::vector< std::pair<std::vector<std::string>, std::string > >& mapOfModif) throw(INTERP_KERNEL::Exception);
135 void changeLocsRefsNamesGen(const std::vector< std::pair<std::vector<std::string>, std::string > >& mapOfModif) throw(INTERP_KERNEL::Exception);
136 void getFieldAtLevel(TypeOfField type, const MEDFileFieldGlobsReal *glob, std::vector< std::pair<int,int> >& dads, std::vector<const DataArrayInt *>& pfls, std::vector<int>& locs,
137 std::vector<INTERP_KERNEL::NormalizedCellType>& geoTypes) const;
138 void fillValues(int discId, int& startEntryId, std::vector< std::pair<std::pair<INTERP_KERNEL::NormalizedCellType,int>,std::pair<int,int> > >& entries) const;
139 int fillEltIdsFromCode(int offset, const std::vector<int>& codeOfMesh, const MEDFileFieldGlobsReal& glob, int *ptToFill) const throw(INTERP_KERNEL::Exception);
140 int fillTupleIds(int *ptToFill) const throw(INTERP_KERNEL::Exception);
141 static int ConvertType(TypeOfField type, int locId) throw(INTERP_KERNEL::Exception);
142 static std::vector< std::vector< const MEDFileFieldPerMeshPerTypePerDisc *> > SplitPerDiscretization(const std::vector< const MEDFileFieldPerMeshPerTypePerDisc *>& entries);
143 static bool RenumberChunks(int offset, const std::vector< const MEDFileFieldPerMeshPerTypePerDisc *>& entriesOnSameDisc,
144 const DataArrayInt *explicitIdsInMesh, const std::vector<int>& newCode,
145 MEDFileFieldGlobsReal& glob, DataArrayDouble *arr, std::vector< MEDCouplingAutoRefCountObjectPtr<MEDFileFieldPerMeshPerTypePerDisc> >& result);
146 static MEDFileFieldPerMeshPerTypePerDisc *NewObjectOnSameDiscThanPool(TypeOfField typeF, INTERP_KERNEL::NormalizedCellType geoType, DataArrayInt *idsOfMeshElt,
147 bool isPfl, int nbi, int offset, std::list< const MEDFileFieldPerMeshPerTypePerDisc *>& entriesOnSameDisc,
148 MEDFileFieldGlobsReal& glob, bool ¬InExisting) throw(INTERP_KERNEL::Exception);
150 MEDFileFieldPerMeshPerTypePerDisc(MEDFileFieldPerMeshPerType *fath, TypeOfField type, int profileIt) throw(INTERP_KERNEL::Exception);
151 MEDFileFieldPerMeshPerTypePerDisc(MEDFileFieldPerMeshPerType *fath, TypeOfField type, int profileIt, const std::string& dummy);
152 MEDFileFieldPerMeshPerTypePerDisc(const MEDFileFieldPerMeshPerTypePerDisc& other);
153 MEDFileFieldPerMeshPerTypePerDisc();
156 MEDFileFieldPerMeshPerType *_father;
159 //! _nval is different than end-start in case of ON_GAUSS_PT and ON_GAUSS_NE ! (_nval=(_end-_start)/nbi)
161 std::string _profile;
162 std::string _localization;
163 //! only on assignement -3 : ON_NODES, -2 : ON_CELLS, -1 : ON_GAUSS_NE, 0..* : ON_GAUSS_PT
166 mutable int _tmp_work1;
169 class MEDFileFieldPerMeshPerType : public RefCountObject, public MEDFileWritable
172 static MEDFileFieldPerMeshPerType *New(MEDFileFieldPerMesh *fath, INTERP_KERNEL::NormalizedCellType geoType) throw(INTERP_KERNEL::Exception);
173 static MEDFileFieldPerMeshPerType *NewOnRead(med_idt fid, MEDFileFieldPerMesh *fath, TypeOfField type, INTERP_KERNEL::NormalizedCellType geoType, const MEDFileFieldNameScope& nasc) throw(INTERP_KERNEL::Exception);
174 std::size_t getHeapMemorySize() const;
175 MEDFileFieldPerMeshPerType *deepCpy(MEDFileFieldPerMesh *father) const throw(INTERP_KERNEL::Exception);
176 void assignFieldNoProfile(int& start, int offset, int nbOfCells, const MEDCouplingFieldDouble *field, const DataArray *arr, MEDFileFieldGlobsReal& glob, const MEDFileFieldNameScope& nasc) throw(INTERP_KERNEL::Exception);
177 void assignFieldProfile(int& start, const DataArrayInt *multiTypePfl, const DataArrayInt *idsInPfl, DataArrayInt *locIds, int nbOfEltsInWholeMesh, const MEDCouplingFieldDouble *field, const DataArray *arr, const MEDCouplingMesh *mesh, MEDFileFieldGlobsReal& glob, const MEDFileFieldNameScope& nasc) throw(INTERP_KERNEL::Exception);
178 void assignNodeFieldNoProfile(int& start, const MEDCouplingFieldDouble *field, const DataArray *arr, MEDFileFieldGlobsReal& glob) throw(INTERP_KERNEL::Exception);
179 void assignNodeFieldProfile(int& start, const DataArrayInt *pfl, const MEDCouplingFieldDouble *field, const DataArray *arr, MEDFileFieldGlobsReal& glob, const MEDFileFieldNameScope& nasc) throw(INTERP_KERNEL::Exception);
180 const MEDFileFieldPerMesh *getFather() const;
181 void loadOnlyStructureOfDataRecursively(med_idt fid, int &start, const MEDFileFieldNameScope& nasc) throw(INTERP_KERNEL::Exception);
182 void loadBigArraysRecursively(med_idt fid, const MEDFileFieldNameScope& nasc) throw(INTERP_KERNEL::Exception);
183 void writeLL(med_idt fid, const MEDFileFieldNameScope& nasc) const throw(INTERP_KERNEL::Exception);
184 void getDimension(int& dim) const;
185 void fillTypesOfFieldAvailable(std::set<TypeOfField>& types) const throw(INTERP_KERNEL::Exception);
186 void fillFieldSplitedByType(std::vector< std::pair<int,int> >& dads, std::vector<TypeOfField>& types, std::vector<std::string>& pfls, std::vector<std::string>& locs) const throw(INTERP_KERNEL::Exception);
187 int getIteration() const;
188 int getOrder() const;
189 double getTime() const;
190 std::string getMeshName() const;
191 void simpleRepr(int bkOffset, std::ostream& oss, int id) const;
192 void getSizes(int& globalSz, int& nbOfEntries) const;
193 INTERP_KERNEL::NormalizedCellType getGeoType() const;
194 int getNumberOfComponents() const;
195 DataArray *getOrCreateAndGetArray();
196 const DataArray *getOrCreateAndGetArray() const;
197 const std::vector<std::string>& getInfo() const;
198 std::vector<std::string> getPflsReallyUsed() const;
199 std::vector<std::string> getLocsReallyUsed() const;
200 std::vector<std::string> getPflsReallyUsedMulti() const;
201 std::vector<std::string> getLocsReallyUsedMulti() const;
202 void changePflsRefsNamesGen(const std::vector< std::pair<std::vector<std::string>, std::string > >& mapOfModif) throw(INTERP_KERNEL::Exception);
203 void changeLocsRefsNamesGen(const std::vector< std::pair<std::vector<std::string>, std::string > >& mapOfModif) throw(INTERP_KERNEL::Exception);
204 MEDFileFieldPerMeshPerTypePerDisc *getLeafGivenLocId(int locId) throw(INTERP_KERNEL::Exception);
205 const MEDFileFieldPerMeshPerTypePerDisc *getLeafGivenLocId(int locId) const throw(INTERP_KERNEL::Exception);
206 void getFieldAtLevel(int meshDim, TypeOfField type, const MEDFileFieldGlobsReal *glob, std::vector< std::pair<int,int> >& dads, std::vector<const DataArrayInt *>& pfls, std::vector<int>& locs, std::vector<INTERP_KERNEL::NormalizedCellType>& geoTypes) const;
207 void fillValues(int& startEntryId, std::vector< std::pair<std::pair<INTERP_KERNEL::NormalizedCellType,int>,std::pair<int,int> > >& entries) const;
208 void setLeaves(const std::vector< MEDCouplingAutoRefCountObjectPtr< MEDFileFieldPerMeshPerTypePerDisc > >& leaves) throw(INTERP_KERNEL::Exception);
209 bool keepOnlySpatialDiscretization(TypeOfField tof, int &globalNum, std::vector< std::pair<int,int> >& its) throw(INTERP_KERNEL::Exception);
210 static med_entity_type ConvertIntoMEDFileType(TypeOfField ikType, INTERP_KERNEL::NormalizedCellType ikGeoType, med_geometry_type& medfGeoType);
212 std::vector<int> addNewEntryIfNecessary(const MEDCouplingFieldDouble *field, int offset, int nbOfCells) throw(INTERP_KERNEL::Exception);
213 std::vector<int> addNewEntryIfNecessaryGauss(const MEDCouplingFieldDouble *field, int offset, int nbOfCells) throw(INTERP_KERNEL::Exception);
214 std::vector<int> addNewEntryIfNecessary(const MEDCouplingFieldDouble *field, const DataArrayInt *subCells) throw(INTERP_KERNEL::Exception);
215 std::vector<int> addNewEntryIfNecessaryGauss(const MEDCouplingFieldDouble *field, const DataArrayInt *subCells) throw(INTERP_KERNEL::Exception);
216 MEDFileFieldPerMeshPerType(med_idt fid, MEDFileFieldPerMesh *fath, TypeOfField type, INTERP_KERNEL::NormalizedCellType geoType, const MEDFileFieldNameScope& nasc) throw(INTERP_KERNEL::Exception);
217 MEDFileFieldPerMeshPerType(MEDFileFieldPerMesh *fath, INTERP_KERNEL::NormalizedCellType geoType) throw(INTERP_KERNEL::Exception);
219 MEDFileFieldPerMesh *_father;
220 std::vector< MEDCouplingAutoRefCountObjectPtr<MEDFileFieldPerMeshPerTypePerDisc> > _field_pm_pt_pd;
221 INTERP_KERNEL::NormalizedCellType _geo_type;
224 class MEDFileFieldPerMesh : public RefCountObject, public MEDFileWritable
227 static MEDFileFieldPerMesh *New(MEDFileAnyTypeField1TSWithoutSDA *fath, const MEDCouplingMesh *mesh);
228 static MEDFileFieldPerMesh *NewOnRead(med_idt fid, MEDFileAnyTypeField1TSWithoutSDA *fath, int meshCsit, int meshIteration, int meshOrder, const MEDFileFieldNameScope& nasc) throw(INTERP_KERNEL::Exception);
229 std::size_t getHeapMemorySize() const;
230 MEDFileFieldPerMesh *deepCpy(MEDFileAnyTypeField1TSWithoutSDA *father) const throw(INTERP_KERNEL::Exception);
231 void simpleRepr(int bkOffset,std::ostream& oss, int id) const;
232 void copyTinyInfoFrom(const MEDCouplingMesh *mesh) throw(INTERP_KERNEL::Exception);
233 void assignFieldProfile(int& start, const DataArrayInt *multiTypePfl, const std::vector<int>& code, const std::vector<int>& code2, const std::vector<DataArrayInt *>& idsInPflPerType, const std::vector<DataArrayInt *>& idsPerType, const MEDCouplingFieldDouble *field, const DataArray *arr, const MEDCouplingMesh *mesh, MEDFileFieldGlobsReal& glob, const MEDFileFieldNameScope& nasc) throw(INTERP_KERNEL::Exception);
234 void assignFieldNoProfileNoRenum(int& start, const std::vector<int>& code, const MEDCouplingFieldDouble *field, const DataArray *arr, MEDFileFieldGlobsReal& glob, const MEDFileFieldNameScope& nasc) throw(INTERP_KERNEL::Exception);
235 void assignNodeFieldNoProfile(int& start, const MEDCouplingFieldDouble *field, const DataArray *arr, MEDFileFieldGlobsReal& glob) throw(INTERP_KERNEL::Exception);
236 void assignNodeFieldProfile(int& start, const DataArrayInt *pfl, const MEDCouplingFieldDouble *field, const DataArray *arr, MEDFileFieldGlobsReal& glob, const MEDFileFieldNameScope& nasc) throw(INTERP_KERNEL::Exception);
237 void loadOnlyStructureOfDataRecursively(med_idt fid, int &start, const MEDFileFieldNameScope& nasc) throw(INTERP_KERNEL::Exception);
238 void loadBigArraysRecursively(med_idt fid, const MEDFileFieldNameScope& nasc) throw(INTERP_KERNEL::Exception);
239 void writeLL(med_idt fid, const MEDFileFieldNameScope& nasc) const throw(INTERP_KERNEL::Exception);
240 void fillTypesOfFieldAvailable(std::set<TypeOfField>& types) const throw(INTERP_KERNEL::Exception);
241 std::vector< std::vector< std::pair<int,int> > > getFieldSplitedByType(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 throw(INTERP_KERNEL::Exception);
242 void getDimension(int& dim) const;
243 double getTime() const;
244 int getIteration() const;
245 int getOrder() const;
246 int getMeshIteration() const { return _mesh_iteration; }
247 int getMeshOrder() const { return _mesh_order; }
248 std::string getMeshName() const { return _mesh_name; }
249 int getNumberOfComponents() const;
250 DataArray *getOrCreateAndGetArray();
251 const DataArray *getOrCreateAndGetArray() const;
252 const std::vector<std::string>& getInfo() const;
253 std::vector<std::string> getPflsReallyUsed() const;
254 std::vector<std::string> getLocsReallyUsed() const;
255 std::vector<std::string> getPflsReallyUsedMulti() const;
256 std::vector<std::string> getLocsReallyUsedMulti() const;
257 bool changeMeshNames(const std::vector< std::pair<std::string,std::string> >& modifTab) throw(INTERP_KERNEL::Exception);
258 bool renumberEntitiesLyingOnMesh(const char *meshName, const std::vector<int>& oldCode, const std::vector<int>& newCode, const DataArrayInt *renumO2N, MEDFileFieldGlobsReal& glob) throw(INTERP_KERNEL::Exception);
259 void keepOnlySpatialDiscretization(TypeOfField tof, int &globalNum, std::vector< std::pair<int,int> >& its) throw(INTERP_KERNEL::Exception);
260 void changePflsRefsNamesGen(const std::vector< std::pair<std::vector<std::string>, std::string > >& mapOfModif) throw(INTERP_KERNEL::Exception);
261 void changeLocsRefsNamesGen(const std::vector< std::pair<std::vector<std::string>, std::string > >& mapOfModif) throw(INTERP_KERNEL::Exception);
262 MEDCouplingFieldDouble *getFieldOnMeshAtLevel(TypeOfField type, const MEDFileFieldGlobsReal *glob, const MEDCouplingMesh *mesh, bool& isPfl, MEDCouplingAutoRefCountObjectPtr<DataArray> &arrOut, const MEDFileFieldNameScope& nasc) const throw(INTERP_KERNEL::Exception);
263 DataArray *getFieldOnMeshAtLevelWithPfl(TypeOfField type, const MEDCouplingMesh *mesh, DataArrayInt *&pfl, const MEDFileFieldGlobsReal *glob, const MEDFileFieldNameScope& nasc) const throw(INTERP_KERNEL::Exception);
264 void getUndergroundDataArrayExt(std::vector< std::pair<std::pair<INTERP_KERNEL::NormalizedCellType,int>,std::pair<int,int> > >& entries) const throw(INTERP_KERNEL::Exception);
265 MEDFileFieldPerMeshPerTypePerDisc *getLeafGivenTypeAndLocId(INTERP_KERNEL::NormalizedCellType typ, int locId) throw(INTERP_KERNEL::Exception);
266 const MEDFileFieldPerMeshPerTypePerDisc *getLeafGivenTypeAndLocId(INTERP_KERNEL::NormalizedCellType typ, int locId) const throw(INTERP_KERNEL::Exception);
268 int addNewEntryIfNecessary(INTERP_KERNEL::NormalizedCellType type);
269 MEDCouplingFieldDouble *finishField(TypeOfField type, const MEDFileFieldGlobsReal *glob,
270 const std::vector< std::pair<int,int> >& dads, const std::vector<int>& locs, const MEDCouplingMesh *mesh, bool& isPfl, MEDCouplingAutoRefCountObjectPtr<DataArray> &arrOut, const MEDFileFieldNameScope& nasc) const throw(INTERP_KERNEL::Exception);
271 MEDCouplingFieldDouble *finishField2(TypeOfField type, const MEDFileFieldGlobsReal *glob,
272 const std::vector< std::pair<int,int> >& dads, const std::vector<int>& locs,
273 const std::vector<INTERP_KERNEL::NormalizedCellType>& geoTypes,
274 const MEDCouplingMesh *mesh, const DataArrayInt *da, bool& isPfl, MEDCouplingAutoRefCountObjectPtr<DataArray> &arrOut, const MEDFileFieldNameScope& nasc) const throw(INTERP_KERNEL::Exception);
275 MEDCouplingFieldDouble *finishFieldNode2(const MEDFileFieldGlobsReal *glob,
276 const std::vector< std::pair<int,int> >& dads, const std::vector<int>& locs,
277 const MEDCouplingMesh *mesh, const DataArrayInt *da, bool& isPfl, MEDCouplingAutoRefCountObjectPtr<DataArray> &arrOut, const MEDFileFieldNameScope& nasc) const throw(INTERP_KERNEL::Exception);
278 DataArray *finishField4(const std::vector< std::pair<int,int> >& dads, const DataArrayInt *pflIn, int nbOfElems, DataArrayInt *&pflOut) const throw(INTERP_KERNEL::Exception);
279 void assignNewLeaves(const std::vector< MEDCouplingAutoRefCountObjectPtr< MEDFileFieldPerMeshPerTypePerDisc > >& leaves) throw(INTERP_KERNEL::Exception);
280 static void SortArraysPerType(const MEDFileFieldGlobsReal *glob, TypeOfField type,
281 const std::vector<INTERP_KERNEL::NormalizedCellType>& geoTypes, const std::vector< std::pair<int,int> >& dads, const std::vector<const DataArrayInt *>& pfls, const std::vector<int>& locs,
282 std::vector<int>& code, std::vector<DataArrayInt *>& notNullPfls);
283 static int ComputeNbOfElems(const MEDFileFieldGlobsReal *glob, TypeOfField type, const std::vector<INTERP_KERNEL::NormalizedCellType>& geoTypes, const std::vector< std::pair<int,int> >& dads, const std::vector<int>& locs) throw(INTERP_KERNEL::Exception);
284 MEDFileFieldPerMesh(med_idt fid, MEDFileAnyTypeField1TSWithoutSDA *fath, int meshCsit, int meshIteration, int meshOrder, const MEDFileFieldNameScope& nasc) throw(INTERP_KERNEL::Exception);
285 MEDFileFieldPerMesh(MEDFileAnyTypeField1TSWithoutSDA *fath, const MEDCouplingMesh *mesh);
287 std::string _mesh_name;
291 MEDFileAnyTypeField1TSWithoutSDA *_father;
292 std::vector< MEDCouplingAutoRefCountObjectPtr< MEDFileFieldPerMeshPerType > > _field_pm_pt;
295 class MEDFileFieldGlobsReal;
297 class MEDFileFieldGlobs : public RefCountObject
300 static MEDFileFieldGlobs *New(const char *fname);
301 static MEDFileFieldGlobs *New();
302 std::size_t getHeapMemorySize() const;
303 MEDFileFieldGlobs *deepCpy() const throw(INTERP_KERNEL::Exception);
304 MEDFileFieldGlobs *shallowCpyPart(const std::vector<std::string>& pfls, const std::vector<std::string>& locs) const throw(INTERP_KERNEL::Exception);
305 MEDFileFieldGlobs *deepCpyPart(const std::vector<std::string>& pfls, const std::vector<std::string>& locs) const throw(INTERP_KERNEL::Exception);
306 void simpleRepr(std::ostream& oss) const;
307 void appendGlobs(const MEDFileFieldGlobs& other, double eps) throw(INTERP_KERNEL::Exception);
308 void checkGlobsPflsPartCoherency(const std::vector<std::string>& pflsUsed) const throw(INTERP_KERNEL::Exception);
309 void checkGlobsLocsPartCoherency(const std::vector<std::string>& locsUsed) const throw(INTERP_KERNEL::Exception);
310 void loadProfileInFile(med_idt fid, int id, const char *pflName) throw(INTERP_KERNEL::Exception);
311 void loadProfileInFile(med_idt fid, int id);
312 void loadGlobals(med_idt fid, const MEDFileFieldGlobsReal& real) throw(INTERP_KERNEL::Exception);
313 void loadAllGlobals(med_idt fid) throw(INTERP_KERNEL::Exception);
314 void writeGlobals(med_idt fid, const MEDFileWritable& opt) const throw(INTERP_KERNEL::Exception);
315 std::vector<std::string> getPfls() const;
316 std::vector<std::string> getLocs() const;
317 bool existsPfl(const char *pflName) const;
318 bool existsLoc(const char *locName) const;
319 std::string createNewNameOfPfl() const throw(INTERP_KERNEL::Exception);
320 std::string createNewNameOfLoc() const throw(INTERP_KERNEL::Exception);
321 std::vector< std::vector<int> > whichAreEqualProfiles() const;
322 std::vector< std::vector<int> > whichAreEqualLocs(double eps) const;
323 void setFileName(const char *fileName);
324 void changePflsNamesInStruct(const std::vector< std::pair<std::vector<std::string>, std::string > >& mapOfModif) throw(INTERP_KERNEL::Exception);
325 void changeLocsNamesInStruct(const std::vector< std::pair<std::vector<std::string>, std::string > >& mapOfModif) throw(INTERP_KERNEL::Exception);
326 int getNbOfGaussPtPerCell(int locId) const throw(INTERP_KERNEL::Exception);
327 int getLocalizationId(const char *loc) const throw(INTERP_KERNEL::Exception);
328 const char *getFileName() const { return _file_name.c_str(); }
329 std::string getFileName2() const { return _file_name; }
330 const MEDFileFieldLoc& getLocalizationFromId(int locId) const throw(INTERP_KERNEL::Exception);
331 const MEDFileFieldLoc& getLocalization(const char *locName) const throw(INTERP_KERNEL::Exception);
332 const DataArrayInt *getProfileFromId(int pflId) const throw(INTERP_KERNEL::Exception);
333 const DataArrayInt *getProfile(const char *pflName) const throw(INTERP_KERNEL::Exception);
334 MEDFileFieldLoc& getLocalizationFromId(int locId) throw(INTERP_KERNEL::Exception);
335 MEDFileFieldLoc& getLocalization(const char *locName) throw(INTERP_KERNEL::Exception);
336 DataArrayInt *getProfile(const char *pflName) throw(INTERP_KERNEL::Exception);
337 DataArrayInt *getProfileFromId(int pflId) throw(INTERP_KERNEL::Exception);
338 void killProfileIds(const std::vector<int>& pflIds) throw(INTERP_KERNEL::Exception);
339 void killLocalizationIds(const std::vector<int>& locIds) throw(INTERP_KERNEL::Exception);
341 void appendProfile(DataArrayInt *pfl) throw(INTERP_KERNEL::Exception);
342 void appendLoc(const char *locName, INTERP_KERNEL::NormalizedCellType geoType, const std::vector<double>& refCoo, const std::vector<double>& gsCoo, const std::vector<double>& w) throw(INTERP_KERNEL::Exception);
344 static std::string CreateNewNameNotIn(const char *prefix, const std::vector<std::string>& namesToAvoid) throw(INTERP_KERNEL::Exception);
346 MEDFileFieldGlobs(const char *fname);
348 ~MEDFileFieldGlobs();
350 std::vector< MEDCouplingAutoRefCountObjectPtr<DataArrayInt> > _pfls;
351 std::vector< MEDCouplingAutoRefCountObjectPtr<MEDFileFieldLoc> > _locs;
352 std::string _file_name;
355 /// @endcond INTERNAL
357 class MEDLOADER_EXPORT MEDFileFieldGlobsReal
360 MEDFileFieldGlobsReal(const char *fname);
361 MEDFileFieldGlobsReal();
362 std::size_t getHeapMemorySize() const;
363 void simpleReprGlobs(std::ostream& oss) const;
365 void shallowCpyGlobs(const MEDFileFieldGlobsReal& other);
366 void deepCpyGlobs(const MEDFileFieldGlobsReal& other);
367 void shallowCpyOnlyUsedGlobs(const MEDFileFieldGlobsReal& other) throw(INTERP_KERNEL::Exception);
368 void deepCpyOnlyUsedGlobs(const MEDFileFieldGlobsReal& other) throw(INTERP_KERNEL::Exception);
369 void appendGlobs(const MEDFileFieldGlobsReal& other, double eps) throw(INTERP_KERNEL::Exception);
370 void checkGlobsCoherency() const throw(INTERP_KERNEL::Exception);
371 void checkGlobsPflsPartCoherency() const throw(INTERP_KERNEL::Exception);
372 void checkGlobsLocsPartCoherency() const throw(INTERP_KERNEL::Exception);
373 virtual std::vector<std::string> getPflsReallyUsed() const = 0;
374 virtual std::vector<std::string> getLocsReallyUsed() const = 0;
375 virtual std::vector<std::string> getPflsReallyUsedMulti() const = 0;
376 virtual std::vector<std::string> getLocsReallyUsedMulti() const = 0;
377 virtual void changePflsRefsNamesGen(const std::vector< std::pair<std::vector<std::string>, std::string > >& mapOfModif) throw(INTERP_KERNEL::Exception) = 0;
378 virtual void changeLocsRefsNamesGen(const std::vector< std::pair<std::vector<std::string>, std::string > >& mapOfModif) throw(INTERP_KERNEL::Exception) = 0;
379 virtual ~MEDFileFieldGlobsReal();
381 void loadProfileInFile(med_idt fid, int id, const char *pflName) throw(INTERP_KERNEL::Exception);
382 void loadProfileInFile(med_idt fid, int id);
383 void loadGlobals(med_idt fid) throw(INTERP_KERNEL::Exception);
384 void loadAllGlobals(med_idt fid) throw(INTERP_KERNEL::Exception);
385 void writeGlobals(med_idt fid, const MEDFileWritable& opt) const throw(INTERP_KERNEL::Exception);
386 std::vector<std::string> getPfls() const;
387 std::vector<std::string> getLocs() const;
388 bool existsPfl(const char *pflName) const;
389 bool existsLoc(const char *locName) const;
390 std::string createNewNameOfPfl() const throw(INTERP_KERNEL::Exception);
391 std::string createNewNameOfLoc() const throw(INTERP_KERNEL::Exception);
392 std::vector< std::vector<int> > whichAreEqualProfiles() const;
393 std::vector< std::vector<int> > whichAreEqualLocs(double eps) const;
394 void setFileName(const char *fileName);
395 void changePflsNamesInStruct(const std::vector< std::pair<std::vector<std::string>, std::string > >& mapOfModif) throw(INTERP_KERNEL::Exception);
396 void changeLocsNamesInStruct(const std::vector< std::pair<std::vector<std::string>, std::string > >& mapOfModif) throw(INTERP_KERNEL::Exception);
397 void changePflsNames(const std::vector< std::pair<std::vector<std::string>, std::string > >& mapOfModif) throw(INTERP_KERNEL::Exception);
398 void changeLocsNames(const std::vector< std::pair<std::vector<std::string>, std::string > >& mapOfModif) throw(INTERP_KERNEL::Exception);
399 void changePflName(const char *oldName, const char *newName) throw(INTERP_KERNEL::Exception);
400 void changeLocName(const char *oldName, const char *newName) throw(INTERP_KERNEL::Exception);
401 std::vector< std::pair<std::vector<std::string>, std::string > > zipPflsNames() throw(INTERP_KERNEL::Exception);
402 std::vector< std::pair<std::vector<std::string>, std::string > > zipLocsNames(double eps) throw(INTERP_KERNEL::Exception);
403 int getNbOfGaussPtPerCell(int locId) const throw(INTERP_KERNEL::Exception);
404 int getLocalizationId(const char *loc) const throw(INTERP_KERNEL::Exception);
405 const char *getFileName() const;
406 std::string getFileName2() const;
407 const MEDFileFieldLoc& getLocalizationFromId(int locId) const throw(INTERP_KERNEL::Exception);
408 const MEDFileFieldLoc& getLocalization(const char *locName) const throw(INTERP_KERNEL::Exception);
409 MEDFileFieldLoc& getLocalizationFromId(int locId) throw(INTERP_KERNEL::Exception);
410 MEDFileFieldLoc& getLocalization(const char *locName) throw(INTERP_KERNEL::Exception);
411 const DataArrayInt *getProfile(const char *pflName) const throw(INTERP_KERNEL::Exception);
412 const DataArrayInt *getProfileFromId(int pflId) const throw(INTERP_KERNEL::Exception);
413 DataArrayInt *getProfile(const char *pflName) throw(INTERP_KERNEL::Exception);
414 DataArrayInt *getProfileFromId(int pflId) throw(INTERP_KERNEL::Exception);
415 void killProfileIds(const std::vector<int>& pflIds) throw(INTERP_KERNEL::Exception);
416 void killLocalizationIds(const std::vector<int>& locIds) throw(INTERP_KERNEL::Exception);
418 void appendProfile(DataArrayInt *pfl) throw(INTERP_KERNEL::Exception);
419 void appendLoc(const char *locName, INTERP_KERNEL::NormalizedCellType geoType, const std::vector<double>& refCoo, const std::vector<double>& gsCoo, const std::vector<double>& w) throw(INTERP_KERNEL::Exception);
421 MEDFileFieldGlobs *contentNotNull() throw(INTERP_KERNEL::Exception);
422 const MEDFileFieldGlobs *contentNotNull() const throw(INTERP_KERNEL::Exception);
424 MEDCouplingAutoRefCountObjectPtr< MEDFileFieldGlobs > _globals;
427 class MEDLOADER_EXPORT MEDFileFieldNameScope
430 MEDFileFieldNameScope();
431 MEDFileFieldNameScope(const char *fieldName);
432 std::string getName() const throw(INTERP_KERNEL::Exception);
433 void setName(const char *fieldName) throw(INTERP_KERNEL::Exception);
434 std::string getDtUnit() const throw(INTERP_KERNEL::Exception);
435 void setDtUnit(const char *dtUnit) throw(INTERP_KERNEL::Exception);
436 void copyNameScope(const MEDFileFieldNameScope& other);
439 std::string _dt_unit;
443 * SDA is for Shared Data Arrays such as profiles.
445 class MEDLOADER_EXPORT MEDFileAnyTypeField1TSWithoutSDA : public RefCountObject, public MEDFileFieldNameScope
448 MEDFileAnyTypeField1TSWithoutSDA();
449 MEDFileAnyTypeField1TSWithoutSDA(const char *fieldName, int csit, int iteration, int order);
450 int getIteration() const { return _iteration; }
451 int getOrder() const { return _order; }
452 double getTime(int& iteration, int& order) const { iteration=_iteration; order=_order; return _dt; }
453 void setTime(int iteration, int order, double val) { _dt=val; _iteration=iteration; _order=order; }
454 int getDimension() const;
455 std::string getMeshName() const throw(INTERP_KERNEL::Exception);
456 void setMeshName(const char *newMeshName) throw(INTERP_KERNEL::Exception);
457 bool changeMeshNames(const std::vector< std::pair<std::string,std::string> >& modifTab) throw(INTERP_KERNEL::Exception);
458 int getMeshIteration() const throw(INTERP_KERNEL::Exception);
459 int getMeshOrder() const throw(INTERP_KERNEL::Exception);
460 bool isDealingTS(int iteration, int order) const;
461 std::pair<int,int> getDtIt() const;
462 void fillIteration(std::pair<int,int>& p) const;
463 void fillTypesOfFieldAvailable(std::vector<TypeOfField>& types) const throw(INTERP_KERNEL::Exception);
464 std::vector<TypeOfField> getTypesOfFieldAvailable() const throw(INTERP_KERNEL::Exception);
466 std::vector<std::string> getPflsReallyUsed2() const;
467 std::vector<std::string> getLocsReallyUsed2() const;
468 std::vector<std::string> getPflsReallyUsedMulti2() const;
469 std::vector<std::string> getLocsReallyUsedMulti2() const;
470 void changePflsRefsNamesGen2(const std::vector< std::pair<std::vector<std::string>, std::string > >& mapOfModif) throw(INTERP_KERNEL::Exception);
471 void changeLocsRefsNamesGen2(const std::vector< std::pair<std::vector<std::string>, std::string > >& mapOfModif) throw(INTERP_KERNEL::Exception);
473 int getNonEmptyLevels(const char *mname, std::vector<int>& levs) const throw(INTERP_KERNEL::Exception);
474 std::vector< std::vector<std::pair<int,int> > > getFieldSplitedByType(const char *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 throw(INTERP_KERNEL::Exception);
476 MEDFileFieldPerMeshPerTypePerDisc *getLeafGivenMeshAndTypeAndLocId(const char *mName, INTERP_KERNEL::NormalizedCellType typ, int locId) throw(INTERP_KERNEL::Exception);
477 const MEDFileFieldPerMeshPerTypePerDisc *getLeafGivenMeshAndTypeAndLocId(const char *mName, INTERP_KERNEL::NormalizedCellType typ, int locId) const throw(INTERP_KERNEL::Exception);
478 void deepCpyLeavesFrom(const MEDFileAnyTypeField1TSWithoutSDA& other) throw(INTERP_KERNEL::Exception);
480 int getNumberOfComponents() const;
481 const std::vector<std::string>& getInfo() const;
482 std::vector<std::string>& getInfo();
483 void setInfo(const std::vector<std::string>& infos) throw(INTERP_KERNEL::Exception);
484 std::size_t getHeapMemorySize() const;
485 int copyTinyInfoFrom(const MEDCouplingFieldDouble *field, const DataArray *arr) throw(INTERP_KERNEL::Exception);
486 void setFieldNoProfileSBT(const MEDCouplingFieldDouble *field, const DataArray *arr, MEDFileFieldGlobsReal& glob, const MEDFileFieldNameScope& nasc) throw(INTERP_KERNEL::Exception);
487 void setFieldProfile(const MEDCouplingFieldDouble *field, const DataArray *arrOfVals, const MEDFileMesh *mesh, int meshDimRelToMax, const DataArrayInt *profile, MEDFileFieldGlobsReal& glob, const MEDFileFieldNameScope& nasc) throw(INTERP_KERNEL::Exception);
488 virtual void simpleRepr(int bkOffset, std::ostream& oss, int f1tsId) const;
489 virtual MEDFileAnyTypeField1TSWithoutSDA *deepCpy() const throw(INTERP_KERNEL::Exception) = 0;
490 virtual MEDFileAnyTypeField1TSWithoutSDA *shallowCpy() const throw(INTERP_KERNEL::Exception) = 0;
491 virtual std::vector< MEDCouplingAutoRefCountObjectPtr<MEDFileAnyTypeField1TSWithoutSDA> > splitComponents() const throw(INTERP_KERNEL::Exception);
492 virtual const char *getTypeStr() const throw(INTERP_KERNEL::Exception) = 0;
493 virtual DataArray *getUndergroundDataArray() const throw(INTERP_KERNEL::Exception) = 0;
494 virtual DataArray *getUndergroundDataArrayExt(std::vector< std::pair<std::pair<INTERP_KERNEL::NormalizedCellType,int>,std::pair<int,int> > >& entries) const throw(INTERP_KERNEL::Exception) = 0;
495 virtual void setArray(DataArray *arr) throw(INTERP_KERNEL::Exception) = 0;
496 virtual DataArray *createNewEmptyDataArrayInstance() const = 0;
497 virtual DataArray *getOrCreateAndGetArray() = 0;
498 virtual const DataArray *getOrCreateAndGetArray() const = 0;
500 MEDCouplingFieldDouble *getFieldAtLevel(TypeOfField type, int meshDimRelToMax, const char *mName, int renumPol, const MEDFileFieldGlobsReal *glob, MEDCouplingAutoRefCountObjectPtr<DataArray> &arrOut, const MEDFileFieldNameScope& nasc) const throw(INTERP_KERNEL::Exception);
501 MEDCouplingFieldDouble *getFieldOnMeshAtLevel(TypeOfField type, int meshDimRelToMax, int renumPol, const MEDFileFieldGlobsReal *glob, const MEDFileMesh *mesh, MEDCouplingAutoRefCountObjectPtr<DataArray> &arrOut, const MEDFileFieldNameScope& nasc) const throw(INTERP_KERNEL::Exception);
502 MEDCouplingFieldDouble *getFieldAtTopLevel(TypeOfField type, const char *mName, int renumPol, const MEDFileFieldGlobsReal *glob, MEDCouplingAutoRefCountObjectPtr<DataArray> &arrOut, const MEDFileFieldNameScope& nasc) const throw(INTERP_KERNEL::Exception);
503 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 throw(INTERP_KERNEL::Exception);
504 DataArray *getFieldWithProfile(TypeOfField type, int meshDimRelToMax, const MEDFileMesh *mesh, DataArrayInt *&pfl, const MEDFileFieldGlobsReal *glob, const MEDFileFieldNameScope& nasc) const throw(INTERP_KERNEL::Exception);
506 bool renumberEntitiesLyingOnMesh(const char *meshName, const std::vector<int>& oldCode, const std::vector<int>& newCode, const DataArrayInt *renumO2N, MEDFileFieldGlobsReal& glob) throw(INTERP_KERNEL::Exception);
507 std::vector< MEDCouplingAutoRefCountObjectPtr<MEDFileAnyTypeField1TSWithoutSDA> > splitDiscretizations() const throw(INTERP_KERNEL::Exception);
508 int keepOnlySpatialDiscretization(TypeOfField tof, std::vector< std::pair<int,int> >& its) throw(INTERP_KERNEL::Exception);
510 void allocNotFromFile(int newNbOfTuples) throw(INTERP_KERNEL::Exception);
511 bool allocIfNecessaryTheArrayToReceiveDataFromFile() throw(INTERP_KERNEL::Exception);
512 void loadOnlyStructureOfDataRecursively(med_idt fid, const MEDFileFieldNameScope& nasc) throw(INTERP_KERNEL::Exception);
513 void loadBigArraysRecursively(med_idt fid, const MEDFileFieldNameScope& nasc) throw(INTERP_KERNEL::Exception);
514 void loadBigArraysRecursivelyIfNecessary(med_idt fid, const MEDFileFieldNameScope& nasc) throw(INTERP_KERNEL::Exception);
515 void loadStructureAndBigArraysRecursively(med_idt fid, const MEDFileFieldNameScope& nasc) throw(INTERP_KERNEL::Exception);
516 void releaseArrays() throw(INTERP_KERNEL::Exception);
517 void writeLL(med_idt fid, const MEDFileWritable& opts, const MEDFileFieldNameScope& nasc) const throw(INTERP_KERNEL::Exception);
519 int getMeshIdFromMeshName(const char *mName) const throw(INTERP_KERNEL::Exception);
520 int addNewEntryIfNecessary(const MEDCouplingMesh *mesh) throw(INTERP_KERNEL::Exception);
521 void updateData(int newLgth, const std::vector< std::pair<int,int> >& oldStartStops) throw(INTERP_KERNEL::Exception);
523 std::vector< MEDCouplingAutoRefCountObjectPtr< MEDFileFieldPerMesh > > _field_per_mesh;
528 //! only useable on reading
530 // -3 means allocated and build from scratch
531 // -2 means allocated and read from a file
532 // -1 means not allocated and build from scratch
533 // >=0 means not allocated and read from a file
534 mutable int _nb_of_tuples_to_be_allocated;
537 class MEDFileIntField1TSWithoutSDA;
540 * SDA is for Shared Data Arrays such as profiles.
542 class MEDLOADER_EXPORT MEDFileField1TSWithoutSDA : public MEDFileAnyTypeField1TSWithoutSDA
545 const char *getTypeStr() const throw(INTERP_KERNEL::Exception);
546 DataArray *getUndergroundDataArray() const throw(INTERP_KERNEL::Exception);
547 DataArray *getUndergroundDataArrayExt(std::vector< std::pair<std::pair<INTERP_KERNEL::NormalizedCellType,int>,std::pair<int,int> > >& entries) const throw(INTERP_KERNEL::Exception);
548 DataArrayDouble *getUndergroundDataArrayDouble() const throw(INTERP_KERNEL::Exception);
549 DataArrayDouble *getUndergroundDataArrayDoubleExt(std::vector< std::pair<std::pair<INTERP_KERNEL::NormalizedCellType,int>,std::pair<int,int> > >& entries) const throw(INTERP_KERNEL::Exception);
550 std::vector< std::vector<DataArrayDouble *> > getFieldSplitedByType2(const char *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 throw(INTERP_KERNEL::Exception);
551 static void CheckMeshDimRel(int meshDimRelToMax) throw(INTERP_KERNEL::Exception);
552 static std::vector<int> CheckSBTMesh(const MEDCouplingMesh *mesh) throw(INTERP_KERNEL::Exception);
553 static MEDFileField1TSWithoutSDA *New(const char *fieldName, int csit, int iteration, int order, const std::vector<std::string>& infos);
555 MEDFileField1TSWithoutSDA();
556 MEDFileField1TSWithoutSDA(const char *fieldName, int csit, int iteration, int order, const std::vector<std::string>& infos);
557 MEDFileAnyTypeField1TSWithoutSDA *shallowCpy() const throw(INTERP_KERNEL::Exception);
558 MEDFileAnyTypeField1TSWithoutSDA *deepCpy() const throw(INTERP_KERNEL::Exception);
559 void setArray(DataArray *arr) throw(INTERP_KERNEL::Exception);
560 DataArray *createNewEmptyDataArrayInstance() const;
561 DataArray *getOrCreateAndGetArray();
562 const DataArray *getOrCreateAndGetArray() const;
563 DataArrayDouble *getOrCreateAndGetArrayDouble();
564 const DataArrayDouble *getOrCreateAndGetArrayDouble() const;
565 MEDFileIntField1TSWithoutSDA *convertToInt() const throw(INTERP_KERNEL::Exception);
567 MEDCouplingAutoRefCountObjectPtr< DataArrayDouble > _arr;
569 static const char TYPE_STR[];
573 * SDA is for Shared Data Arrays such as profiles.
575 class MEDLOADER_EXPORT MEDFileIntField1TSWithoutSDA : public MEDFileAnyTypeField1TSWithoutSDA
578 MEDFileIntField1TSWithoutSDA();
579 static MEDFileIntField1TSWithoutSDA *New(const char *fieldName, int csit, int iteration, int order, const std::vector<std::string>& infos);
580 MEDFileAnyTypeField1TSWithoutSDA *deepCpy() const throw(INTERP_KERNEL::Exception);
581 MEDFileAnyTypeField1TSWithoutSDA *shallowCpy() const throw(INTERP_KERNEL::Exception);
582 const char *getTypeStr() const throw(INTERP_KERNEL::Exception);
583 DataArray *getUndergroundDataArray() const throw(INTERP_KERNEL::Exception);
584 DataArray *getUndergroundDataArrayExt(std::vector< std::pair<std::pair<INTERP_KERNEL::NormalizedCellType,int>,std::pair<int,int> > >& entries) const throw(INTERP_KERNEL::Exception);
585 void setArray(DataArray *arr) throw(INTERP_KERNEL::Exception);
586 DataArray *createNewEmptyDataArrayInstance() const;
587 DataArray *getOrCreateAndGetArray();
588 const DataArray *getOrCreateAndGetArray() const;
589 DataArrayInt *getOrCreateAndGetArrayInt();
590 const DataArrayInt *getOrCreateAndGetArrayInt() const;
591 DataArrayInt *getUndergroundDataArrayInt() const throw(INTERP_KERNEL::Exception);
592 DataArrayInt *getUndergroundDataArrayIntExt(std::vector< std::pair<std::pair<INTERP_KERNEL::NormalizedCellType,int>,std::pair<int,int> > >& entries) const throw(INTERP_KERNEL::Exception);
593 MEDFileField1TSWithoutSDA *convertToDouble() const throw(INTERP_KERNEL::Exception);
595 MEDFileIntField1TSWithoutSDA(const char *fieldName, int csit, int iteration, int order, const std::vector<std::string>& infos);
597 MEDCouplingAutoRefCountObjectPtr< DataArrayInt > _arr;
599 static const char TYPE_STR[];
605 class MEDLOADER_EXPORT MEDFileAnyTypeField1TS : public RefCountObject, public MEDFileWritable, public MEDFileFieldGlobsReal
608 MEDFileAnyTypeField1TS();
609 MEDFileAnyTypeField1TS(const char *fileName, bool loadAll) throw(INTERP_KERNEL::Exception);
610 MEDFileAnyTypeField1TS(const char *fileName, const char *fieldName, bool loadAll) throw(INTERP_KERNEL::Exception);
611 MEDFileAnyTypeField1TS(const char *fileName, const char *fieldName, int iteration, int order, bool loadAll) throw(INTERP_KERNEL::Exception);
612 MEDFileAnyTypeField1TS(const MEDFileAnyTypeField1TSWithoutSDA& other, bool shallowCopyOfContent);
613 static MEDFileAnyTypeField1TS *BuildNewInstanceFromContent(MEDFileAnyTypeField1TSWithoutSDA *c, const char *fileName) throw(INTERP_KERNEL::Exception);
614 static MEDFileAnyTypeField1TSWithoutSDA *BuildContentFrom(med_idt fid, const char *fileName, bool loadAll) throw(INTERP_KERNEL::Exception);
615 static MEDFileAnyTypeField1TSWithoutSDA *BuildContentFrom(med_idt fid, const char *fileName, const char *fieldName, bool loadAll) throw(INTERP_KERNEL::Exception);
616 static MEDFileAnyTypeField1TSWithoutSDA *BuildContentFrom(med_idt fid, const char *fileName, const char *fieldName, int iteration, int order, bool loadAll) throw(INTERP_KERNEL::Exception);
617 void writeLL(med_idt fid) const throw(INTERP_KERNEL::Exception);
618 // direct forwarding to MEDFileAnyTypeField1TSWithoutSDA instance _content
620 static MEDFileAnyTypeField1TS *New(const char *fileName, bool loadAll=true) throw(INTERP_KERNEL::Exception);
621 static MEDFileAnyTypeField1TS *New(const char *fileName, const char *fieldName, bool loadAll=true) throw(INTERP_KERNEL::Exception);
622 static MEDFileAnyTypeField1TS *New(const char *fileName, const char *fieldName, int iteration, int order, bool loadAll=true) throw(INTERP_KERNEL::Exception);
623 int getDimension() const;
624 int getIteration() const;
625 int getOrder() const;
626 double getTime(int& iteration, int& order) const;
627 void setTime(int iteration, int order, double val);
628 std::string getName() const;
629 void setName(const char *name);
630 std::string simpleRepr() const;
631 void simpleRepr(int bkOffset, std::ostream& oss, int f1tsId) const;
632 std::string getDtUnit() const throw(INTERP_KERNEL::Exception);
633 void setDtUnit(const char *dtUnit) throw(INTERP_KERNEL::Exception);
634 std::string getMeshName() const throw(INTERP_KERNEL::Exception);
635 void setMeshName(const char *newMeshName) throw(INTERP_KERNEL::Exception);
636 bool changeMeshNames(const std::vector< std::pair<std::string,std::string> >& modifTab) throw(INTERP_KERNEL::Exception);
637 int getMeshIteration() const throw(INTERP_KERNEL::Exception);
638 int getMeshOrder() const throw(INTERP_KERNEL::Exception);
639 int getNumberOfComponents() const;
640 bool isDealingTS(int iteration, int order) const;
641 std::pair<int,int> getDtIt() const;
642 void fillIteration(std::pair<int,int>& p) const;
643 void fillTypesOfFieldAvailable(std::vector<TypeOfField>& types) const throw(INTERP_KERNEL::Exception);
644 void setInfo(const std::vector<std::string>& infos) throw(INTERP_KERNEL::Exception);
645 const std::vector<std::string>& getInfo() const;
646 std::vector<std::string>& getInfo();
647 std::vector<TypeOfField> getTypesOfFieldAvailable() const throw(INTERP_KERNEL::Exception);
648 std::vector< std::vector<std::pair<int,int> > > getFieldSplitedByType(const char *mname, std::vector<INTERP_KERNEL::NormalizedCellType>& types, std::vector< std::vector<TypeOfField> >& typesF,
649 std::vector< std::vector<std::string> >& pfls, std::vector< std::vector<std::string> >& locs) const throw(INTERP_KERNEL::Exception);
650 MEDFileFieldPerMeshPerTypePerDisc *getLeafGivenMeshAndTypeAndLocId(const char *mName, INTERP_KERNEL::NormalizedCellType typ, int locId) throw(INTERP_KERNEL::Exception);
651 const MEDFileFieldPerMeshPerTypePerDisc *getLeafGivenMeshAndTypeAndLocId(const char *mName, INTERP_KERNEL::NormalizedCellType typ, int locId) const throw(INTERP_KERNEL::Exception);
652 int getNonEmptyLevels(const char *mname, std::vector<int>& levs) const throw(INTERP_KERNEL::Exception);
654 void write(const char *fileName, int mode) const throw(INTERP_KERNEL::Exception);
655 void loadArrays() throw(INTERP_KERNEL::Exception);
656 void loadArraysIfNecessary() throw(INTERP_KERNEL::Exception);
657 void releaseArrays() throw(INTERP_KERNEL::Exception);
658 std::vector< MEDCouplingAutoRefCountObjectPtr< MEDFileAnyTypeField1TS > > splitComponents() const throw(INTERP_KERNEL::Exception);
659 std::vector< MEDCouplingAutoRefCountObjectPtr< MEDFileAnyTypeField1TS > > splitDiscretizations() const throw(INTERP_KERNEL::Exception);
660 MEDFileAnyTypeField1TS *deepCpy() const throw(INTERP_KERNEL::Exception);
661 int copyTinyInfoFrom(const MEDCouplingFieldDouble *field, const DataArray *arr) throw(INTERP_KERNEL::Exception);
662 virtual MEDFileAnyTypeField1TS *shallowCpy() const throw(INTERP_KERNEL::Exception) = 0;
664 //! underground method see MEDFileField1TSWithoutSDA::setProfileNameOnLeaf
665 void setProfileNameOnLeaf(const char *mName, INTERP_KERNEL::NormalizedCellType typ, int locId, const char *newPflName, bool forceRenameOnGlob=false) throw(INTERP_KERNEL::Exception);
666 //! underground method see MEDFileField1TSWithoutSDA::setLocNameOnLeaf
667 void setLocNameOnLeaf(const char *mName, INTERP_KERNEL::NormalizedCellType typ, int locId, const char *newLocName, bool forceRenameOnGlob=false) throw(INTERP_KERNEL::Exception);
668 std::size_t getHeapMemorySize() const;
669 std::vector<std::string> getPflsReallyUsed() const;
670 std::vector<std::string> getLocsReallyUsed() const;
671 std::vector<std::string> getPflsReallyUsedMulti() const;
672 std::vector<std::string> getLocsReallyUsedMulti() const;
673 void changePflsRefsNamesGen(const std::vector< std::pair<std::vector<std::string>, std::string > >& mapOfModif) throw(INTERP_KERNEL::Exception);
674 void changeLocsRefsNamesGen(const std::vector< std::pair<std::vector<std::string>, std::string > >& mapOfModif) throw(INTERP_KERNEL::Exception);
676 static int LocateField2(med_idt fid, const char *fileName, int fieldIdCFormat, bool checkFieldId, std::string& fieldName, med_field_type& typcha, std::vector<std::string>& infos, std::string& dtunitOut) throw(INTERP_KERNEL::Exception);
677 static int LocateField(med_idt fid, const char *fileName, const char *fieldName, int& posCFormat, med_field_type& typcha, std::vector<std::string>& infos, std::string& dtunitOut) throw(INTERP_KERNEL::Exception);
679 virtual med_field_type getMEDFileFieldType() const = 0;
680 MEDFileAnyTypeField1TSWithoutSDA *contentNotNullBase() throw(INTERP_KERNEL::Exception);
681 const MEDFileAnyTypeField1TSWithoutSDA *contentNotNullBase() const throw(INTERP_KERNEL::Exception);
683 MEDCouplingAutoRefCountObjectPtr<MEDFileAnyTypeField1TSWithoutSDA> _content;
686 class MEDFileIntField1TS;
691 class MEDLOADER_EXPORT MEDFileField1TS : public MEDFileAnyTypeField1TS
694 static MEDFileField1TS *New(const char *fileName, bool loadAll=true) throw(INTERP_KERNEL::Exception);
695 static MEDFileField1TS *New(const char *fileName, const char *fieldName, bool loadAll=true) throw(INTERP_KERNEL::Exception);
696 static MEDFileField1TS *New(const char *fileName, const char *fieldName, int iteration, int order, bool loadAll=true) throw(INTERP_KERNEL::Exception);
697 static MEDFileField1TS *New(const MEDFileField1TSWithoutSDA& other, bool shallowCopyOfContent);
698 static MEDFileField1TS *New();
699 MEDFileIntField1TS *convertToInt(bool deepCpyGlobs=true) const throw(INTERP_KERNEL::Exception);
701 MEDCouplingFieldDouble *getFieldAtLevel(TypeOfField type, int meshDimRelToMax, int renumPol=0) const throw(INTERP_KERNEL::Exception);
702 MEDCouplingFieldDouble *getFieldAtTopLevel(TypeOfField type, int renumPol=0) const throw(INTERP_KERNEL::Exception);
703 MEDCouplingFieldDouble *getFieldOnMeshAtLevel(TypeOfField type, int meshDimRelToMax, const MEDFileMesh *mesh, int renumPol=0) const throw(INTERP_KERNEL::Exception);
704 MEDCouplingFieldDouble *getFieldOnMeshAtLevel(TypeOfField type, const MEDCouplingMesh *mesh, int renumPol=0) const throw(INTERP_KERNEL::Exception);
705 MEDCouplingFieldDouble *getFieldAtLevelOld(TypeOfField type, const char *mname, int meshDimRelToMax, int renumPol=0) const throw(INTERP_KERNEL::Exception);
706 DataArrayDouble *getFieldWithProfile(TypeOfField type, int meshDimRelToMax, const MEDFileMesh *mesh, DataArrayInt *&pfl) const throw(INTERP_KERNEL::Exception);
708 void setFieldNoProfileSBT(const MEDCouplingFieldDouble *field) throw(INTERP_KERNEL::Exception);
709 void setFieldProfile(const MEDCouplingFieldDouble *field, const MEDFileMesh *mesh, int meshDimRelToMax, const DataArrayInt *profile) throw(INTERP_KERNEL::Exception);
710 // direct forwarding to MEDFileField1TSWithoutSDA instance _content
712 MEDFileAnyTypeField1TS *shallowCpy() const throw(INTERP_KERNEL::Exception);
713 DataArrayDouble *getUndergroundDataArray() const throw(INTERP_KERNEL::Exception);
714 DataArrayDouble *getUndergroundDataArrayExt(std::vector< std::pair<std::pair<INTERP_KERNEL::NormalizedCellType,int>,std::pair<int,int> > >& entries) const throw(INTERP_KERNEL::Exception);
716 std::vector< std::vector<DataArrayDouble *> > getFieldSplitedByType2(const char *mname, std::vector<INTERP_KERNEL::NormalizedCellType>& types, std::vector< std::vector<TypeOfField> >& typesF,
717 std::vector< std::vector<std::string> >& pfls, std::vector< std::vector<std::string> >& locs) const throw(INTERP_KERNEL::Exception);
719 static void SetDataArrayDoubleInField(MEDCouplingFieldDouble *f, MEDCouplingAutoRefCountObjectPtr<DataArray>& arr) throw(INTERP_KERNEL::Exception);
720 static DataArrayDouble *ReturnSafelyDataArrayDouble(MEDCouplingAutoRefCountObjectPtr<DataArray>& arr) throw(INTERP_KERNEL::Exception);
722 med_field_type getMEDFileFieldType() const { return MED_FLOAT64; }
723 const MEDFileField1TSWithoutSDA *contentNotNull() const throw(INTERP_KERNEL::Exception);
724 MEDFileField1TSWithoutSDA *contentNotNull() throw(INTERP_KERNEL::Exception);
726 MEDFileField1TS(const char *fileName, bool loadAll) throw(INTERP_KERNEL::Exception);
727 MEDFileField1TS(const char *fileName, const char *fieldName, bool loadAll) throw(INTERP_KERNEL::Exception);
728 MEDFileField1TS(const char *fileName, const char *fieldName, int iteration, int order, bool loadAll) throw(INTERP_KERNEL::Exception);
729 MEDFileField1TS(const MEDFileField1TSWithoutSDA& other, bool shallowCopyOfContent);
733 class MEDLOADER_EXPORT MEDFileIntField1TS : public MEDFileAnyTypeField1TS
736 static MEDFileIntField1TS *New();
737 static MEDFileIntField1TS *New(const char *fileName, bool loadAll=true) throw(INTERP_KERNEL::Exception);
738 static MEDFileIntField1TS *New(const char *fileName, const char *fieldName, bool loadAll=true) throw(INTERP_KERNEL::Exception);
739 static MEDFileIntField1TS *New(const char *fileName, const char *fieldName, int iteration, int order, bool loadAll=true) throw(INTERP_KERNEL::Exception);
740 static MEDFileIntField1TS *New(const MEDFileIntField1TSWithoutSDA& other, bool shallowCopyOfContent);
741 MEDFileField1TS *convertToDouble(bool deepCpyGlobs=true) const throw(INTERP_KERNEL::Exception);
742 MEDFileAnyTypeField1TS *shallowCpy() const throw(INTERP_KERNEL::Exception);
744 MEDCouplingFieldDouble *getFieldAtLevel(TypeOfField type, int meshDimRelToMax, DataArrayInt* &arrOut, int renumPol=0) const throw(INTERP_KERNEL::Exception);
745 MEDCouplingFieldDouble *getFieldAtTopLevel(TypeOfField type, DataArrayInt* &arrOut, int renumPol=0) const throw(INTERP_KERNEL::Exception);
746 MEDCouplingFieldDouble *getFieldOnMeshAtLevel(TypeOfField type, int meshDimRelToMax, const MEDFileMesh *mesh, DataArrayInt* &arrOut, int renumPol=0) const throw(INTERP_KERNEL::Exception);
747 MEDCouplingFieldDouble *getFieldOnMeshAtLevel(TypeOfField type, const MEDCouplingMesh *mesh, DataArrayInt* &arrOut, int renumPol=0) const throw(INTERP_KERNEL::Exception);
748 MEDCouplingFieldDouble *getFieldAtLevelOld(TypeOfField type, const char *mname, int meshDimRelToMax, DataArrayInt* &arrOut, int renumPol=0) const throw(INTERP_KERNEL::Exception);
749 DataArrayInt *getFieldWithProfile(TypeOfField type, int meshDimRelToMax, const MEDFileMesh *mesh, DataArrayInt *&pfl) const throw(INTERP_KERNEL::Exception);
751 void setFieldNoProfileSBT(const MEDCouplingFieldDouble *field, const DataArrayInt *arrOfVals) throw(INTERP_KERNEL::Exception);
752 void setFieldProfile(const MEDCouplingFieldDouble *field, const DataArrayInt *arrOfVals, const MEDFileMesh *mesh, int meshDimRelToMax, const DataArrayInt *profile) throw(INTERP_KERNEL::Exception);
753 DataArrayInt *getUndergroundDataArray() const throw(INTERP_KERNEL::Exception);
755 static DataArrayInt *ReturnSafelyDataArrayInt(MEDCouplingAutoRefCountObjectPtr<DataArray>& arr) throw(INTERP_KERNEL::Exception);
757 med_field_type getMEDFileFieldType() const { return MED_INT32; }
758 const MEDFileIntField1TSWithoutSDA *contentNotNull() const throw(INTERP_KERNEL::Exception);
759 MEDFileIntField1TSWithoutSDA *contentNotNull() throw(INTERP_KERNEL::Exception);
761 MEDFileIntField1TS();
762 MEDFileIntField1TS(const char *fileName, bool loadAll) throw(INTERP_KERNEL::Exception);
763 MEDFileIntField1TS(const char *fileName, const char *fieldName, bool loadAll) throw(INTERP_KERNEL::Exception);
764 MEDFileIntField1TS(const char *fileName, const char *fieldName, int iteration, int order, bool loadAll) throw(INTERP_KERNEL::Exception);
765 MEDFileIntField1TS(const MEDFileIntField1TSWithoutSDA& other, bool shallowCopyOfContent);
768 class MEDLOADER_EXPORT MEDFileAnyTypeFieldMultiTSWithoutSDA : public RefCountObject, public MEDFileFieldNameScope
771 MEDFileAnyTypeFieldMultiTSWithoutSDA();
772 MEDFileAnyTypeFieldMultiTSWithoutSDA(const char *fieldName);
773 MEDFileAnyTypeFieldMultiTSWithoutSDA(med_idt fid, int fieldId, bool loadAll) throw(INTERP_KERNEL::Exception);
774 MEDFileAnyTypeFieldMultiTSWithoutSDA(med_idt fid, const char *fieldName, med_field_type fieldTyp, const std::vector<std::string>& infos, int nbOfStep, const std::string& dtunit, bool loadAll) throw(INTERP_KERNEL::Exception);
776 std::size_t getHeapMemorySize() const;
777 virtual MEDFileAnyTypeFieldMultiTSWithoutSDA *deepCpy() const throw(INTERP_KERNEL::Exception);
778 virtual std::vector< MEDCouplingAutoRefCountObjectPtr<MEDFileAnyTypeFieldMultiTSWithoutSDA> > splitComponents() const throw(INTERP_KERNEL::Exception);
779 virtual std::vector< MEDCouplingAutoRefCountObjectPtr<MEDFileAnyTypeFieldMultiTSWithoutSDA> > splitDiscretizations() const throw(INTERP_KERNEL::Exception);
780 virtual const char *getTypeStr() const throw(INTERP_KERNEL::Exception) = 0;
781 virtual MEDFileAnyTypeFieldMultiTSWithoutSDA *shallowCpy() const throw(INTERP_KERNEL::Exception) = 0;
782 virtual MEDFileAnyTypeFieldMultiTSWithoutSDA *createNew() const throw(INTERP_KERNEL::Exception) = 0;
783 virtual MEDFileAnyTypeField1TSWithoutSDA *createNew1TSWithoutSDAEmptyInstance() const throw(INTERP_KERNEL::Exception) = 0;
784 virtual void checkCoherencyOfType(const MEDFileAnyTypeField1TSWithoutSDA *f1ts) const throw(INTERP_KERNEL::Exception) = 0;
785 const std::vector<std::string>& getInfo() const throw(INTERP_KERNEL::Exception);
786 void setInfo(const std::vector<std::string>& info) throw(INTERP_KERNEL::Exception);
787 int getTimeStepPos(int iteration, int order) const throw(INTERP_KERNEL::Exception);
788 const MEDFileAnyTypeField1TSWithoutSDA& getTimeStepEntry(int iteration, int order) const throw(INTERP_KERNEL::Exception);
789 MEDFileAnyTypeField1TSWithoutSDA& getTimeStepEntry(int iteration, int order) throw(INTERP_KERNEL::Exception);
790 std::string getMeshName() const throw(INTERP_KERNEL::Exception);
791 void setMeshName(const char *newMeshName) throw(INTERP_KERNEL::Exception);
792 bool changeMeshNames(const std::vector< std::pair<std::string,std::string> >& modifTab) throw(INTERP_KERNEL::Exception);
793 int getNumberOfTS() const;
794 void eraseEmptyTS() throw(INTERP_KERNEL::Exception);
795 void eraseTimeStepIds(const int *startIds, const int *endIds) throw(INTERP_KERNEL::Exception);
796 void eraseTimeStepIds2(int bg, int end, int step) throw(INTERP_KERNEL::Exception);
797 MEDFileAnyTypeFieldMultiTSWithoutSDA *buildFromTimeStepIds(const int *startIds, const int *endIds) const throw(INTERP_KERNEL::Exception);
798 MEDFileAnyTypeFieldMultiTSWithoutSDA *buildFromTimeStepIds2(int bg, int end, int step) const throw(INTERP_KERNEL::Exception);
799 MEDFileAnyTypeFieldMultiTSWithoutSDA *partOfThisLyingOnSpecifiedTimeSteps(const std::vector< std::pair<int,int> >& timeSteps) const throw(INTERP_KERNEL::Exception);
800 MEDFileAnyTypeFieldMultiTSWithoutSDA *partOfThisNotLyingOnSpecifiedTimeSteps(const std::vector< std::pair<int,int> >& timeSteps) const throw(INTERP_KERNEL::Exception);
801 int getPosOfTimeStep(int iteration, int order) const throw(INTERP_KERNEL::Exception);
802 int getPosGivenTime(double time, double eps=1e-8) const throw(INTERP_KERNEL::Exception);
803 std::vector< std::pair<int,int> > getIterations() const;
804 std::vector< std::pair<int,int> > getTimeSteps(std::vector<double>& ret1) const throw(INTERP_KERNEL::Exception);
805 void pushBackTimeStep(MEDCouplingAutoRefCountObjectPtr<MEDFileAnyTypeField1TSWithoutSDA>& tse) throw(INTERP_KERNEL::Exception);
806 void synchronizeNameScope() throw(INTERP_KERNEL::Exception);
807 void simpleRepr(int bkOffset, std::ostream& oss, int fmtsId) const;
808 int getNonEmptyLevels(int iteration, int order, const char *mname, std::vector<int>& levs) const throw(INTERP_KERNEL::Exception);
809 void appendFieldNoProfileSBT(const MEDCouplingFieldDouble *field, const DataArray *arr, MEDFileFieldGlobsReal& glob) throw(INTERP_KERNEL::Exception);
810 void appendFieldProfile(const MEDCouplingFieldDouble *field, const DataArray *arr, const MEDFileMesh *mesh, int meshDimRelToMax, const DataArrayInt *profile, MEDFileFieldGlobsReal& glob) throw(INTERP_KERNEL::Exception);
811 std::vector< std::vector< std::pair<int,int> > > getFieldSplitedByType(int iteration, int order, const char *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 throw(INTERP_KERNEL::Exception);
812 std::vector< std::vector<TypeOfField> > getTypesOfFieldAvailable() const throw(INTERP_KERNEL::Exception);
813 DataArray *getUndergroundDataArray(int iteration, int order) const throw(INTERP_KERNEL::Exception);
814 DataArray *getUndergroundDataArrayExt(int iteration, int order, std::vector< std::pair<std::pair<INTERP_KERNEL::NormalizedCellType,int>,std::pair<int,int> > >& entries) const throw(INTERP_KERNEL::Exception);
815 bool renumberEntitiesLyingOnMesh(const char *meshName, const std::vector<int>& oldCode, const std::vector<int>& newCode, const DataArrayInt *renumO2N, MEDFileFieldGlobsReal& glob) throw(INTERP_KERNEL::Exception);
816 void loadStructureOrStructureAndBigArraysRecursively(med_idt fid, int nbPdt, med_field_type fieldTyp, bool loadAll) throw(INTERP_KERNEL::Exception);
817 void writeLL(med_idt fid, const MEDFileWritable& opts) const throw(INTERP_KERNEL::Exception);
818 void loadBigArraysRecursively(med_idt fid, const MEDFileFieldNameScope& nasc) throw(INTERP_KERNEL::Exception);
819 void loadBigArraysRecursivelyIfNecessary(med_idt fid, const MEDFileFieldNameScope& nasc) throw(INTERP_KERNEL::Exception);
820 void releaseArrays() throw(INTERP_KERNEL::Exception);
822 const MEDFileAnyTypeField1TSWithoutSDA *getTimeStepAtPos2(int pos) const throw(INTERP_KERNEL::Exception);
823 MEDFileAnyTypeField1TSWithoutSDA *getTimeStepAtPos2(int pos) throw(INTERP_KERNEL::Exception);
824 std::vector<std::string> getPflsReallyUsed2() const;
825 std::vector<std::string> getLocsReallyUsed2() const;
826 std::vector<std::string> getPflsReallyUsedMulti2() const;
827 std::vector<std::string> getLocsReallyUsedMulti2() const;
828 void changePflsRefsNamesGen2(const std::vector< std::pair<std::vector<std::string>, std::string > >& mapOfModif) throw(INTERP_KERNEL::Exception);
829 void changeLocsRefsNamesGen2(const std::vector< std::pair<std::vector<std::string>, std::string > >& mapOfModif) throw(INTERP_KERNEL::Exception);
830 void setIteration(int i, MEDCouplingAutoRefCountObjectPtr<MEDFileAnyTypeField1TSWithoutSDA> ts) throw(INTERP_KERNEL::Exception);
832 virtual med_field_type getMEDFileFieldType() const = 0;
833 void copyTinyInfoFrom(const MEDCouplingFieldDouble *field, const DataArray *arr) throw(INTERP_KERNEL::Exception);
834 void checkCoherencyOfTinyInfo(const MEDCouplingFieldDouble *field, const DataArray *arr) const throw(INTERP_KERNEL::Exception);
835 void checkThatComponentsMatch(const std::vector<std::string>& compos) const throw(INTERP_KERNEL::Exception);
836 void checkThatNbOfCompoOfTSMatchThis() const throw(INTERP_KERNEL::Exception);
838 std::vector<std::string> _infos;
839 std::vector< MEDCouplingAutoRefCountObjectPtr<MEDFileAnyTypeField1TSWithoutSDA> > _time_steps;
842 class MEDFileIntFieldMultiTSWithoutSDA;
844 class MEDLOADER_EXPORT MEDFileFieldMultiTSWithoutSDA : public MEDFileAnyTypeFieldMultiTSWithoutSDA
847 static MEDFileFieldMultiTSWithoutSDA *New(med_idt fid, const char *fieldName, med_field_type fieldTyp, const std::vector<std::string>& infos, int nbOfStep, const std::string& dtunit, bool loadAll) throw(INTERP_KERNEL::Exception);
848 MEDFileFieldMultiTSWithoutSDA(med_idt fid, int fieldId, bool loadAll) throw(INTERP_KERNEL::Exception);
849 const char *getTypeStr() const throw(INTERP_KERNEL::Exception);
850 MEDFileAnyTypeFieldMultiTSWithoutSDA *shallowCpy() const throw(INTERP_KERNEL::Exception);
851 MEDFileAnyTypeFieldMultiTSWithoutSDA *createNew() const throw(INTERP_KERNEL::Exception);
852 std::vector< std::vector<DataArrayDouble *> > getFieldSplitedByType2(int iteration, int order, const char *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 throw(INTERP_KERNEL::Exception);
853 MEDFileIntFieldMultiTSWithoutSDA *convertToInt() const throw(INTERP_KERNEL::Exception);
855 MEDFileFieldMultiTSWithoutSDA(const char *fieldName);
856 MEDFileFieldMultiTSWithoutSDA(med_idt fid, const char *fieldName, med_field_type fieldTyp, const std::vector<std::string>& infos, int nbOfStep, const std::string& dtunit, bool loadAll) throw(INTERP_KERNEL::Exception);
857 med_field_type getMEDFileFieldType() const { return MED_FLOAT64; }
858 MEDFileAnyTypeField1TSWithoutSDA *createNew1TSWithoutSDAEmptyInstance() const throw(INTERP_KERNEL::Exception);
859 void checkCoherencyOfType(const MEDFileAnyTypeField1TSWithoutSDA *f1ts) const throw(INTERP_KERNEL::Exception);
861 MEDFileFieldMultiTSWithoutSDA();
864 class MEDLOADER_EXPORT MEDFileIntFieldMultiTSWithoutSDA : public MEDFileAnyTypeFieldMultiTSWithoutSDA
867 static MEDFileIntFieldMultiTSWithoutSDA *New(med_idt fid, const char *fieldName, med_field_type fieldTyp, const std::vector<std::string>& infos, int nbOfStep, const std::string& dtunit, bool loadAll) throw(INTERP_KERNEL::Exception);
868 MEDFileIntFieldMultiTSWithoutSDA(med_idt fid, int fieldId, bool loadAll) throw(INTERP_KERNEL::Exception);
869 const char *getTypeStr() const throw(INTERP_KERNEL::Exception);
870 MEDFileAnyTypeFieldMultiTSWithoutSDA *shallowCpy() const throw(INTERP_KERNEL::Exception);
871 MEDFileAnyTypeFieldMultiTSWithoutSDA *createNew() const throw(INTERP_KERNEL::Exception);
872 MEDFileFieldMultiTSWithoutSDA *convertToDouble() const throw(INTERP_KERNEL::Exception);
874 MEDFileIntFieldMultiTSWithoutSDA(const char *fieldName);
875 MEDFileIntFieldMultiTSWithoutSDA(med_idt fid, const char *fieldName, med_field_type fieldTyp, const std::vector<std::string>& infos, int nbOfStep, const std::string& dtunit, bool loadAll) throw(INTERP_KERNEL::Exception);
876 med_field_type getMEDFileFieldType() const { return MED_INT32; }
877 MEDFileAnyTypeField1TSWithoutSDA *createNew1TSWithoutSDAEmptyInstance() const throw(INTERP_KERNEL::Exception);
878 void checkCoherencyOfType(const MEDFileAnyTypeField1TSWithoutSDA *f1ts) const throw(INTERP_KERNEL::Exception);
880 MEDFileIntFieldMultiTSWithoutSDA();
883 class MEDFileAnyTypeFieldMultiTSIterator;
888 class MEDLOADER_EXPORT MEDFileAnyTypeFieldMultiTS : public RefCountObject, public MEDFileWritable, public MEDFileFieldGlobsReal
891 MEDFileAnyTypeFieldMultiTS();
892 MEDFileAnyTypeFieldMultiTS(const char *fileName, bool loadAll) throw(INTERP_KERNEL::Exception);
893 MEDFileAnyTypeFieldMultiTS(const char *fileName, const char *fieldName, bool loadAll) throw(INTERP_KERNEL::Exception);
894 MEDFileAnyTypeFieldMultiTS(const MEDFileAnyTypeFieldMultiTSWithoutSDA& other, bool shallowCopyOfContent);
895 static MEDFileAnyTypeFieldMultiTS *BuildNewInstanceFromContent(MEDFileAnyTypeFieldMultiTSWithoutSDA *c, const char *fileName) throw(INTERP_KERNEL::Exception);
896 static MEDFileAnyTypeFieldMultiTSWithoutSDA *BuildContentFrom(med_idt fid, const char *fileName, bool loadAll) throw(INTERP_KERNEL::Exception);
897 static MEDFileAnyTypeFieldMultiTSWithoutSDA *BuildContentFrom(med_idt fid, const char *fileName, const char *fieldName, bool loadAll) throw(INTERP_KERNEL::Exception);
899 static MEDFileAnyTypeFieldMultiTS *New(const char *fileName, bool loadAll=true) throw(INTERP_KERNEL::Exception);
900 static MEDFileAnyTypeFieldMultiTS *New(const char *fileName, const char *fieldName, bool loadAll=true) throw(INTERP_KERNEL::Exception);
901 void loadArrays() throw(INTERP_KERNEL::Exception);
902 void loadArraysIfNecessary() throw(INTERP_KERNEL::Exception);
903 void releaseArrays() throw(INTERP_KERNEL::Exception);
904 void write(const char *fileName, int mode) const throw(INTERP_KERNEL::Exception);
905 void writeLL(med_idt fid) const throw(INTERP_KERNEL::Exception);
906 std::size_t getHeapMemorySize() const;
907 virtual MEDFileAnyTypeFieldMultiTS *deepCpy() const throw(INTERP_KERNEL::Exception);
908 std::vector< MEDCouplingAutoRefCountObjectPtr< MEDFileAnyTypeFieldMultiTS > > splitComponents() const throw(INTERP_KERNEL::Exception);
909 std::vector< MEDCouplingAutoRefCountObjectPtr< MEDFileAnyTypeFieldMultiTS > > splitDiscretizations() const throw(INTERP_KERNEL::Exception);
910 virtual MEDFileAnyTypeFieldMultiTS *shallowCpy() const throw(INTERP_KERNEL::Exception) = 0;
911 virtual void checkCoherencyOfType(const MEDFileAnyTypeField1TS *f1ts) const throw(INTERP_KERNEL::Exception) = 0;
913 virtual MEDFileAnyTypeField1TS *getTimeStepAtPos(int pos) const throw(INTERP_KERNEL::Exception) = 0;
914 MEDFileAnyTypeField1TS *getTimeStep(int iteration, int order) const throw(INTERP_KERNEL::Exception);
915 MEDFileAnyTypeField1TS *getTimeStepGivenTime(double time, double eps=1e-8) const throw(INTERP_KERNEL::Exception);
916 static std::vector< std::vector<MEDFileAnyTypeFieldMultiTS *> > SplitIntoCommonTimeSeries(const std::vector<MEDFileAnyTypeFieldMultiTS *>& vectFMTS) throw(INTERP_KERNEL::Exception);
917 public:// direct forwarding to MEDFileField1TSWithoutSDA instance _content
918 std::string getName() const;
919 void setName(const char *name);
920 std::string getDtUnit() const throw(INTERP_KERNEL::Exception);
921 void setDtUnit(const char *dtUnit) throw(INTERP_KERNEL::Exception);
922 std::string getMeshName() const throw(INTERP_KERNEL::Exception);
923 void setMeshName(const char *newMeshName) throw(INTERP_KERNEL::Exception);
924 std::string simpleRepr() const;
925 void simpleRepr(int bkOffset, std::ostream& oss, int fmtsId) const;
926 int getNumberOfTS() const;
927 void eraseEmptyTS() throw(INTERP_KERNEL::Exception);
928 void eraseTimeStepIds(const int *startIds, const int *endIds) throw(INTERP_KERNEL::Exception);
929 void eraseTimeStepIds2(int bg, int end, int step) throw(INTERP_KERNEL::Exception);
930 MEDFileAnyTypeFieldMultiTS *buildSubPart(const int *startIds, const int *endIds) const throw(INTERP_KERNEL::Exception);
931 MEDFileAnyTypeFieldMultiTS *buildSubPartSlice(int bg, int end, int step) const throw(INTERP_KERNEL::Exception);
932 std::vector< std::pair<int,int> > getTimeSteps(std::vector<double>& ret1) const throw(INTERP_KERNEL::Exception);
933 std::vector< std::pair<int,int> > getIterations() const;
934 void pushBackTimeSteps(const std::vector<MEDFileAnyTypeField1TS *>& f1ts) throw(INTERP_KERNEL::Exception);
935 void pushBackTimeStep(MEDFileAnyTypeField1TS *f1ts) throw(INTERP_KERNEL::Exception);
936 void synchronizeNameScope() throw(INTERP_KERNEL::Exception);
937 int getPosOfTimeStep(int iteration, int order) const throw(INTERP_KERNEL::Exception);
938 int getPosGivenTime(double time, double eps=1e-8) const throw(INTERP_KERNEL::Exception);
939 MEDFileAnyTypeFieldMultiTSIterator *iterator() throw(INTERP_KERNEL::Exception);
940 bool changeMeshNames(const std::vector< std::pair<std::string,std::string> >& modifTab) throw(INTERP_KERNEL::Exception);
941 const std::vector<std::string>& getInfo() const throw(INTERP_KERNEL::Exception);
942 void setInfo(const std::vector<std::string>& info) throw(INTERP_KERNEL::Exception);
943 int getNumberOfComponents() const throw(INTERP_KERNEL::Exception);
944 int getNonEmptyLevels(int iteration, int order, const char *mname, std::vector<int>& levs) const throw(INTERP_KERNEL::Exception);
945 std::vector< std::vector<TypeOfField> > getTypesOfFieldAvailable() const throw(INTERP_KERNEL::Exception);
946 std::vector< std::vector< std::pair<int,int> > > getFieldSplitedByType(int iteration, int order, const char *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 throw(INTERP_KERNEL::Exception);
947 MEDCouplingAutoRefCountObjectPtr<MEDFileAnyTypeFieldMultiTSWithoutSDA> getContent();
949 std::vector<std::string> getPflsReallyUsed() const;
950 std::vector<std::string> getLocsReallyUsed() const;
951 std::vector<std::string> getPflsReallyUsedMulti() const;
952 std::vector<std::string> getLocsReallyUsedMulti() const;
953 void changePflsRefsNamesGen(const std::vector< std::pair<std::vector<std::string>, std::string > >& mapOfModif) throw(INTERP_KERNEL::Exception);
954 void changeLocsRefsNamesGen(const std::vector< std::pair<std::vector<std::string>, std::string > >& mapOfModif) throw(INTERP_KERNEL::Exception);
956 MEDFileAnyTypeFieldMultiTSWithoutSDA *contentNotNullBase() throw(INTERP_KERNEL::Exception);
957 const MEDFileAnyTypeFieldMultiTSWithoutSDA *contentNotNullBase() const throw(INTERP_KERNEL::Exception);
959 MEDCouplingAutoRefCountObjectPtr<MEDFileAnyTypeFieldMultiTSWithoutSDA> _content;
962 class MEDFileIntFieldMultiTS;
967 class MEDLOADER_EXPORT MEDFileFieldMultiTS : public MEDFileAnyTypeFieldMultiTS
970 static MEDFileFieldMultiTS *New();
971 static MEDFileFieldMultiTS *New(const char *fileName, bool loadAll=true) throw(INTERP_KERNEL::Exception);
972 static MEDFileFieldMultiTS *New(const char *fileName, const char *fieldName, bool loadAll=true) throw(INTERP_KERNEL::Exception);
973 static MEDFileFieldMultiTS *New(const MEDFileFieldMultiTSWithoutSDA& other, bool shallowCopyOfContent);
974 MEDFileAnyTypeFieldMultiTS *shallowCpy() const throw(INTERP_KERNEL::Exception);
975 void checkCoherencyOfType(const MEDFileAnyTypeField1TS *f1ts) const throw(INTERP_KERNEL::Exception);
976 MEDFileIntFieldMultiTS *convertToInt(bool deepCpyGlobs=true) const throw(INTERP_KERNEL::Exception);
978 MEDFileAnyTypeField1TS *getTimeStepAtPos(int pos) const throw(INTERP_KERNEL::Exception);
979 MEDFileAnyTypeField1TS *getTimeStep(int iteration, int order) const throw(INTERP_KERNEL::Exception);
980 MEDFileAnyTypeField1TS *getTimeStepGivenTime(double time, double eps=1e-8) const throw(INTERP_KERNEL::Exception);
982 MEDCouplingFieldDouble *getFieldAtLevel(TypeOfField type, int iteration, int order, int meshDimRelToMax, int renumPol=0) const throw(INTERP_KERNEL::Exception);
983 MEDCouplingFieldDouble *getFieldAtTopLevel(TypeOfField type, int iteration, int order, int renumPol=0) const throw(INTERP_KERNEL::Exception);
984 MEDCouplingFieldDouble *getFieldOnMeshAtLevel(TypeOfField type, int iteration, int order, int meshDimRelToMax, const MEDFileMesh *mesh, int renumPol=0) const throw(INTERP_KERNEL::Exception);
985 MEDCouplingFieldDouble *getFieldOnMeshAtLevel(TypeOfField type, int iteration, int order, const MEDCouplingMesh *mesh, int renumPol=0) const throw(INTERP_KERNEL::Exception);
986 MEDCouplingFieldDouble *getFieldAtLevelOld(TypeOfField type, const char *mname, int iteration, int order, int meshDimRelToMax, int renumPol=0) const throw(INTERP_KERNEL::Exception);
987 DataArrayDouble *getFieldWithProfile(TypeOfField type, int iteration, int order, int meshDimRelToMax, const MEDFileMesh *mesh, DataArrayInt *&pfl) const throw(INTERP_KERNEL::Exception);
989 void appendFieldNoProfileSBT(const MEDCouplingFieldDouble *field) throw(INTERP_KERNEL::Exception);
990 void appendFieldProfile(const MEDCouplingFieldDouble *field, const MEDFileMesh *mesh, int meshDimRelToMax, const DataArrayInt *profile) throw(INTERP_KERNEL::Exception);
991 std::vector< std::vector<DataArrayDouble *> > getFieldSplitedByType2(int iteration, int order, const char *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 throw(INTERP_KERNEL::Exception);
992 DataArrayDouble *getUndergroundDataArray(int iteration, int order) const throw(INTERP_KERNEL::Exception);
993 DataArrayDouble *getUndergroundDataArrayExt(int iteration, int order, std::vector< std::pair<std::pair<INTERP_KERNEL::NormalizedCellType,int>,std::pair<int,int> > >& entries) const throw(INTERP_KERNEL::Exception);
995 const MEDFileFieldMultiTSWithoutSDA *contentNotNull() const throw(INTERP_KERNEL::Exception);
996 MEDFileFieldMultiTSWithoutSDA *contentNotNull() throw(INTERP_KERNEL::Exception);
998 MEDFileFieldMultiTS();
999 MEDFileFieldMultiTS(const MEDFileFieldMultiTSWithoutSDA& other, bool shallowCopyOfContent);
1000 MEDFileFieldMultiTS(const char *fileName, bool loadAll) throw(INTERP_KERNEL::Exception);
1001 MEDFileFieldMultiTS(const char *fileName, const char *fieldName, bool loadAll) throw(INTERP_KERNEL::Exception);
1007 class MEDLOADER_EXPORT MEDFileIntFieldMultiTS : public MEDFileAnyTypeFieldMultiTS
1010 static MEDFileIntFieldMultiTS *New();
1011 static MEDFileIntFieldMultiTS *New(const char *fileName, bool loadAll=true) throw(INTERP_KERNEL::Exception);
1012 static MEDFileIntFieldMultiTS *New(const char *fileName, const char *fieldName, bool loadAll=true) throw(INTERP_KERNEL::Exception);
1013 static MEDFileIntFieldMultiTS *New(const MEDFileIntFieldMultiTSWithoutSDA& other, bool shallowCopyOfContent);
1014 MEDFileAnyTypeFieldMultiTS *shallowCpy() const throw(INTERP_KERNEL::Exception);
1015 void checkCoherencyOfType(const MEDFileAnyTypeField1TS *f1ts) const throw(INTERP_KERNEL::Exception);
1016 MEDFileAnyTypeField1TS *getTimeStepAtPos(int pos) const throw(INTERP_KERNEL::Exception);
1017 MEDFileFieldMultiTS *convertToDouble(bool deepCpyGlobs=true) const throw(INTERP_KERNEL::Exception);
1019 MEDCouplingFieldDouble *getFieldAtLevel(TypeOfField type, int iteration, int order, int meshDimRelToMax, DataArrayInt* &arrOut, int renumPol=0) const throw(INTERP_KERNEL::Exception);
1020 MEDCouplingFieldDouble *getFieldAtTopLevel(TypeOfField type, int iteration, int order, DataArrayInt* &arrOut, int renumPol=0) const throw(INTERP_KERNEL::Exception);
1021 MEDCouplingFieldDouble *getFieldOnMeshAtLevel(TypeOfField type, int iteration, int order, int meshDimRelToMax, const MEDFileMesh *mesh, DataArrayInt* &arrOut, int renumPol=0) const throw(INTERP_KERNEL::Exception);
1022 MEDCouplingFieldDouble *getFieldOnMeshAtLevel(TypeOfField type, int iteration, int order, const MEDCouplingMesh *mesh, DataArrayInt* &arrOut, int renumPol=0) const throw(INTERP_KERNEL::Exception);
1023 MEDCouplingFieldDouble *getFieldAtLevelOld(TypeOfField type, int iteration, int order, const char *mname, int meshDimRelToMax, DataArrayInt* &arrOut, int renumPol=0) const throw(INTERP_KERNEL::Exception);
1024 DataArrayInt *getFieldWithProfile(TypeOfField type, int iteration, int order, int meshDimRelToMax, const MEDFileMesh *mesh, DataArrayInt *&pfl) const throw(INTERP_KERNEL::Exception);
1026 void appendFieldNoProfileSBT(const MEDCouplingFieldDouble *field, const DataArrayInt *arrOfVals) throw(INTERP_KERNEL::Exception);
1027 void appendFieldProfile(const MEDCouplingFieldDouble *field, const DataArrayInt *arrOfVals, const MEDFileMesh *mesh, int meshDimRelToMax, const DataArrayInt *profile) throw(INTERP_KERNEL::Exception);
1029 DataArrayInt *getUndergroundDataArray(int iteration, int order) const throw(INTERP_KERNEL::Exception);
1031 const MEDFileIntFieldMultiTSWithoutSDA *contentNotNull() const throw(INTERP_KERNEL::Exception);
1032 MEDFileIntFieldMultiTSWithoutSDA *contentNotNull() throw(INTERP_KERNEL::Exception);
1034 MEDFileIntFieldMultiTS();
1035 MEDFileIntFieldMultiTS(const MEDFileIntFieldMultiTSWithoutSDA& other, bool shallowCopyOfContent);
1036 MEDFileIntFieldMultiTS(const char *fileName, bool loadAll) throw(INTERP_KERNEL::Exception);
1037 MEDFileIntFieldMultiTS(const char *fileName, const char *fieldName, bool loadAll) throw(INTERP_KERNEL::Exception);
1040 class MEDCOUPLING_EXPORT MEDFileAnyTypeFieldMultiTSIterator
1043 MEDFileAnyTypeFieldMultiTSIterator(MEDFileAnyTypeFieldMultiTS *fmts);
1044 ~MEDFileAnyTypeFieldMultiTSIterator();
1045 MEDFileAnyTypeField1TS *nextt() throw(INTERP_KERNEL::Exception);
1047 MEDCouplingAutoRefCountObjectPtr<MEDFileAnyTypeFieldMultiTS> _fmts;
1052 class MEDFileFieldsIterator;
1057 class MEDLOADER_EXPORT MEDFileFields : public RefCountObject, public MEDFileFieldGlobsReal, public MEDFileWritable
1060 static MEDFileFields *New();
1061 static MEDFileFields *New(const char *fileName, bool loadAll=true) throw(INTERP_KERNEL::Exception);
1062 std::size_t getHeapMemorySize() const;
1063 MEDFileFields *deepCpy() const throw(INTERP_KERNEL::Exception);
1064 MEDFileFields *shallowCpy() const throw(INTERP_KERNEL::Exception);
1065 void write(const char *fileName, int mode) const throw(INTERP_KERNEL::Exception);
1066 void writeLL(med_idt fid) const throw(INTERP_KERNEL::Exception);
1067 void loadArrays() throw(INTERP_KERNEL::Exception);
1068 void loadArraysIfNecessary() throw(INTERP_KERNEL::Exception);
1069 void releaseArrays() throw(INTERP_KERNEL::Exception);
1070 int getNumberOfFields() const;
1071 std::vector< std::pair<int,int> > getCommonIterations(bool& areThereSomeForgottenTS) const throw(INTERP_KERNEL::Exception);
1072 std::vector<std::string> getFieldsNames() const throw(INTERP_KERNEL::Exception);
1073 std::vector<std::string> getMeshesNames() const throw(INTERP_KERNEL::Exception);
1074 std::string simpleRepr() const;
1075 void simpleRepr(int bkOffset, std::ostream& oss) const;
1077 void resize(int newSize) throw(INTERP_KERNEL::Exception);
1078 void pushField(MEDFileAnyTypeFieldMultiTS *field) throw(INTERP_KERNEL::Exception);
1079 void pushFields(const std::vector<MEDFileAnyTypeFieldMultiTS *>& fields) throw(INTERP_KERNEL::Exception);
1080 void setFieldAtPos(int i, MEDFileAnyTypeFieldMultiTS *field) throw(INTERP_KERNEL::Exception);
1081 int getPosFromFieldName(const char *fieldName) const throw(INTERP_KERNEL::Exception);
1082 MEDFileAnyTypeFieldMultiTS *getFieldAtPos(int i) const throw(INTERP_KERNEL::Exception);
1083 MEDFileAnyTypeFieldMultiTS *getFieldWithName(const char *fieldName) const throw(INTERP_KERNEL::Exception);
1084 MEDFileFields *buildSubPart(const int *startIds, const int *endIds) const throw(INTERP_KERNEL::Exception);
1085 MEDFileFields *partOfThisLyingOnSpecifiedMeshName(const char *meshName) const throw(INTERP_KERNEL::Exception);
1086 MEDFileFields *partOfThisLyingOnSpecifiedTimeSteps(const std::vector< std::pair<int,int> >& timeSteps) const throw(INTERP_KERNEL::Exception);
1087 MEDFileFields *partOfThisNotLyingOnSpecifiedTimeSteps(const std::vector< std::pair<int,int> >& timeSteps) const throw(INTERP_KERNEL::Exception);
1088 MEDFileFieldsIterator *iterator() throw(INTERP_KERNEL::Exception);
1089 void destroyFieldAtPos(int i) throw(INTERP_KERNEL::Exception);
1090 void destroyFieldsAtPos(const int *startIds, const int *endIds) throw(INTERP_KERNEL::Exception);
1091 void destroyFieldsAtPos2(int bg, int end, int step) throw(INTERP_KERNEL::Exception);
1092 bool changeMeshNames(const std::vector< std::pair<std::string,std::string> >& modifTab) throw(INTERP_KERNEL::Exception);
1093 bool renumberEntitiesLyingOnMesh(const char *meshName, const std::vector<int>& oldCode, const std::vector<int>& newCode, const DataArrayInt *renumO2N) throw(INTERP_KERNEL::Exception);
1095 std::vector<std::string> getPflsReallyUsed() const;
1096 std::vector<std::string> getLocsReallyUsed() const;
1097 std::vector<std::string> getPflsReallyUsedMulti() const;
1098 std::vector<std::string> getLocsReallyUsedMulti() const;
1099 void changePflsRefsNamesGen(const std::vector< std::pair<std::vector<std::string>, std::string > >& mapOfModif) throw(INTERP_KERNEL::Exception);
1100 void changeLocsRefsNamesGen(const std::vector< std::pair<std::vector<std::string>, std::string > >& mapOfModif) throw(INTERP_KERNEL::Exception);
1103 MEDFileFields(const char *fileName, bool loadAll) throw(INTERP_KERNEL::Exception);
1105 std::vector< MEDCouplingAutoRefCountObjectPtr<MEDFileAnyTypeFieldMultiTSWithoutSDA> > _fields;
1108 class MEDCOUPLING_EXPORT MEDFileFieldsIterator
1111 MEDFileFieldsIterator(MEDFileFields *fs);
1112 ~MEDFileFieldsIterator();
1113 MEDFileAnyTypeFieldMultiTS *nextt();
1115 MEDCouplingAutoRefCountObjectPtr<MEDFileFields> _fs;