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 std::string MEDLOADER_EXPORT 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 getHeapMemorySizeWithoutChildren() const;
59 std::vector<const BigMemoryObject *> getDirectChildren() const;
60 MEDFileFieldLoc *deepCpy() const;
61 int MEDLOADER_EXPORT getNbOfGaussPtPerCell() const { return _nb_gauss_pt; }
62 void MEDLOADER_EXPORT writeLL(med_idt fid) const;
63 std::string MEDLOADER_EXPORT repr() const;
64 bool MEDLOADER_EXPORT isName(const char *name) const { return _name==name; }
65 int MEDLOADER_EXPORT getDimension() const { return _dim; }
66 int MEDLOADER_EXPORT getNumberOfGaussPoints() const { return _nb_gauss_pt; }
67 int MEDLOADER_EXPORT getNumberOfPointsInCells() const { return _nb_node_per_cell; }
68 const MEDLOADER_EXPORT std::vector<double>& getRefCoords() const { return _ref_coo; }
69 const MEDLOADER_EXPORT std::vector<double>& getGaussCoords() const { return _gs_coo; }
70 const MEDLOADER_EXPORT std::vector<double>& getGaussWeights() const { return _w; }
71 bool MEDLOADER_EXPORT isEqual(const MEDFileFieldLoc& other, double eps) const;
73 MEDFileFieldLoc(med_idt fid, const char *locName);
74 MEDFileFieldLoc(med_idt fid, int id);
75 MEDFileFieldLoc(const char *locName, INTERP_KERNEL::NormalizedCellType geoType, const std::vector<double>& refCoo, const std::vector<double>& gsCoo, const std::vector<double>& w);
79 int _nb_node_per_cell;
81 INTERP_KERNEL::NormalizedCellType _geo_type;
82 std::vector<double> _ref_coo;
83 std::vector<double> _gs_coo;
84 std::vector<double> _w;
88 class MEDFileAnyTypeField1TSWithoutSDA;
89 class MEDFileFieldPerMeshPerType;
90 class MEDFileField1TSWithoutSDA;
91 class MEDFileFieldNameScope;
92 class MEDFileFieldGlobsReal;
93 class MEDFileFieldPerMesh;
95 class MEDFileFieldPerMeshPerTypePerDisc : public RefCountObject, public MEDFileWritable
98 static MEDFileFieldPerMeshPerTypePerDisc *NewOnRead(MEDFileFieldPerMeshPerType *fath, TypeOfField type, int profileIt);
99 static MEDFileFieldPerMeshPerTypePerDisc *New(MEDFileFieldPerMeshPerType *fath, TypeOfField type, int locId);
100 static MEDFileFieldPerMeshPerTypePerDisc *New(const MEDFileFieldPerMeshPerTypePerDisc& other);
101 std::size_t getHeapMemorySizeWithoutChildren() const;
102 std::vector<const BigMemoryObject *> getDirectChildren() const;
103 MEDFileFieldPerMeshPerTypePerDisc *deepCpy(MEDFileFieldPerMeshPerType *father) const;
104 void assignFieldNoProfile(int& start, int offset, int nbOfCells, const MEDCouplingFieldDouble *field, const DataArray *arrr, MEDFileFieldGlobsReal& glob, const MEDFileFieldNameScope& nasc);
105 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);
106 void assignNodeFieldNoProfile(int& start, const MEDCouplingFieldDouble *field, const DataArray *arrr, MEDFileFieldGlobsReal& glob);
107 void getCoarseData(TypeOfField& type, std::pair<int,int>& dad, std::string& pfl, std::string& loc) const;
108 void writeLL(med_idt fid, const MEDFileFieldNameScope& nasc) const;
109 const MEDFileFieldPerMeshPerType *getFather() const;
110 void loadOnlyStructureOfDataRecursively(med_idt fid, int& start, const MEDFileFieldNameScope& nasc);
111 void loadBigArray(med_idt fid, const MEDFileFieldNameScope& nasc);
112 void setNewStart(int newValueOfStart);
113 int getIteration() const;
114 int getOrder() const;
115 double getTime() const;
116 std::string getMeshName() const;
117 TypeOfField getType() const;
118 void simpleRepr(int bkOffset, std::ostream& oss, int id) const;
119 void fillTypesOfFieldAvailable(std::set<TypeOfField>& types) const;
120 void setType(TypeOfField newType);
121 INTERP_KERNEL::NormalizedCellType getGeoType() const;
122 int getNumberOfComponents() const;
123 int getNumberOfTuples() const;
124 int getStart() const { return _start; }
125 int getEnd() const { return _end; }
126 DataArray *getOrCreateAndGetArray();
127 const DataArray *getOrCreateAndGetArray() const;
128 const std::vector<std::string>& getInfo() const;
129 std::string getProfile() const;
130 void setProfile(const char *newPflName);
131 std::string getLocalization() const;
132 void setLocalization(const char *newLocName);
133 int getLocId() const { return _loc_id; }
134 void setLocId(int newId) const { _loc_id=newId; }
135 void setFather(MEDFileFieldPerMeshPerType *newFather) { _father=newFather; }
136 void changePflsRefsNamesGen(const std::vector< std::pair<std::vector<std::string>, std::string > >& mapOfModif);
137 void changeLocsRefsNamesGen(const std::vector< std::pair<std::vector<std::string>, std::string > >& mapOfModif);
138 void getFieldAtLevel(TypeOfField type, const MEDFileFieldGlobsReal *glob, std::vector< std::pair<int,int> >& dads, std::vector<const DataArrayInt *>& pfls, std::vector<int>& locs,
139 std::vector<INTERP_KERNEL::NormalizedCellType>& geoTypes) const;
140 void fillValues(int discId, int& startEntryId, std::vector< std::pair<std::pair<INTERP_KERNEL::NormalizedCellType,int>,std::pair<int,int> > >& entries) const;
141 int fillEltIdsFromCode(int offset, const std::vector<int>& codeOfMesh, const MEDFileFieldGlobsReal& glob, int *ptToFill) const;
142 int fillTupleIds(int *ptToFill) const;
143 static int ConvertType(TypeOfField type, int locId);
144 static std::vector< std::vector< const MEDFileFieldPerMeshPerTypePerDisc *> > SplitPerDiscretization(const std::vector< const MEDFileFieldPerMeshPerTypePerDisc *>& entries);
145 static bool RenumberChunks(int offset, const std::vector< const MEDFileFieldPerMeshPerTypePerDisc *>& entriesOnSameDisc,
146 const DataArrayInt *explicitIdsInMesh, const std::vector<int>& newCode,
147 MEDFileFieldGlobsReal& glob, DataArrayDouble *arr, std::vector< MEDCouplingAutoRefCountObjectPtr<MEDFileFieldPerMeshPerTypePerDisc> >& result);
148 static MEDFileFieldPerMeshPerTypePerDisc *NewObjectOnSameDiscThanPool(TypeOfField typeF, INTERP_KERNEL::NormalizedCellType geoType, DataArrayInt *idsOfMeshElt,
149 bool isPfl, int nbi, int offset, std::list< const MEDFileFieldPerMeshPerTypePerDisc *>& entriesOnSameDisc,
150 MEDFileFieldGlobsReal& glob, bool ¬InExisting) throw(INTERP_KERNEL::Exception);
152 MEDFileFieldPerMeshPerTypePerDisc(MEDFileFieldPerMeshPerType *fath, TypeOfField type, int profileIt);
153 MEDFileFieldPerMeshPerTypePerDisc(MEDFileFieldPerMeshPerType *fath, TypeOfField type, int profileIt, const std::string& dummy);
154 MEDFileFieldPerMeshPerTypePerDisc(const MEDFileFieldPerMeshPerTypePerDisc& other);
155 MEDFileFieldPerMeshPerTypePerDisc();
158 MEDFileFieldPerMeshPerType *_father;
161 //! _nval is different than end-start in case of ON_GAUSS_PT and ON_GAUSS_NE ! (_nval=(_end-_start)/nbi)
163 std::string _profile;
164 std::string _localization;
165 //! only on assignement -3 : ON_NODES, -2 : ON_CELLS, -1 : ON_GAUSS_NE, 0..* : ON_GAUSS_PT
167 mutable int _profile_it;
169 mutable int _tmp_work1;
172 class MEDFileFieldPerMeshPerType : public RefCountObject, public MEDFileWritable
175 static MEDFileFieldPerMeshPerType *New(MEDFileFieldPerMesh *fath, INTERP_KERNEL::NormalizedCellType geoType);
176 static MEDFileFieldPerMeshPerType *NewOnRead(med_idt fid, MEDFileFieldPerMesh *fath, TypeOfField type, INTERP_KERNEL::NormalizedCellType geoType, const MEDFileFieldNameScope& nasc);
177 std::size_t getHeapMemorySizeWithoutChildren() const;
178 std::vector<const BigMemoryObject *> getDirectChildren() const;
179 MEDFileFieldPerMeshPerType *deepCpy(MEDFileFieldPerMesh *father) const;
180 void assignFieldNoProfile(int& start, int offset, int nbOfCells, const MEDCouplingFieldDouble *field, const DataArray *arr, MEDFileFieldGlobsReal& glob, const MEDFileFieldNameScope& nasc);
181 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);
182 void assignNodeFieldNoProfile(int& start, const MEDCouplingFieldDouble *field, const DataArray *arr, MEDFileFieldGlobsReal& glob);
183 void assignNodeFieldProfile(int& start, const DataArrayInt *pfl, const MEDCouplingFieldDouble *field, const DataArray *arr, MEDFileFieldGlobsReal& glob, const MEDFileFieldNameScope& nasc);
184 const MEDFileFieldPerMesh *getFather() const;
185 void loadOnlyStructureOfDataRecursively(med_idt fid, int &start, const MEDFileFieldNameScope& nasc);
186 void loadBigArraysRecursively(med_idt fid, const MEDFileFieldNameScope& nasc);
187 void writeLL(med_idt fid, const MEDFileFieldNameScope& nasc) const;
188 void getDimension(int& dim) const;
189 void fillTypesOfFieldAvailable(std::set<TypeOfField>& types) const;
190 void fillFieldSplitedByType(std::vector< std::pair<int,int> >& dads, std::vector<TypeOfField>& types, std::vector<std::string>& pfls, std::vector<std::string>& locs) const;
191 int getIteration() const;
192 int getOrder() const;
193 double getTime() const;
194 std::string getMeshName() const;
195 void simpleRepr(int bkOffset, std::ostream& oss, int id) const;
196 void getSizes(int& globalSz, int& nbOfEntries) const;
197 INTERP_KERNEL::NormalizedCellType getGeoType() const;
198 int getNumberOfComponents() const;
199 DataArray *getOrCreateAndGetArray();
200 const DataArray *getOrCreateAndGetArray() const;
201 const std::vector<std::string>& getInfo() const;
202 std::vector<std::string> getPflsReallyUsed() const;
203 std::vector<std::string> getLocsReallyUsed() const;
204 std::vector<std::string> getPflsReallyUsedMulti() const;
205 std::vector<std::string> getLocsReallyUsedMulti() const;
206 void changePflsRefsNamesGen(const std::vector< std::pair<std::vector<std::string>, std::string > >& mapOfModif);
207 void changeLocsRefsNamesGen(const std::vector< std::pair<std::vector<std::string>, std::string > >& mapOfModif);
208 MEDFileFieldPerMeshPerTypePerDisc *getLeafGivenLocId(int locId);
209 const MEDFileFieldPerMeshPerTypePerDisc *getLeafGivenLocId(int locId) const;
210 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;
211 void fillValues(int& startEntryId, std::vector< std::pair<std::pair<INTERP_KERNEL::NormalizedCellType,int>,std::pair<int,int> > >& entries) const;
212 void setLeaves(const std::vector< MEDCouplingAutoRefCountObjectPtr< MEDFileFieldPerMeshPerTypePerDisc > >& leaves);
213 bool keepOnlySpatialDiscretization(TypeOfField tof, int &globalNum, std::vector< std::pair<int,int> >& its);
214 static med_entity_type ConvertIntoMEDFileType(TypeOfField ikType, INTERP_KERNEL::NormalizedCellType ikGeoType, med_geometry_type& medfGeoType);
216 std::vector<int> addNewEntryIfNecessary(const MEDCouplingFieldDouble *field, int offset, int nbOfCells);
217 std::vector<int> addNewEntryIfNecessaryGauss(const MEDCouplingFieldDouble *field, int offset, int nbOfCells);
218 std::vector<int> addNewEntryIfNecessary(const MEDCouplingFieldDouble *field, const DataArrayInt *subCells);
219 std::vector<int> addNewEntryIfNecessaryGauss(const MEDCouplingFieldDouble *field, const DataArrayInt *subCells);
220 MEDFileFieldPerMeshPerType(med_idt fid, MEDFileFieldPerMesh *fath, TypeOfField type, INTERP_KERNEL::NormalizedCellType geoType, const MEDFileFieldNameScope& nasc);
221 MEDFileFieldPerMeshPerType(MEDFileFieldPerMesh *fath, INTERP_KERNEL::NormalizedCellType geoType);
223 MEDFileFieldPerMesh *_father;
224 std::vector< MEDCouplingAutoRefCountObjectPtr<MEDFileFieldPerMeshPerTypePerDisc> > _field_pm_pt_pd;
225 INTERP_KERNEL::NormalizedCellType _geo_type;
228 class MEDFileFieldPerMesh : public RefCountObject, public MEDFileWritable
231 static MEDFileFieldPerMesh *New(MEDFileAnyTypeField1TSWithoutSDA *fath, const MEDCouplingMesh *mesh);
232 static MEDFileFieldPerMesh *NewOnRead(med_idt fid, MEDFileAnyTypeField1TSWithoutSDA *fath, int meshCsit, int meshIteration, int meshOrder, const MEDFileFieldNameScope& nasc);
233 std::size_t getHeapMemorySizeWithoutChildren() const;
234 std::vector<const BigMemoryObject *> getDirectChildren() const;
235 MEDFileFieldPerMesh *deepCpy(MEDFileAnyTypeField1TSWithoutSDA *father) const;
236 void simpleRepr(int bkOffset,std::ostream& oss, int id) const;
237 void copyTinyInfoFrom(const MEDCouplingMesh *mesh);
238 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);
239 void assignFieldNoProfileNoRenum(int& start, const std::vector<int>& code, const MEDCouplingFieldDouble *field, const DataArray *arr, MEDFileFieldGlobsReal& glob, const MEDFileFieldNameScope& nasc);
240 void assignNodeFieldNoProfile(int& start, const MEDCouplingFieldDouble *field, const DataArray *arr, MEDFileFieldGlobsReal& glob);
241 void assignNodeFieldProfile(int& start, const DataArrayInt *pfl, const MEDCouplingFieldDouble *field, const DataArray *arr, MEDFileFieldGlobsReal& glob, const MEDFileFieldNameScope& nasc);
242 void loadOnlyStructureOfDataRecursively(med_idt fid, int &start, const MEDFileFieldNameScope& nasc);
243 void loadBigArraysRecursively(med_idt fid, const MEDFileFieldNameScope& nasc);
244 void writeLL(med_idt fid, const MEDFileFieldNameScope& nasc) const;
245 void fillTypesOfFieldAvailable(std::set<TypeOfField>& types) const;
246 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;
247 void getDimension(int& dim) const;
248 double getTime() const;
249 int getIteration() const;
250 int getOrder() const;
251 int getMeshIteration() const { return _mesh_iteration; }
252 int getMeshOrder() const { return _mesh_order; }
253 std::string getMeshName() const { return _mesh_name; }
254 int getNumberOfComponents() const;
255 DataArray *getOrCreateAndGetArray();
256 const DataArray *getOrCreateAndGetArray() const;
257 const std::vector<std::string>& getInfo() const;
258 std::vector<std::string> getPflsReallyUsed() const;
259 std::vector<std::string> getLocsReallyUsed() const;
260 std::vector<std::string> getPflsReallyUsedMulti() const;
261 std::vector<std::string> getLocsReallyUsedMulti() const;
262 bool changeMeshNames(const std::vector< std::pair<std::string,std::string> >& modifTab);
263 bool renumberEntitiesLyingOnMesh(const char *meshName, const std::vector<int>& oldCode, const std::vector<int>& newCode, const DataArrayInt *renumO2N, MEDFileFieldGlobsReal& glob);
264 void keepOnlySpatialDiscretization(TypeOfField tof, int &globalNum, std::vector< std::pair<int,int> >& its);
265 void changePflsRefsNamesGen(const std::vector< std::pair<std::vector<std::string>, std::string > >& mapOfModif);
266 void changeLocsRefsNamesGen(const std::vector< std::pair<std::vector<std::string>, std::string > >& mapOfModif);
267 MEDCouplingFieldDouble *getFieldOnMeshAtLevel(TypeOfField type, const MEDFileFieldGlobsReal *glob, const MEDCouplingMesh *mesh, bool& isPfl, MEDCouplingAutoRefCountObjectPtr<DataArray> &arrOut, const MEDFileFieldNameScope& nasc) const;
268 DataArray *getFieldOnMeshAtLevelWithPfl(TypeOfField type, const MEDCouplingMesh *mesh, DataArrayInt *&pfl, const MEDFileFieldGlobsReal *glob, const MEDFileFieldNameScope& nasc) const;
269 void getUndergroundDataArrayExt(std::vector< std::pair<std::pair<INTERP_KERNEL::NormalizedCellType,int>,std::pair<int,int> > >& entries) const;
270 MEDFileFieldPerMeshPerTypePerDisc *getLeafGivenTypeAndLocId(INTERP_KERNEL::NormalizedCellType typ, int locId);
271 const MEDFileFieldPerMeshPerTypePerDisc *getLeafGivenTypeAndLocId(INTERP_KERNEL::NormalizedCellType typ, int locId) const;
273 int addNewEntryIfNecessary(INTERP_KERNEL::NormalizedCellType type);
274 MEDCouplingFieldDouble *finishField(TypeOfField type, const MEDFileFieldGlobsReal *glob,
275 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);
276 MEDCouplingFieldDouble *finishField2(TypeOfField type, const MEDFileFieldGlobsReal *glob,
277 const std::vector< std::pair<int,int> >& dads, const std::vector<int>& locs,
278 const std::vector<INTERP_KERNEL::NormalizedCellType>& geoTypes,
279 const MEDCouplingMesh *mesh, const DataArrayInt *da, bool& isPfl, MEDCouplingAutoRefCountObjectPtr<DataArray> &arrOut, const MEDFileFieldNameScope& nasc) const throw(INTERP_KERNEL::Exception);
280 MEDCouplingFieldDouble *finishFieldNode2(const MEDFileFieldGlobsReal *glob,
281 const std::vector< std::pair<int,int> >& dads, const std::vector<int>& locs,
282 const MEDCouplingMesh *mesh, const DataArrayInt *da, bool& isPfl, MEDCouplingAutoRefCountObjectPtr<DataArray> &arrOut, const MEDFileFieldNameScope& nasc) const throw(INTERP_KERNEL::Exception);
283 DataArray *finishField4(const std::vector< std::pair<int,int> >& dads, const DataArrayInt *pflIn, int nbOfElems, DataArrayInt *&pflOut) const;
284 void assignNewLeaves(const std::vector< MEDCouplingAutoRefCountObjectPtr< MEDFileFieldPerMeshPerTypePerDisc > >& leaves);
285 static void SortArraysPerType(const MEDFileFieldGlobsReal *glob, TypeOfField type,
286 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,
287 std::vector<int>& code, std::vector<DataArrayInt *>& notNullPfls);
288 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);
289 MEDFileFieldPerMesh(med_idt fid, MEDFileAnyTypeField1TSWithoutSDA *fath, int meshCsit, int meshIteration, int meshOrder, const MEDFileFieldNameScope& nasc);
290 MEDFileFieldPerMesh(MEDFileAnyTypeField1TSWithoutSDA *fath, const MEDCouplingMesh *mesh);
292 std::string _mesh_name;
296 MEDFileAnyTypeField1TSWithoutSDA *_father;
297 std::vector< MEDCouplingAutoRefCountObjectPtr< MEDFileFieldPerMeshPerType > > _field_pm_pt;
300 class MEDFileFieldGlobsReal;
302 class MEDFileFieldGlobs : public RefCountObject
305 static MEDFileFieldGlobs *New(const char *fname);
306 static MEDFileFieldGlobs *New();
307 std::size_t getHeapMemorySizeWithoutChildren() const;
308 std::vector<const BigMemoryObject *> getDirectChildren() const;
309 MEDFileFieldGlobs *deepCpy() const;
310 MEDFileFieldGlobs *shallowCpyPart(const std::vector<std::string>& pfls, const std::vector<std::string>& locs) const;
311 MEDFileFieldGlobs *deepCpyPart(const std::vector<std::string>& pfls, const std::vector<std::string>& locs) const;
312 void simpleRepr(std::ostream& oss) const;
313 void appendGlobs(const MEDFileFieldGlobs& other, double eps);
314 void checkGlobsPflsPartCoherency(const std::vector<std::string>& pflsUsed) const;
315 void checkGlobsLocsPartCoherency(const std::vector<std::string>& locsUsed) const;
316 void loadProfileInFile(med_idt fid, int id, const char *pflName);
317 void loadProfileInFile(med_idt fid, int id);
318 void loadGlobals(med_idt fid, const MEDFileFieldGlobsReal& real);
319 void loadAllGlobals(med_idt fid);
320 void writeGlobals(med_idt fid, const MEDFileWritable& opt) const;
321 std::vector<std::string> getPfls() const;
322 std::vector<std::string> getLocs() const;
323 bool existsPfl(const char *pflName) const;
324 bool existsLoc(const char *locName) const;
325 std::string createNewNameOfPfl() const;
326 std::string createNewNameOfLoc() const;
327 std::vector< std::vector<int> > whichAreEqualProfiles() const;
328 std::vector< std::vector<int> > whichAreEqualLocs(double eps) const;
329 void setFileName(const char *fileName);
330 void changePflsNamesInStruct(const std::vector< std::pair<std::vector<std::string>, std::string > >& mapOfModif);
331 void changeLocsNamesInStruct(const std::vector< std::pair<std::vector<std::string>, std::string > >& mapOfModif);
332 int getNbOfGaussPtPerCell(int locId) const;
333 int getLocalizationId(const char *loc) const;
334 const char *getFileName() const { return _file_name.c_str(); }
335 std::string getFileName2() const { return _file_name; }
336 const MEDFileFieldLoc& getLocalizationFromId(int locId) const;
337 const MEDFileFieldLoc& getLocalization(const char *locName) const;
338 const DataArrayInt *getProfileFromId(int pflId) const;
339 const DataArrayInt *getProfile(const char *pflName) const;
340 MEDFileFieldLoc& getLocalizationFromId(int locId);
341 MEDFileFieldLoc& getLocalization(const char *locName);
342 DataArrayInt *getProfile(const char *pflName);
343 DataArrayInt *getProfileFromId(int pflId);
344 void killProfileIds(const std::vector<int>& pflIds);
345 void killLocalizationIds(const std::vector<int>& locIds);
347 void appendProfile(DataArrayInt *pfl);
348 void appendLoc(const char *locName, INTERP_KERNEL::NormalizedCellType geoType, const std::vector<double>& refCoo, const std::vector<double>& gsCoo, const std::vector<double>& w);
350 static std::string CreateNewNameNotIn(const char *prefix, const std::vector<std::string>& namesToAvoid);
352 MEDFileFieldGlobs(const char *fname);
354 ~MEDFileFieldGlobs();
356 std::vector< MEDCouplingAutoRefCountObjectPtr<DataArrayInt> > _pfls;
357 std::vector< MEDCouplingAutoRefCountObjectPtr<MEDFileFieldLoc> > _locs;
358 std::string _file_name;
361 /// @endcond INTERNAL
363 class MEDFileFieldGlobsReal
366 MEDLOADER_EXPORT MEDFileFieldGlobsReal(const char *fname);
367 MEDLOADER_EXPORT MEDFileFieldGlobsReal();
368 MEDLOADER_EXPORT std::size_t getHeapMemorySizeWithoutChildren() const;
369 MEDLOADER_EXPORT std::vector<const BigMemoryObject *> getDirectChildren() const;
370 MEDLOADER_EXPORT void simpleReprGlobs(std::ostream& oss) const;
371 MEDLOADER_EXPORT void resetContent();
372 MEDLOADER_EXPORT void shallowCpyGlobs(const MEDFileFieldGlobsReal& other);
373 MEDLOADER_EXPORT void deepCpyGlobs(const MEDFileFieldGlobsReal& other);
374 MEDLOADER_EXPORT void shallowCpyOnlyUsedGlobs(const MEDFileFieldGlobsReal& other);
375 MEDLOADER_EXPORT void deepCpyOnlyUsedGlobs(const MEDFileFieldGlobsReal& other);
376 MEDLOADER_EXPORT void appendGlobs(const MEDFileFieldGlobsReal& other, double eps);
377 MEDLOADER_EXPORT void checkGlobsCoherency() const;
378 MEDLOADER_EXPORT void checkGlobsPflsPartCoherency() const;
379 MEDLOADER_EXPORT void checkGlobsLocsPartCoherency() const;
380 MEDLOADER_EXPORT virtual std::vector<std::string> getPflsReallyUsed() const = 0;
381 MEDLOADER_EXPORT virtual std::vector<std::string> getLocsReallyUsed() const = 0;
382 MEDLOADER_EXPORT virtual std::vector<std::string> getPflsReallyUsedMulti() const = 0;
383 MEDLOADER_EXPORT virtual std::vector<std::string> getLocsReallyUsedMulti() const = 0;
384 MEDLOADER_EXPORT virtual void changePflsRefsNamesGen(const std::vector< std::pair<std::vector<std::string>, std::string > >& mapOfModif) = 0;
385 MEDLOADER_EXPORT virtual void changeLocsRefsNamesGen(const std::vector< std::pair<std::vector<std::string>, std::string > >& mapOfModif) = 0;
386 MEDLOADER_EXPORT virtual ~MEDFileFieldGlobsReal();
388 MEDLOADER_EXPORT void loadProfileInFile(med_idt fid, int id, const char *pflName);
389 MEDLOADER_EXPORT void loadProfileInFile(med_idt fid, int id);
390 MEDLOADER_EXPORT void loadGlobals(med_idt fid);
391 MEDLOADER_EXPORT void loadAllGlobals(med_idt fid);
392 MEDLOADER_EXPORT void writeGlobals(med_idt fid, const MEDFileWritable& opt) const;
393 MEDLOADER_EXPORT std::vector<std::string> getPfls() const;
394 MEDLOADER_EXPORT std::vector<std::string> getLocs() const;
395 MEDLOADER_EXPORT bool existsPfl(const char *pflName) const;
396 MEDLOADER_EXPORT bool existsLoc(const char *locName) const;
397 MEDLOADER_EXPORT std::string createNewNameOfPfl() const;
398 MEDLOADER_EXPORT std::string createNewNameOfLoc() const;
399 MEDLOADER_EXPORT std::vector< std::vector<int> > whichAreEqualProfiles() const;
400 MEDLOADER_EXPORT std::vector< std::vector<int> > whichAreEqualLocs(double eps) const;
401 MEDLOADER_EXPORT void setFileName(const char *fileName);
402 MEDLOADER_EXPORT void changePflsNamesInStruct(const std::vector< std::pair<std::vector<std::string>, std::string > >& mapOfModif);
403 MEDLOADER_EXPORT void changeLocsNamesInStruct(const std::vector< std::pair<std::vector<std::string>, std::string > >& mapOfModif);
404 MEDLOADER_EXPORT void changePflsNames(const std::vector< std::pair<std::vector<std::string>, std::string > >& mapOfModif);
405 MEDLOADER_EXPORT void changeLocsNames(const std::vector< std::pair<std::vector<std::string>, std::string > >& mapOfModif);
406 MEDLOADER_EXPORT void changePflName(const char *oldName, const char *newName);
407 MEDLOADER_EXPORT void changeLocName(const char *oldName, const char *newName);
408 MEDLOADER_EXPORT std::vector< std::pair<std::vector<std::string>, std::string > > zipPflsNames();
409 MEDLOADER_EXPORT std::vector< std::pair<std::vector<std::string>, std::string > > zipLocsNames(double eps);
410 MEDLOADER_EXPORT int getNbOfGaussPtPerCell(int locId) const;
411 MEDLOADER_EXPORT int getLocalizationId(const char *loc) const;
412 MEDLOADER_EXPORT const char *getFileName() const;
413 MEDLOADER_EXPORT std::string getFileName2() const;
414 MEDLOADER_EXPORT const MEDFileFieldLoc& getLocalizationFromId(int locId) const;
415 MEDLOADER_EXPORT const MEDFileFieldLoc& getLocalization(const char *locName) const;
416 MEDLOADER_EXPORT MEDFileFieldLoc& getLocalizationFromId(int locId);
417 MEDLOADER_EXPORT MEDFileFieldLoc& getLocalization(const char *locName);
418 MEDLOADER_EXPORT const DataArrayInt *getProfile(const char *pflName) const;
419 MEDLOADER_EXPORT const DataArrayInt *getProfileFromId(int pflId) const;
420 MEDLOADER_EXPORT DataArrayInt *getProfile(const char *pflName);
421 MEDLOADER_EXPORT DataArrayInt *getProfileFromId(int pflId);
422 MEDLOADER_EXPORT void killProfileIds(const std::vector<int>& pflIds);
423 MEDLOADER_EXPORT void killLocalizationIds(const std::vector<int>& locIds);
425 MEDLOADER_EXPORT void appendProfile(DataArrayInt *pfl);
426 MEDLOADER_EXPORT void appendLoc(const char *locName, INTERP_KERNEL::NormalizedCellType geoType, const std::vector<double>& refCoo, const std::vector<double>& gsCoo, const std::vector<double>& w);
428 MEDFileFieldGlobs *contentNotNull();
429 const MEDFileFieldGlobs *contentNotNull() const;
431 MEDCouplingAutoRefCountObjectPtr< MEDFileFieldGlobs > _globals;
434 class MEDFileFieldNameScope
437 MEDLOADER_EXPORT MEDFileFieldNameScope();
438 MEDLOADER_EXPORT MEDFileFieldNameScope(const char *fieldName);
439 MEDLOADER_EXPORT std::string getName() const;
440 MEDLOADER_EXPORT void setName(const char *fieldName);
441 MEDLOADER_EXPORT std::string getDtUnit() const;
442 MEDLOADER_EXPORT void setDtUnit(const char *dtUnit);
443 MEDLOADER_EXPORT void copyNameScope(const MEDFileFieldNameScope& other);
446 std::string _dt_unit;
450 * SDA is for Shared Data Arrays such as profiles.
452 class MEDFileAnyTypeField1TSWithoutSDA : public RefCountObject, public MEDFileFieldNameScope
455 MEDLOADER_EXPORT MEDFileAnyTypeField1TSWithoutSDA();
456 MEDLOADER_EXPORT MEDFileAnyTypeField1TSWithoutSDA(const char *fieldName, int csit, int iteration, int order);
457 MEDLOADER_EXPORT int getIteration() const { return _iteration; }
458 MEDLOADER_EXPORT int getOrder() const { return _order; }
459 MEDLOADER_EXPORT double getTime(int& iteration, int& order) const { iteration=_iteration; order=_order; return _dt; }
460 MEDLOADER_EXPORT void setTime(int iteration, int order, double val) { _dt=val; _iteration=iteration; _order=order; }
461 MEDLOADER_EXPORT int getDimension() const;
462 MEDLOADER_EXPORT std::string getMeshName() const;
463 MEDLOADER_EXPORT void setMeshName(const char *newMeshName);
464 MEDLOADER_EXPORT bool changeMeshNames(const std::vector< std::pair<std::string,std::string> >& modifTab);
465 MEDLOADER_EXPORT int getMeshIteration() const;
466 MEDLOADER_EXPORT int getMeshOrder() const;
467 MEDLOADER_EXPORT bool isDealingTS(int iteration, int order) const;
468 MEDLOADER_EXPORT std::pair<int,int> getDtIt() const;
469 MEDLOADER_EXPORT void fillIteration(std::pair<int,int>& p) const;
470 MEDLOADER_EXPORT void fillTypesOfFieldAvailable(std::vector<TypeOfField>& types) const;
471 MEDLOADER_EXPORT std::vector<TypeOfField> getTypesOfFieldAvailable() const;
473 MEDLOADER_EXPORT std::vector<std::string> getPflsReallyUsed2() const;
474 MEDLOADER_EXPORT std::vector<std::string> getLocsReallyUsed2() const;
475 MEDLOADER_EXPORT std::vector<std::string> getPflsReallyUsedMulti2() const;
476 MEDLOADER_EXPORT std::vector<std::string> getLocsReallyUsedMulti2() const;
477 MEDLOADER_EXPORT void changePflsRefsNamesGen2(const std::vector< std::pair<std::vector<std::string>, std::string > >& mapOfModif);
478 MEDLOADER_EXPORT void changeLocsRefsNamesGen2(const std::vector< std::pair<std::vector<std::string>, std::string > >& mapOfModif);
480 MEDLOADER_EXPORT int getNonEmptyLevels(const char *mname, std::vector<int>& levs) const;
481 MEDLOADER_EXPORT 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;
483 MEDLOADER_EXPORT MEDFileFieldPerMeshPerTypePerDisc *getLeafGivenMeshAndTypeAndLocId(const char *mName, INTERP_KERNEL::NormalizedCellType typ, int locId);
484 MEDLOADER_EXPORT const MEDFileFieldPerMeshPerTypePerDisc *getLeafGivenMeshAndTypeAndLocId(const char *mName, INTERP_KERNEL::NormalizedCellType typ, int locId) const;
485 MEDLOADER_EXPORT void deepCpyLeavesFrom(const MEDFileAnyTypeField1TSWithoutSDA& other);
487 MEDLOADER_EXPORT int getNumberOfComponents() const;
488 MEDLOADER_EXPORT const std::vector<std::string>& getInfo() const;
489 MEDLOADER_EXPORT std::vector<std::string>& getInfo();
490 MEDLOADER_EXPORT void setInfo(const std::vector<std::string>& infos);
491 MEDLOADER_EXPORT std::size_t getHeapMemorySizeWithoutChildren() const;
492 MEDLOADER_EXPORT std::vector<const BigMemoryObject *> getDirectChildren() const;
493 MEDLOADER_EXPORT int copyTinyInfoFrom(const MEDCouplingFieldDouble *field, const DataArray *arr);
494 MEDLOADER_EXPORT void setFieldNoProfileSBT(const MEDCouplingFieldDouble *field, const DataArray *arr, MEDFileFieldGlobsReal& glob, const MEDFileFieldNameScope& nasc);
495 MEDLOADER_EXPORT void setFieldProfile(const MEDCouplingFieldDouble *field, const DataArray *arrOfVals, const MEDFileMesh *mesh, int meshDimRelToMax, const DataArrayInt *profile, MEDFileFieldGlobsReal& glob, const MEDFileFieldNameScope& nasc);
496 MEDLOADER_EXPORT virtual void simpleRepr(int bkOffset, std::ostream& oss, int f1tsId) const;
497 MEDLOADER_EXPORT virtual MEDFileAnyTypeField1TSWithoutSDA *deepCpy() const = 0;
498 MEDLOADER_EXPORT virtual MEDFileAnyTypeField1TSWithoutSDA *shallowCpy() const = 0;
499 MEDLOADER_EXPORT virtual std::vector< MEDCouplingAutoRefCountObjectPtr<MEDFileAnyTypeField1TSWithoutSDA> > splitComponents() const;
500 MEDLOADER_EXPORT virtual const char *getTypeStr() const = 0;
501 MEDLOADER_EXPORT virtual DataArray *getUndergroundDataArray() const = 0;
502 MEDLOADER_EXPORT virtual DataArray *getUndergroundDataArrayExt(std::vector< std::pair<std::pair<INTERP_KERNEL::NormalizedCellType,int>,std::pair<int,int> > >& entries) const = 0;
503 MEDLOADER_EXPORT virtual void setArray(DataArray *arr) = 0;
504 MEDLOADER_EXPORT virtual DataArray *createNewEmptyDataArrayInstance() const = 0;
505 MEDLOADER_EXPORT virtual DataArray *getOrCreateAndGetArray() = 0;
506 MEDLOADER_EXPORT virtual const DataArray *getOrCreateAndGetArray() const = 0;
508 MEDLOADER_EXPORT MEDCouplingFieldDouble *getFieldAtLevel(TypeOfField type, int meshDimRelToMax, const char *mName, int renumPol, const MEDFileFieldGlobsReal *glob, MEDCouplingAutoRefCountObjectPtr<DataArray> &arrOut, const MEDFileFieldNameScope& nasc) const;
509 MEDLOADER_EXPORT MEDCouplingFieldDouble *getFieldOnMeshAtLevel(TypeOfField type, int meshDimRelToMax, int renumPol, const MEDFileFieldGlobsReal *glob, const MEDFileMesh *mesh, MEDCouplingAutoRefCountObjectPtr<DataArray> &arrOut, const MEDFileFieldNameScope& nasc) const;
510 MEDLOADER_EXPORT MEDCouplingFieldDouble *getFieldAtTopLevel(TypeOfField type, const char *mName, int renumPol, const MEDFileFieldGlobsReal *glob, MEDCouplingAutoRefCountObjectPtr<DataArray> &arrOut, const MEDFileFieldNameScope& nasc) const;
511 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;
512 DataArray *getFieldWithProfile(TypeOfField type, int meshDimRelToMax, const MEDFileMesh *mesh, DataArrayInt *&pfl, const MEDFileFieldGlobsReal *glob, const MEDFileFieldNameScope& nasc) const;
514 MEDLOADER_EXPORT bool renumberEntitiesLyingOnMesh(const char *meshName, const std::vector<int>& oldCode, const std::vector<int>& newCode, const DataArrayInt *renumO2N, MEDFileFieldGlobsReal& glob);
515 MEDLOADER_EXPORT std::vector< MEDCouplingAutoRefCountObjectPtr<MEDFileAnyTypeField1TSWithoutSDA> > splitDiscretizations() const;
516 MEDLOADER_EXPORT int keepOnlySpatialDiscretization(TypeOfField tof, std::vector< std::pair<int,int> >& its);
518 MEDLOADER_EXPORT void allocNotFromFile(int newNbOfTuples);
519 MEDLOADER_EXPORT bool allocIfNecessaryTheArrayToReceiveDataFromFile();
520 MEDLOADER_EXPORT void loadOnlyStructureOfDataRecursively(med_idt fid, const MEDFileFieldNameScope& nasc);
521 MEDLOADER_EXPORT void loadBigArraysRecursively(med_idt fid, const MEDFileFieldNameScope& nasc);
522 MEDLOADER_EXPORT void loadBigArraysRecursivelyIfNecessary(med_idt fid, const MEDFileFieldNameScope& nasc);
523 MEDLOADER_EXPORT void loadStructureAndBigArraysRecursively(med_idt fid, const MEDFileFieldNameScope& nasc);
524 MEDLOADER_EXPORT void unloadArrays();
525 MEDLOADER_EXPORT void writeLL(med_idt fid, const MEDFileWritable& opts, const MEDFileFieldNameScope& nasc) const;
527 int getMeshIdFromMeshName(const char *mName) const;
528 int addNewEntryIfNecessary(const MEDCouplingMesh *mesh);
529 void updateData(int newLgth, const std::vector< std::pair<int,int> >& oldStartStops);
531 std::vector< MEDCouplingAutoRefCountObjectPtr< MEDFileFieldPerMesh > > _field_per_mesh;
536 //! only useable on reading
538 // -3 means allocated and build from scratch
539 // -2 means allocated and read from a file
540 // -1 means not allocated and build from scratch
541 // >=0 means not allocated and read from a file
542 mutable int _nb_of_tuples_to_be_allocated;
545 class MEDFileIntField1TSWithoutSDA;
548 * SDA is for Shared Data Arrays such as profiles.
550 class MEDFileField1TSWithoutSDA : public MEDFileAnyTypeField1TSWithoutSDA
553 MEDLOADER_EXPORT const char *getTypeStr() const;
554 MEDLOADER_EXPORT DataArray *getUndergroundDataArray() const;
555 MEDLOADER_EXPORT DataArray *getUndergroundDataArrayExt(std::vector< std::pair<std::pair<INTERP_KERNEL::NormalizedCellType,int>,std::pair<int,int> > >& entries) const;
556 MEDLOADER_EXPORT DataArrayDouble *getUndergroundDataArrayDouble() const;
557 MEDLOADER_EXPORT DataArrayDouble *getUndergroundDataArrayDoubleExt(std::vector< std::pair<std::pair<INTERP_KERNEL::NormalizedCellType,int>,std::pair<int,int> > >& entries) const;
558 MEDLOADER_EXPORT 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;
559 MEDLOADER_EXPORT static void CheckMeshDimRel(int meshDimRelToMax);
560 MEDLOADER_EXPORT static std::vector<int> CheckSBTMesh(const MEDCouplingMesh *mesh);
561 MEDLOADER_EXPORT static MEDFileField1TSWithoutSDA *New(const char *fieldName, int csit, int iteration, int order, const std::vector<std::string>& infos);
563 MEDLOADER_EXPORT MEDFileField1TSWithoutSDA();
564 MEDLOADER_EXPORT MEDFileField1TSWithoutSDA(const char *fieldName, int csit, int iteration, int order, const std::vector<std::string>& infos);
565 MEDLOADER_EXPORT MEDFileAnyTypeField1TSWithoutSDA *shallowCpy() const;
566 MEDLOADER_EXPORT MEDFileAnyTypeField1TSWithoutSDA *deepCpy() const;
567 MEDLOADER_EXPORT void setArray(DataArray *arr);
568 MEDLOADER_EXPORT DataArray *createNewEmptyDataArrayInstance() const;
569 MEDLOADER_EXPORT DataArray *getOrCreateAndGetArray();
570 MEDLOADER_EXPORT const DataArray *getOrCreateAndGetArray() const;
571 MEDLOADER_EXPORT DataArrayDouble *getOrCreateAndGetArrayDouble();
572 MEDLOADER_EXPORT const DataArrayDouble *getOrCreateAndGetArrayDouble() const;
573 MEDLOADER_EXPORT MEDFileIntField1TSWithoutSDA *convertToInt() const;
575 MEDCouplingAutoRefCountObjectPtr< DataArrayDouble > _arr;
577 static const char TYPE_STR[];
581 * SDA is for Shared Data Arrays such as profiles.
583 class MEDFileIntField1TSWithoutSDA : public MEDFileAnyTypeField1TSWithoutSDA
586 MEDLOADER_EXPORT MEDFileIntField1TSWithoutSDA();
587 MEDLOADER_EXPORT static MEDFileIntField1TSWithoutSDA *New(const char *fieldName, int csit, int iteration, int order, const std::vector<std::string>& infos);
588 MEDLOADER_EXPORT MEDFileAnyTypeField1TSWithoutSDA *deepCpy() const;
589 MEDLOADER_EXPORT MEDFileAnyTypeField1TSWithoutSDA *shallowCpy() const;
590 MEDLOADER_EXPORT const char *getTypeStr() const;
591 MEDLOADER_EXPORT DataArray *getUndergroundDataArray() const;
592 MEDLOADER_EXPORT DataArray *getUndergroundDataArrayExt(std::vector< std::pair<std::pair<INTERP_KERNEL::NormalizedCellType,int>,std::pair<int,int> > >& entries) const;
593 MEDLOADER_EXPORT void setArray(DataArray *arr);
594 MEDLOADER_EXPORT DataArray *createNewEmptyDataArrayInstance() const;
595 MEDLOADER_EXPORT DataArray *getOrCreateAndGetArray();
596 MEDLOADER_EXPORT const DataArray *getOrCreateAndGetArray() const;
597 MEDLOADER_EXPORT DataArrayInt *getOrCreateAndGetArrayInt();
598 MEDLOADER_EXPORT const DataArrayInt *getOrCreateAndGetArrayInt() const;
599 MEDLOADER_EXPORT DataArrayInt *getUndergroundDataArrayInt() const;
600 MEDLOADER_EXPORT DataArrayInt *getUndergroundDataArrayIntExt(std::vector< std::pair<std::pair<INTERP_KERNEL::NormalizedCellType,int>,std::pair<int,int> > >& entries) const;
601 MEDLOADER_EXPORT MEDFileField1TSWithoutSDA *convertToDouble() const;
603 MEDFileIntField1TSWithoutSDA(const char *fieldName, int csit, int iteration, int order, const std::vector<std::string>& infos);
605 MEDCouplingAutoRefCountObjectPtr< DataArrayInt > _arr;
607 MEDLOADER_EXPORT static const char TYPE_STR[];
613 class MEDFileAnyTypeField1TS : public RefCountObject, public MEDFileWritable, public MEDFileFieldGlobsReal
616 MEDLOADER_EXPORT MEDFileAnyTypeField1TS();
617 MEDLOADER_EXPORT MEDFileAnyTypeField1TS(const char *fileName, bool loadAll);
618 MEDLOADER_EXPORT MEDFileAnyTypeField1TS(const char *fileName, const char *fieldName, bool loadAll);
619 MEDLOADER_EXPORT MEDFileAnyTypeField1TS(const char *fileName, const char *fieldName, int iteration, int order, bool loadAll);
620 MEDLOADER_EXPORT MEDFileAnyTypeField1TS(const MEDFileAnyTypeField1TSWithoutSDA& other, bool shallowCopyOfContent);
621 MEDLOADER_EXPORT static MEDFileAnyTypeField1TS *BuildNewInstanceFromContent(MEDFileAnyTypeField1TSWithoutSDA *c, const char *fileName);
622 MEDLOADER_EXPORT static MEDFileAnyTypeField1TSWithoutSDA *BuildContentFrom(med_idt fid, const char *fileName, bool loadAll);
623 MEDLOADER_EXPORT static MEDFileAnyTypeField1TSWithoutSDA *BuildContentFrom(med_idt fid, const char *fileName, const char *fieldName, bool loadAll);
624 MEDLOADER_EXPORT static MEDFileAnyTypeField1TSWithoutSDA *BuildContentFrom(med_idt fid, const char *fileName, const char *fieldName, int iteration, int order, bool loadAll);
625 MEDLOADER_EXPORT void writeLL(med_idt fid) const;
626 // direct forwarding to MEDFileAnyTypeField1TSWithoutSDA instance _content
628 MEDLOADER_EXPORT static MEDFileAnyTypeField1TS *New(const char *fileName, bool loadAll=true);
629 MEDLOADER_EXPORT static MEDFileAnyTypeField1TS *New(const char *fileName, const char *fieldName, bool loadAll=true);
630 MEDLOADER_EXPORT static MEDFileAnyTypeField1TS *New(const char *fileName, const char *fieldName, int iteration, int order, bool loadAll=true);
631 MEDLOADER_EXPORT int getDimension() const;
632 MEDLOADER_EXPORT int getIteration() const;
633 MEDLOADER_EXPORT int getOrder() const;
634 MEDLOADER_EXPORT double getTime(int& iteration, int& order) const;
635 MEDLOADER_EXPORT void setTime(int iteration, int order, double val);
636 MEDLOADER_EXPORT std::string getName() const;
637 MEDLOADER_EXPORT void setName(const char *name);
638 MEDLOADER_EXPORT std::string simpleRepr() const;
639 MEDLOADER_EXPORT void simpleRepr(int bkOffset, std::ostream& oss, int f1tsId) const;
640 MEDLOADER_EXPORT std::string getDtUnit() const;
641 MEDLOADER_EXPORT void setDtUnit(const char *dtUnit);
642 MEDLOADER_EXPORT std::string getMeshName() const;
643 MEDLOADER_EXPORT void setMeshName(const char *newMeshName);
644 MEDLOADER_EXPORT bool changeMeshNames(const std::vector< std::pair<std::string,std::string> >& modifTab);
645 MEDLOADER_EXPORT int getMeshIteration() const;
646 MEDLOADER_EXPORT int getMeshOrder() const;
647 MEDLOADER_EXPORT int getNumberOfComponents() const;
648 MEDLOADER_EXPORT bool isDealingTS(int iteration, int order) const;
649 MEDLOADER_EXPORT std::pair<int,int> getDtIt() const;
650 MEDLOADER_EXPORT void fillIteration(std::pair<int,int>& p) const;
651 MEDLOADER_EXPORT void fillTypesOfFieldAvailable(std::vector<TypeOfField>& types) const;
652 MEDLOADER_EXPORT void setInfo(const std::vector<std::string>& infos);
653 MEDLOADER_EXPORT const std::vector<std::string>& getInfo() const;
654 MEDLOADER_EXPORT std::vector<std::string>& getInfo();
655 MEDLOADER_EXPORT std::vector<TypeOfField> getTypesOfFieldAvailable() const;
656 MEDLOADER_EXPORT std::vector< std::vector<std::pair<int,int> > > getFieldSplitedByType(const char *mname, std::vector<INTERP_KERNEL::NormalizedCellType>& types, std::vector< std::vector<TypeOfField> >& typesF,
657 std::vector< std::vector<std::string> >& pfls, std::vector< std::vector<std::string> >& locs) const throw(INTERP_KERNEL::Exception);
658 MEDLOADER_EXPORT MEDFileFieldPerMeshPerTypePerDisc *getLeafGivenMeshAndTypeAndLocId(const char *mName, INTERP_KERNEL::NormalizedCellType typ, int locId);
659 MEDLOADER_EXPORT const MEDFileFieldPerMeshPerTypePerDisc *getLeafGivenMeshAndTypeAndLocId(const char *mName, INTERP_KERNEL::NormalizedCellType typ, int locId) const;
660 MEDLOADER_EXPORT int getNonEmptyLevels(const char *mname, std::vector<int>& levs) const;
662 MEDLOADER_EXPORT void write(const char *fileName, int mode) const;
663 MEDLOADER_EXPORT void loadArrays();
664 MEDLOADER_EXPORT void loadArraysIfNecessary();
665 MEDLOADER_EXPORT void unloadArrays();
666 MEDLOADER_EXPORT std::vector< MEDCouplingAutoRefCountObjectPtr< MEDFileAnyTypeField1TS > > splitComponents() const;
667 MEDLOADER_EXPORT std::vector< MEDCouplingAutoRefCountObjectPtr< MEDFileAnyTypeField1TS > > splitDiscretizations() const;
668 MEDLOADER_EXPORT MEDFileAnyTypeField1TS *deepCpy() const;
669 MEDLOADER_EXPORT int copyTinyInfoFrom(const MEDCouplingFieldDouble *field, const DataArray *arr);
670 MEDLOADER_EXPORT virtual MEDFileAnyTypeField1TS *shallowCpy() const = 0;
672 //! underground method see MEDFileField1TSWithoutSDA::setProfileNameOnLeaf
673 MEDLOADER_EXPORT void setProfileNameOnLeaf(const char *mName, INTERP_KERNEL::NormalizedCellType typ, int locId, const char *newPflName, bool forceRenameOnGlob=false);
674 //! underground method see MEDFileField1TSWithoutSDA::setLocNameOnLeaf
675 MEDLOADER_EXPORT void setLocNameOnLeaf(const char *mName, INTERP_KERNEL::NormalizedCellType typ, int locId, const char *newLocName, bool forceRenameOnGlob=false);
676 MEDLOADER_EXPORT std::size_t getHeapMemorySizeWithoutChildren() const;
677 MEDLOADER_EXPORT std::vector<const BigMemoryObject *> getDirectChildren() const;
678 MEDLOADER_EXPORT std::vector<std::string> getPflsReallyUsed() const;
679 MEDLOADER_EXPORT std::vector<std::string> getLocsReallyUsed() const;
680 MEDLOADER_EXPORT std::vector<std::string> getPflsReallyUsedMulti() const;
681 MEDLOADER_EXPORT std::vector<std::string> getLocsReallyUsedMulti() const;
682 MEDLOADER_EXPORT void changePflsRefsNamesGen(const std::vector< std::pair<std::vector<std::string>, std::string > >& mapOfModif);
683 MEDLOADER_EXPORT void changeLocsRefsNamesGen(const std::vector< std::pair<std::vector<std::string>, std::string > >& mapOfModif);
685 MEDLOADER_EXPORT 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);
686 MEDLOADER_EXPORT 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);
688 MEDLOADER_EXPORT virtual med_field_type getMEDFileFieldType() const = 0;
689 MEDLOADER_EXPORT MEDFileAnyTypeField1TSWithoutSDA *contentNotNullBase();
690 MEDLOADER_EXPORT const MEDFileAnyTypeField1TSWithoutSDA *contentNotNullBase() const;
692 MEDCouplingAutoRefCountObjectPtr<MEDFileAnyTypeField1TSWithoutSDA> _content;
695 class MEDFileIntField1TS;
700 class MEDFileField1TS : public MEDFileAnyTypeField1TS
703 MEDLOADER_EXPORT static MEDFileField1TS *New(const char *fileName, bool loadAll=true);
704 MEDLOADER_EXPORT static MEDFileField1TS *New(const char *fileName, const char *fieldName, bool loadAll=true);
705 MEDLOADER_EXPORT static MEDFileField1TS *New(const char *fileName, const char *fieldName, int iteration, int order, bool loadAll=true);
706 MEDLOADER_EXPORT static MEDFileField1TS *New(const MEDFileField1TSWithoutSDA& other, bool shallowCopyOfContent);
707 MEDLOADER_EXPORT static MEDFileField1TS *New();
708 MEDLOADER_EXPORT MEDFileIntField1TS *convertToInt(bool deepCpyGlobs=true) const;
710 MEDLOADER_EXPORT MEDCouplingFieldDouble *getFieldAtLevel(TypeOfField type, int meshDimRelToMax, int renumPol=0) const;
711 MEDLOADER_EXPORT MEDCouplingFieldDouble *getFieldAtTopLevel(TypeOfField type, int renumPol=0) const;
712 MEDLOADER_EXPORT MEDCouplingFieldDouble *getFieldOnMeshAtLevel(TypeOfField type, int meshDimRelToMax, const MEDFileMesh *mesh, int renumPol=0) const;
713 MEDLOADER_EXPORT MEDCouplingFieldDouble *getFieldOnMeshAtLevel(TypeOfField type, const MEDCouplingMesh *mesh, int renumPol=0) const;
714 MEDLOADER_EXPORT MEDCouplingFieldDouble *getFieldAtLevelOld(TypeOfField type, const char *mname, int meshDimRelToMax, int renumPol=0) const;
715 MEDLOADER_EXPORT DataArrayDouble *getFieldWithProfile(TypeOfField type, int meshDimRelToMax, const MEDFileMesh *mesh, DataArrayInt *&pfl) const;
717 MEDLOADER_EXPORT void setFieldNoProfileSBT(const MEDCouplingFieldDouble *field);
718 MEDLOADER_EXPORT void setFieldProfile(const MEDCouplingFieldDouble *field, const MEDFileMesh *mesh, int meshDimRelToMax, const DataArrayInt *profile);
719 // direct forwarding to MEDFileField1TSWithoutSDA instance _content
721 MEDLOADER_EXPORT MEDFileAnyTypeField1TS *shallowCpy() const;
722 MEDLOADER_EXPORT DataArrayDouble *getUndergroundDataArray() const;
723 MEDLOADER_EXPORT DataArrayDouble *getUndergroundDataArrayExt(std::vector< std::pair<std::pair<INTERP_KERNEL::NormalizedCellType,int>,std::pair<int,int> > >& entries) const;
725 MEDLOADER_EXPORT std::vector< std::vector<DataArrayDouble *> > getFieldSplitedByType2(const char *mname, std::vector<INTERP_KERNEL::NormalizedCellType>& types, std::vector< std::vector<TypeOfField> >& typesF,
726 std::vector< std::vector<std::string> >& pfls, std::vector< std::vector<std::string> >& locs) const throw(INTERP_KERNEL::Exception);
728 MEDLOADER_EXPORT static void SetDataArrayDoubleInField(MEDCouplingFieldDouble *f, MEDCouplingAutoRefCountObjectPtr<DataArray>& arr);
729 MEDLOADER_EXPORT static DataArrayDouble *ReturnSafelyDataArrayDouble(MEDCouplingAutoRefCountObjectPtr<DataArray>& arr);
731 med_field_type getMEDFileFieldType() const { return MED_FLOAT64; }
732 const MEDFileField1TSWithoutSDA *contentNotNull() const;
733 MEDFileField1TSWithoutSDA *contentNotNull();
735 MEDFileField1TS(const char *fileName, bool loadAll);
736 MEDFileField1TS(const char *fileName, const char *fieldName, bool loadAll);
737 MEDFileField1TS(const char *fileName, const char *fieldName, int iteration, int order, bool loadAll);
738 MEDFileField1TS(const MEDFileField1TSWithoutSDA& other, bool shallowCopyOfContent);
742 class MEDFileIntField1TS : public MEDFileAnyTypeField1TS
745 MEDLOADER_EXPORT static MEDFileIntField1TS *New();
746 MEDLOADER_EXPORT static MEDFileIntField1TS *New(const char *fileName, bool loadAll=true);
747 MEDLOADER_EXPORT static MEDFileIntField1TS *New(const char *fileName, const char *fieldName, bool loadAll=true);
748 MEDLOADER_EXPORT static MEDFileIntField1TS *New(const char *fileName, const char *fieldName, int iteration, int order, bool loadAll=true);
749 MEDLOADER_EXPORT static MEDFileIntField1TS *New(const MEDFileIntField1TSWithoutSDA& other, bool shallowCopyOfContent);
750 MEDLOADER_EXPORT MEDFileField1TS *convertToDouble(bool deepCpyGlobs=true) const;
751 MEDLOADER_EXPORT MEDFileAnyTypeField1TS *shallowCpy() const;
753 MEDLOADER_EXPORT MEDCouplingFieldDouble *getFieldAtLevel(TypeOfField type, int meshDimRelToMax, DataArrayInt* &arrOut, int renumPol=0) const;
754 MEDLOADER_EXPORT MEDCouplingFieldDouble *getFieldAtTopLevel(TypeOfField type, DataArrayInt* &arrOut, int renumPol=0) const;
755 MEDLOADER_EXPORT MEDCouplingFieldDouble *getFieldOnMeshAtLevel(TypeOfField type, int meshDimRelToMax, const MEDFileMesh *mesh, DataArrayInt* &arrOut, int renumPol=0) const;
756 MEDLOADER_EXPORT MEDCouplingFieldDouble *getFieldOnMeshAtLevel(TypeOfField type, const MEDCouplingMesh *mesh, DataArrayInt* &arrOut, int renumPol=0) const;
757 MEDLOADER_EXPORT MEDCouplingFieldDouble *getFieldAtLevelOld(TypeOfField type, const char *mname, int meshDimRelToMax, DataArrayInt* &arrOut, int renumPol=0) const;
758 MEDLOADER_EXPORT DataArrayInt *getFieldWithProfile(TypeOfField type, int meshDimRelToMax, const MEDFileMesh *mesh, DataArrayInt *&pfl) const;
760 MEDLOADER_EXPORT void setFieldNoProfileSBT(const MEDCouplingFieldDouble *field, const DataArrayInt *arrOfVals);
761 MEDLOADER_EXPORT void setFieldProfile(const MEDCouplingFieldDouble *field, const DataArrayInt *arrOfVals, const MEDFileMesh *mesh, int meshDimRelToMax, const DataArrayInt *profile);
762 MEDLOADER_EXPORT DataArrayInt *getUndergroundDataArray() const;
764 MEDLOADER_EXPORT static DataArrayInt *ReturnSafelyDataArrayInt(MEDCouplingAutoRefCountObjectPtr<DataArray>& arr);
766 med_field_type getMEDFileFieldType() const { return MED_INT32; }
767 const MEDFileIntField1TSWithoutSDA *contentNotNull() const;
768 MEDFileIntField1TSWithoutSDA *contentNotNull();
770 MEDFileIntField1TS();
771 MEDFileIntField1TS(const char *fileName, bool loadAll);
772 MEDFileIntField1TS(const char *fileName, const char *fieldName, bool loadAll);
773 MEDFileIntField1TS(const char *fileName, const char *fieldName, int iteration, int order, bool loadAll);
774 MEDFileIntField1TS(const MEDFileIntField1TSWithoutSDA& other, bool shallowCopyOfContent);
777 class MEDFileAnyTypeFieldMultiTSWithoutSDA : public RefCountObject, public MEDFileFieldNameScope
780 MEDFileAnyTypeFieldMultiTSWithoutSDA();
781 MEDFileAnyTypeFieldMultiTSWithoutSDA(const char *fieldName);
782 MEDFileAnyTypeFieldMultiTSWithoutSDA(med_idt fid, int fieldId, bool loadAll);
783 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);
785 MEDLOADER_EXPORT std::size_t getHeapMemorySizeWithoutChildren() const;
786 MEDLOADER_EXPORT std::vector<const BigMemoryObject *> getDirectChildren() const;
787 MEDLOADER_EXPORT virtual MEDFileAnyTypeFieldMultiTSWithoutSDA *deepCpy() const;
788 MEDLOADER_EXPORT virtual std::vector< MEDCouplingAutoRefCountObjectPtr<MEDFileAnyTypeFieldMultiTSWithoutSDA> > splitComponents() const;
789 MEDLOADER_EXPORT virtual std::vector< MEDCouplingAutoRefCountObjectPtr<MEDFileAnyTypeFieldMultiTSWithoutSDA> > splitDiscretizations() const;
790 MEDLOADER_EXPORT virtual const char *getTypeStr() const = 0;
791 MEDLOADER_EXPORT virtual MEDFileAnyTypeFieldMultiTSWithoutSDA *shallowCpy() const = 0;
792 MEDLOADER_EXPORT virtual MEDFileAnyTypeFieldMultiTSWithoutSDA *createNew() const = 0;
793 MEDLOADER_EXPORT virtual MEDFileAnyTypeField1TSWithoutSDA *createNew1TSWithoutSDAEmptyInstance() const = 0;
794 MEDLOADER_EXPORT virtual void checkCoherencyOfType(const MEDFileAnyTypeField1TSWithoutSDA *f1ts) const = 0;
795 MEDLOADER_EXPORT const std::vector<std::string>& getInfo() const;
796 MEDLOADER_EXPORT void setInfo(const std::vector<std::string>& info);
797 MEDLOADER_EXPORT int getTimeStepPos(int iteration, int order) const;
798 MEDLOADER_EXPORT const MEDFileAnyTypeField1TSWithoutSDA& getTimeStepEntry(int iteration, int order) const;
799 MEDLOADER_EXPORT MEDFileAnyTypeField1TSWithoutSDA& getTimeStepEntry(int iteration, int order);
800 MEDLOADER_EXPORT std::string getMeshName() const;
801 MEDLOADER_EXPORT void setMeshName(const char *newMeshName);
802 MEDLOADER_EXPORT bool changeMeshNames(const std::vector< std::pair<std::string,std::string> >& modifTab);
803 MEDLOADER_EXPORT int getNumberOfTS() const;
804 MEDLOADER_EXPORT void eraseEmptyTS();
805 MEDLOADER_EXPORT void eraseTimeStepIds(const int *startIds, const int *endIds);
806 MEDLOADER_EXPORT void eraseTimeStepIds2(int bg, int end, int step);
807 MEDLOADER_EXPORT MEDFileAnyTypeFieldMultiTSWithoutSDA *buildFromTimeStepIds(const int *startIds, const int *endIds) const;
808 MEDLOADER_EXPORT MEDFileAnyTypeFieldMultiTSWithoutSDA *buildFromTimeStepIds2(int bg, int end, int step) const;
809 MEDLOADER_EXPORT MEDFileAnyTypeFieldMultiTSWithoutSDA *partOfThisLyingOnSpecifiedTimeSteps(const std::vector< std::pair<int,int> >& timeSteps) const;
810 MEDLOADER_EXPORT MEDFileAnyTypeFieldMultiTSWithoutSDA *partOfThisNotLyingOnSpecifiedTimeSteps(const std::vector< std::pair<int,int> >& timeSteps) const;
811 MEDLOADER_EXPORT int getPosOfTimeStep(int iteration, int order) const;
812 MEDLOADER_EXPORT int getPosGivenTime(double time, double eps=1e-8) const;
813 MEDLOADER_EXPORT std::vector< std::pair<int,int> > getIterations() const;
814 MEDLOADER_EXPORT std::vector< std::pair<int,int> > getTimeSteps(std::vector<double>& ret1) const;
815 MEDLOADER_EXPORT void pushBackTimeStep(MEDCouplingAutoRefCountObjectPtr<MEDFileAnyTypeField1TSWithoutSDA>& tse);
816 MEDLOADER_EXPORT void synchronizeNameScope();
817 MEDLOADER_EXPORT void simpleRepr(int bkOffset, std::ostream& oss, int fmtsId) const;
818 MEDLOADER_EXPORT int getNonEmptyLevels(int iteration, int order, const char *mname, std::vector<int>& levs) const;
819 MEDLOADER_EXPORT void appendFieldNoProfileSBT(const MEDCouplingFieldDouble *field, const DataArray *arr, MEDFileFieldGlobsReal& glob);
820 MEDLOADER_EXPORT void appendFieldProfile(const MEDCouplingFieldDouble *field, const DataArray *arr, const MEDFileMesh *mesh, int meshDimRelToMax, const DataArrayInt *profile, MEDFileFieldGlobsReal& glob);
821 MEDLOADER_EXPORT 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;
822 MEDLOADER_EXPORT std::vector< std::vector<TypeOfField> > getTypesOfFieldAvailable() const;
823 MEDLOADER_EXPORT DataArray *getUndergroundDataArray(int iteration, int order) const;
824 MEDLOADER_EXPORT DataArray *getUndergroundDataArrayExt(int iteration, int order, std::vector< std::pair<std::pair<INTERP_KERNEL::NormalizedCellType,int>,std::pair<int,int> > >& entries) const;
825 MEDLOADER_EXPORT bool renumberEntitiesLyingOnMesh(const char *meshName, const std::vector<int>& oldCode, const std::vector<int>& newCode, const DataArrayInt *renumO2N, MEDFileFieldGlobsReal& glob);
826 MEDLOADER_EXPORT void loadStructureOrStructureAndBigArraysRecursively(med_idt fid, int nbPdt, med_field_type fieldTyp, bool loadAll);
827 MEDLOADER_EXPORT void writeLL(med_idt fid, const MEDFileWritable& opts) const;
828 MEDLOADER_EXPORT void loadBigArraysRecursively(med_idt fid, const MEDFileFieldNameScope& nasc);
829 MEDLOADER_EXPORT void loadBigArraysRecursivelyIfNecessary(med_idt fid, const MEDFileFieldNameScope& nasc);
830 MEDLOADER_EXPORT void unloadArrays();
832 MEDLOADER_EXPORT const MEDFileAnyTypeField1TSWithoutSDA *getTimeStepAtPos2(int pos) const;
833 MEDLOADER_EXPORT MEDFileAnyTypeField1TSWithoutSDA *getTimeStepAtPos2(int pos);
834 MEDLOADER_EXPORT std::vector<std::string> getPflsReallyUsed2() const;
835 MEDLOADER_EXPORT std::vector<std::string> getLocsReallyUsed2() const;
836 MEDLOADER_EXPORT std::vector<std::string> getPflsReallyUsedMulti2() const;
837 MEDLOADER_EXPORT std::vector<std::string> getLocsReallyUsedMulti2() const;
838 MEDLOADER_EXPORT void changePflsRefsNamesGen2(const std::vector< std::pair<std::vector<std::string>, std::string > >& mapOfModif);
839 MEDLOADER_EXPORT void changeLocsRefsNamesGen2(const std::vector< std::pair<std::vector<std::string>, std::string > >& mapOfModif);
840 MEDLOADER_EXPORT void setIteration(int i, MEDCouplingAutoRefCountObjectPtr<MEDFileAnyTypeField1TSWithoutSDA> ts);
842 virtual med_field_type getMEDFileFieldType() const = 0;
843 void copyTinyInfoFrom(const MEDCouplingFieldDouble *field, const DataArray *arr);
844 void checkCoherencyOfTinyInfo(const MEDCouplingFieldDouble *field, const DataArray *arr) const;
845 void checkThatComponentsMatch(const std::vector<std::string>& compos) const;
846 void checkThatNbOfCompoOfTSMatchThis() const;
848 std::vector<std::string> _infos;
849 std::vector< MEDCouplingAutoRefCountObjectPtr<MEDFileAnyTypeField1TSWithoutSDA> > _time_steps;
852 class MEDFileIntFieldMultiTSWithoutSDA;
854 class MEDFileFieldMultiTSWithoutSDA : public MEDFileAnyTypeFieldMultiTSWithoutSDA
857 MEDLOADER_EXPORT 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);
858 MEDLOADER_EXPORT MEDFileFieldMultiTSWithoutSDA(med_idt fid, int fieldId, bool loadAll);
859 MEDLOADER_EXPORT const char *getTypeStr() const;
860 MEDLOADER_EXPORT MEDFileAnyTypeFieldMultiTSWithoutSDA *shallowCpy() const;
861 MEDLOADER_EXPORT MEDFileAnyTypeFieldMultiTSWithoutSDA *createNew() const;
862 MEDLOADER_EXPORT 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;
863 MEDLOADER_EXPORT MEDFileIntFieldMultiTSWithoutSDA *convertToInt() const;
865 MEDFileFieldMultiTSWithoutSDA(const char *fieldName);
866 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);
867 med_field_type getMEDFileFieldType() const { return MED_FLOAT64; }
868 MEDFileAnyTypeField1TSWithoutSDA *createNew1TSWithoutSDAEmptyInstance() const;
869 void checkCoherencyOfType(const MEDFileAnyTypeField1TSWithoutSDA *f1ts) const;
871 MEDLOADER_EXPORT MEDFileFieldMultiTSWithoutSDA();
874 class MEDFileIntFieldMultiTSWithoutSDA : public MEDFileAnyTypeFieldMultiTSWithoutSDA
877 MEDLOADER_EXPORT 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);
878 MEDLOADER_EXPORT MEDFileIntFieldMultiTSWithoutSDA(med_idt fid, int fieldId, bool loadAll);
879 MEDLOADER_EXPORT const char *getTypeStr() const;
880 MEDLOADER_EXPORT MEDFileAnyTypeFieldMultiTSWithoutSDA *shallowCpy() const;
881 MEDLOADER_EXPORT MEDFileAnyTypeFieldMultiTSWithoutSDA *createNew() const;
882 MEDLOADER_EXPORT MEDFileFieldMultiTSWithoutSDA *convertToDouble() const;
884 MEDFileIntFieldMultiTSWithoutSDA(const char *fieldName);
885 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);
886 med_field_type getMEDFileFieldType() const { return MED_INT32; }
887 MEDFileAnyTypeField1TSWithoutSDA *createNew1TSWithoutSDAEmptyInstance() const;
888 void checkCoherencyOfType(const MEDFileAnyTypeField1TSWithoutSDA *f1ts) const;
890 MEDLOADER_EXPORT MEDFileIntFieldMultiTSWithoutSDA();
893 class MEDFileAnyTypeFieldMultiTSIterator;
894 class MEDFileFastCellSupportComparator;
898 class MEDFileAnyTypeFieldMultiTS : public RefCountObject, public MEDFileWritable, public MEDFileFieldGlobsReal
901 MEDFileAnyTypeFieldMultiTS();
902 MEDFileAnyTypeFieldMultiTS(const char *fileName, bool loadAll);
903 MEDFileAnyTypeFieldMultiTS(const char *fileName, const char *fieldName, bool loadAll);
904 MEDFileAnyTypeFieldMultiTS(const MEDFileAnyTypeFieldMultiTSWithoutSDA& other, bool shallowCopyOfContent);
905 static MEDFileAnyTypeFieldMultiTS *BuildNewInstanceFromContent(MEDFileAnyTypeFieldMultiTSWithoutSDA *c, const char *fileName);
906 static MEDFileAnyTypeFieldMultiTSWithoutSDA *BuildContentFrom(med_idt fid, const char *fileName, bool loadAll);
907 static MEDFileAnyTypeFieldMultiTSWithoutSDA *BuildContentFrom(med_idt fid, const char *fileName, const char *fieldName, bool loadAll);
909 MEDLOADER_EXPORT static MEDFileAnyTypeFieldMultiTS *New(const char *fileName, bool loadAll=true);
910 MEDLOADER_EXPORT static MEDFileAnyTypeFieldMultiTS *New(const char *fileName, const char *fieldName, bool loadAll=true);
911 MEDLOADER_EXPORT void loadArrays();
912 MEDLOADER_EXPORT void loadArraysIfNecessary();
913 MEDLOADER_EXPORT void unloadArrays();
914 MEDLOADER_EXPORT void write(const char *fileName, int mode) const;
915 MEDLOADER_EXPORT void writeLL(med_idt fid) const;
916 MEDLOADER_EXPORT std::size_t getHeapMemorySizeWithoutChildren() const;
917 MEDLOADER_EXPORT std::vector<const BigMemoryObject *> getDirectChildren() const;
918 MEDLOADER_EXPORT virtual MEDFileAnyTypeFieldMultiTS *deepCpy() const;
919 MEDLOADER_EXPORT std::vector< MEDCouplingAutoRefCountObjectPtr< MEDFileAnyTypeFieldMultiTS > > splitComponents() const;
920 MEDLOADER_EXPORT std::vector< MEDCouplingAutoRefCountObjectPtr< MEDFileAnyTypeFieldMultiTS > > splitDiscretizations() const;
921 MEDLOADER_EXPORT virtual MEDFileAnyTypeFieldMultiTS *shallowCpy() const = 0;
922 MEDLOADER_EXPORT virtual void checkCoherencyOfType(const MEDFileAnyTypeField1TS *f1ts) const = 0;
924 MEDLOADER_EXPORT virtual MEDFileAnyTypeField1TS *getTimeStepAtPos(int pos) const = 0;
925 MEDLOADER_EXPORT MEDFileAnyTypeField1TS *getTimeStep(int iteration, int order) const;
926 MEDLOADER_EXPORT MEDFileAnyTypeField1TS *getTimeStepGivenTime(double time, double eps=1e-8) const;
927 MEDLOADER_EXPORT static std::vector< std::vector<MEDFileAnyTypeFieldMultiTS *> > SplitIntoCommonTimeSeries(const std::vector<MEDFileAnyTypeFieldMultiTS *>& vectFMTS);
928 MEDLOADER_EXPORT static std::vector< std::vector<MEDFileAnyTypeFieldMultiTS *> > SplitPerCommonSupport(const std::vector<MEDFileAnyTypeFieldMultiTS *>& vectFMTS, const MEDFileMesh *mesh, std::vector< MEDCouplingAutoRefCountObjectPtr<MEDFileFastCellSupportComparator> >& fsc);
929 MEDLOADER_EXPORT static int CheckSupportAcrossTime(MEDFileAnyTypeFieldMultiTS *f0, MEDFileAnyTypeFieldMultiTS *f1, const MEDFileMesh *mesh, TypeOfField& tof0, TypeOfField& tof1);
930 public:// direct forwarding to MEDFileField1TSWithoutSDA instance _content
931 MEDLOADER_EXPORT std::string getName() const;
932 MEDLOADER_EXPORT void setName(const char *name);
933 MEDLOADER_EXPORT std::string getDtUnit() const;
934 MEDLOADER_EXPORT void setDtUnit(const char *dtUnit);
935 MEDLOADER_EXPORT std::string getMeshName() const;
936 MEDLOADER_EXPORT void setMeshName(const char *newMeshName);
937 MEDLOADER_EXPORT std::string simpleRepr() const;
938 MEDLOADER_EXPORT void simpleRepr(int bkOffset, std::ostream& oss, int fmtsId) const;
939 MEDLOADER_EXPORT int getNumberOfTS() const;
940 MEDLOADER_EXPORT void eraseEmptyTS();
941 MEDLOADER_EXPORT void eraseTimeStepIds(const int *startIds, const int *endIds);
942 MEDLOADER_EXPORT void eraseTimeStepIds2(int bg, int end, int step);
943 MEDLOADER_EXPORT MEDFileAnyTypeFieldMultiTS *buildSubPart(const int *startIds, const int *endIds) const;
944 MEDLOADER_EXPORT MEDFileAnyTypeFieldMultiTS *buildSubPartSlice(int bg, int end, int step) const;
945 MEDLOADER_EXPORT std::vector< std::pair<int,int> > getTimeSteps(std::vector<double>& ret1) const;
946 MEDLOADER_EXPORT std::vector< std::pair<int,int> > getIterations() const;
947 MEDLOADER_EXPORT void pushBackTimeSteps(const std::vector<MEDFileAnyTypeField1TS *>& f1ts);
948 MEDLOADER_EXPORT void pushBackTimeStep(MEDFileAnyTypeField1TS *f1ts);
949 MEDLOADER_EXPORT void synchronizeNameScope();
950 MEDLOADER_EXPORT int getPosOfTimeStep(int iteration, int order) const;
951 MEDLOADER_EXPORT int getPosGivenTime(double time, double eps=1e-8) const;
952 MEDLOADER_EXPORT MEDFileAnyTypeFieldMultiTSIterator *iterator();
953 MEDLOADER_EXPORT bool changeMeshNames(const std::vector< std::pair<std::string,std::string> >& modifTab);
954 MEDLOADER_EXPORT const std::vector<std::string>& getInfo() const;
955 MEDLOADER_EXPORT void setInfo(const std::vector<std::string>& info);
956 MEDLOADER_EXPORT int getNumberOfComponents() const;
957 MEDLOADER_EXPORT int getNonEmptyLevels(int iteration, int order, const char *mname, std::vector<int>& levs) const;
958 MEDLOADER_EXPORT std::vector< std::vector<TypeOfField> > getTypesOfFieldAvailable() const;
959 MEDLOADER_EXPORT 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;
960 MEDLOADER_EXPORT MEDCouplingAutoRefCountObjectPtr<MEDFileAnyTypeFieldMultiTSWithoutSDA> getContent();
962 MEDLOADER_EXPORT std::vector<std::string> getPflsReallyUsed() const;
963 MEDLOADER_EXPORT std::vector<std::string> getLocsReallyUsed() const;
964 MEDLOADER_EXPORT std::vector<std::string> getPflsReallyUsedMulti() const;
965 MEDLOADER_EXPORT std::vector<std::string> getLocsReallyUsedMulti() const;
966 MEDLOADER_EXPORT void changePflsRefsNamesGen(const std::vector< std::pair<std::vector<std::string>, std::string > >& mapOfModif);
967 MEDLOADER_EXPORT void changeLocsRefsNamesGen(const std::vector< std::pair<std::vector<std::string>, std::string > >& mapOfModif);
969 MEDFileAnyTypeFieldMultiTSWithoutSDA *contentNotNullBase();
970 const MEDFileAnyTypeFieldMultiTSWithoutSDA *contentNotNullBase() const;
972 static std::vector< std::vector<MEDFileAnyTypeFieldMultiTS *> > SplitPerCommonSupportNotNodesAlg(const std::vector<MEDFileAnyTypeFieldMultiTS *>& vectFMTS, const MEDFileMesh *mesh, std::vector< MEDCouplingAutoRefCountObjectPtr<MEDFileFastCellSupportComparator> >& cmps);
974 MEDCouplingAutoRefCountObjectPtr<MEDFileAnyTypeFieldMultiTSWithoutSDA> _content;
977 class MEDFileIntFieldMultiTS;
982 class MEDFileFieldMultiTS : public MEDFileAnyTypeFieldMultiTS
985 MEDLOADER_EXPORT static MEDFileFieldMultiTS *New();
986 MEDLOADER_EXPORT static MEDFileFieldMultiTS *New(const char *fileName, bool loadAll=true);
987 MEDLOADER_EXPORT static MEDFileFieldMultiTS *New(const char *fileName, const char *fieldName, bool loadAll=true);
988 MEDLOADER_EXPORT static MEDFileFieldMultiTS *New(const MEDFileFieldMultiTSWithoutSDA& other, bool shallowCopyOfContent);
989 MEDLOADER_EXPORT MEDFileAnyTypeFieldMultiTS *shallowCpy() const;
990 MEDLOADER_EXPORT void checkCoherencyOfType(const MEDFileAnyTypeField1TS *f1ts) const;
991 MEDLOADER_EXPORT MEDFileIntFieldMultiTS *convertToInt(bool deepCpyGlobs=true) const;
993 MEDLOADER_EXPORT MEDFileAnyTypeField1TS *getTimeStepAtPos(int pos) const;
994 MEDLOADER_EXPORT MEDFileAnyTypeField1TS *getTimeStep(int iteration, int order) const;
995 MEDLOADER_EXPORT MEDFileAnyTypeField1TS *getTimeStepGivenTime(double time, double eps=1e-8) const;
997 MEDLOADER_EXPORT MEDCouplingFieldDouble *getFieldAtLevel(TypeOfField type, int iteration, int order, int meshDimRelToMax, int renumPol=0) const;
998 MEDLOADER_EXPORT MEDCouplingFieldDouble *getFieldAtTopLevel(TypeOfField type, int iteration, int order, int renumPol=0) const;
999 MEDLOADER_EXPORT MEDCouplingFieldDouble *getFieldOnMeshAtLevel(TypeOfField type, int iteration, int order, int meshDimRelToMax, const MEDFileMesh *mesh, int renumPol=0) const;
1000 MEDLOADER_EXPORT MEDCouplingFieldDouble *getFieldOnMeshAtLevel(TypeOfField type, int iteration, int order, const MEDCouplingMesh *mesh, int renumPol=0) const;
1001 MEDLOADER_EXPORT MEDCouplingFieldDouble *getFieldAtLevelOld(TypeOfField type, const char *mname, int iteration, int order, int meshDimRelToMax, int renumPol=0) const;
1002 MEDLOADER_EXPORT DataArrayDouble *getFieldWithProfile(TypeOfField type, int iteration, int order, int meshDimRelToMax, const MEDFileMesh *mesh, DataArrayInt *&pfl) const;
1004 MEDLOADER_EXPORT void appendFieldNoProfileSBT(const MEDCouplingFieldDouble *field);
1005 MEDLOADER_EXPORT void appendFieldProfile(const MEDCouplingFieldDouble *field, const MEDFileMesh *mesh, int meshDimRelToMax, const DataArrayInt *profile);
1006 MEDLOADER_EXPORT 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;
1007 MEDLOADER_EXPORT DataArrayDouble *getUndergroundDataArray(int iteration, int order) const;
1008 MEDLOADER_EXPORT DataArrayDouble *getUndergroundDataArrayExt(int iteration, int order, std::vector< std::pair<std::pair<INTERP_KERNEL::NormalizedCellType,int>,std::pair<int,int> > >& entries) const;
1010 const MEDFileFieldMultiTSWithoutSDA *contentNotNull() const;
1011 MEDFileFieldMultiTSWithoutSDA *contentNotNull();
1013 MEDFileFieldMultiTS();
1014 MEDFileFieldMultiTS(const MEDFileFieldMultiTSWithoutSDA& other, bool shallowCopyOfContent);
1015 MEDFileFieldMultiTS(const char *fileName, bool loadAll);
1016 MEDFileFieldMultiTS(const char *fileName, const char *fieldName, bool loadAll);
1022 class MEDFileIntFieldMultiTS : public MEDFileAnyTypeFieldMultiTS
1025 MEDLOADER_EXPORT static MEDFileIntFieldMultiTS *New();
1026 MEDLOADER_EXPORT static MEDFileIntFieldMultiTS *New(const char *fileName, bool loadAll=true);
1027 MEDLOADER_EXPORT static MEDFileIntFieldMultiTS *New(const char *fileName, const char *fieldName, bool loadAll=true);
1028 MEDLOADER_EXPORT static MEDFileIntFieldMultiTS *New(const MEDFileIntFieldMultiTSWithoutSDA& other, bool shallowCopyOfContent);
1029 MEDLOADER_EXPORT MEDFileAnyTypeFieldMultiTS *shallowCpy() const;
1030 MEDLOADER_EXPORT void checkCoherencyOfType(const MEDFileAnyTypeField1TS *f1ts) const;
1031 MEDLOADER_EXPORT MEDFileAnyTypeField1TS *getTimeStepAtPos(int pos) const;
1032 MEDLOADER_EXPORT MEDFileFieldMultiTS *convertToDouble(bool deepCpyGlobs=true) const;
1034 MEDLOADER_EXPORT MEDCouplingFieldDouble *getFieldAtLevel(TypeOfField type, int iteration, int order, int meshDimRelToMax, DataArrayInt* &arrOut, int renumPol=0) const;
1035 MEDLOADER_EXPORT MEDCouplingFieldDouble *getFieldAtTopLevel(TypeOfField type, int iteration, int order, DataArrayInt* &arrOut, int renumPol=0) const;
1036 MEDLOADER_EXPORT MEDCouplingFieldDouble *getFieldOnMeshAtLevel(TypeOfField type, int iteration, int order, int meshDimRelToMax, const MEDFileMesh *mesh, DataArrayInt* &arrOut, int renumPol=0) const;
1037 MEDLOADER_EXPORT MEDCouplingFieldDouble *getFieldOnMeshAtLevel(TypeOfField type, int iteration, int order, const MEDCouplingMesh *mesh, DataArrayInt* &arrOut, int renumPol=0) const;
1038 MEDLOADER_EXPORT MEDCouplingFieldDouble *getFieldAtLevelOld(TypeOfField type, int iteration, int order, const char *mname, int meshDimRelToMax, DataArrayInt* &arrOut, int renumPol=0) const;
1039 MEDLOADER_EXPORT DataArrayInt *getFieldWithProfile(TypeOfField type, int iteration, int order, int meshDimRelToMax, const MEDFileMesh *mesh, DataArrayInt *&pfl) const;
1041 MEDLOADER_EXPORT void appendFieldNoProfileSBT(const MEDCouplingFieldDouble *field, const DataArrayInt *arrOfVals);
1042 MEDLOADER_EXPORT void appendFieldProfile(const MEDCouplingFieldDouble *field, const DataArrayInt *arrOfVals, const MEDFileMesh *mesh, int meshDimRelToMax, const DataArrayInt *profile);
1044 MEDLOADER_EXPORT DataArrayInt *getUndergroundDataArray(int iteration, int order) const;
1046 const MEDFileIntFieldMultiTSWithoutSDA *contentNotNull() const;
1047 MEDFileIntFieldMultiTSWithoutSDA *contentNotNull();
1049 MEDFileIntFieldMultiTS();
1050 MEDFileIntFieldMultiTS(const MEDFileIntFieldMultiTSWithoutSDA& other, bool shallowCopyOfContent);
1051 MEDFileIntFieldMultiTS(const char *fileName, bool loadAll);
1052 MEDFileIntFieldMultiTS(const char *fileName, const char *fieldName, bool loadAll);
1055 class MEDFileAnyTypeFieldMultiTSIterator
1058 MEDLOADER_EXPORT MEDFileAnyTypeFieldMultiTSIterator(MEDFileAnyTypeFieldMultiTS *fmts);
1059 MEDLOADER_EXPORT ~MEDFileAnyTypeFieldMultiTSIterator();
1060 MEDLOADER_EXPORT MEDFileAnyTypeField1TS *nextt();
1062 MEDCouplingAutoRefCountObjectPtr<MEDFileAnyTypeFieldMultiTS> _fmts;
1067 class MEDFileFieldsIterator;
1072 class MEDFileFields : public RefCountObject, public MEDFileFieldGlobsReal, public MEDFileWritable
1075 MEDLOADER_EXPORT static MEDFileFields *New();
1076 MEDLOADER_EXPORT static MEDFileFields *New(const char *fileName, bool loadAll=true);
1077 MEDLOADER_EXPORT std::size_t getHeapMemorySizeWithoutChildren() const;
1078 MEDLOADER_EXPORT std::vector<const BigMemoryObject *> getDirectChildren() const;
1079 MEDLOADER_EXPORT MEDFileFields *deepCpy() const;
1080 MEDLOADER_EXPORT MEDFileFields *shallowCpy() const;
1081 MEDLOADER_EXPORT void write(const char *fileName, int mode) const;
1082 MEDLOADER_EXPORT void writeLL(med_idt fid) const;
1083 MEDLOADER_EXPORT void loadArrays();
1084 MEDLOADER_EXPORT void loadArraysIfNecessary();
1085 MEDLOADER_EXPORT void unloadArrays();
1086 MEDLOADER_EXPORT int getNumberOfFields() const;
1087 MEDLOADER_EXPORT std::vector< std::pair<int,int> > getCommonIterations(bool& areThereSomeForgottenTS) const;
1088 MEDLOADER_EXPORT std::vector<std::string> getFieldsNames() const;
1089 MEDLOADER_EXPORT std::vector<std::string> getMeshesNames() const;
1090 MEDLOADER_EXPORT std::string simpleRepr() const;
1091 MEDLOADER_EXPORT void simpleRepr(int bkOffset, std::ostream& oss) const;
1093 MEDLOADER_EXPORT void resize(int newSize);
1094 MEDLOADER_EXPORT void pushField(MEDFileAnyTypeFieldMultiTS *field);
1095 MEDLOADER_EXPORT void pushFields(const std::vector<MEDFileAnyTypeFieldMultiTS *>& fields);
1096 MEDLOADER_EXPORT void setFieldAtPos(int i, MEDFileAnyTypeFieldMultiTS *field);
1097 MEDLOADER_EXPORT int getPosFromFieldName(const char *fieldName) const;
1098 MEDLOADER_EXPORT MEDFileAnyTypeFieldMultiTS *getFieldAtPos(int i) const;
1099 MEDLOADER_EXPORT MEDFileAnyTypeFieldMultiTS *getFieldWithName(const char *fieldName) const;
1100 MEDLOADER_EXPORT MEDFileFields *buildSubPart(const int *startIds, const int *endIds) const;
1101 MEDLOADER_EXPORT MEDFileFields *partOfThisLyingOnSpecifiedMeshName(const char *meshName) const;
1102 MEDLOADER_EXPORT MEDFileFields *partOfThisLyingOnSpecifiedTimeSteps(const std::vector< std::pair<int,int> >& timeSteps) const;
1103 MEDLOADER_EXPORT MEDFileFields *partOfThisNotLyingOnSpecifiedTimeSteps(const std::vector< std::pair<int,int> >& timeSteps) const;
1104 MEDLOADER_EXPORT MEDFileFieldsIterator *iterator();
1105 MEDLOADER_EXPORT void destroyFieldAtPos(int i);
1106 MEDLOADER_EXPORT void destroyFieldsAtPos(const int *startIds, const int *endIds);
1107 MEDLOADER_EXPORT void destroyFieldsAtPos2(int bg, int end, int step);
1108 MEDLOADER_EXPORT bool changeMeshNames(const std::vector< std::pair<std::string,std::string> >& modifTab);
1109 MEDLOADER_EXPORT bool renumberEntitiesLyingOnMesh(const char *meshName, const std::vector<int>& oldCode, const std::vector<int>& newCode, const DataArrayInt *renumO2N);
1111 MEDLOADER_EXPORT std::vector<std::string> getPflsReallyUsed() const;
1112 MEDLOADER_EXPORT std::vector<std::string> getLocsReallyUsed() const;
1113 MEDLOADER_EXPORT std::vector<std::string> getPflsReallyUsedMulti() const;
1114 MEDLOADER_EXPORT std::vector<std::string> getLocsReallyUsedMulti() const;
1115 MEDLOADER_EXPORT void changePflsRefsNamesGen(const std::vector< std::pair<std::vector<std::string>, std::string > >& mapOfModif);
1116 MEDLOADER_EXPORT void changeLocsRefsNamesGen(const std::vector< std::pair<std::vector<std::string>, std::string > >& mapOfModif);
1119 MEDFileFields(const char *fileName, bool loadAll);
1121 std::vector< MEDCouplingAutoRefCountObjectPtr<MEDFileAnyTypeFieldMultiTSWithoutSDA> > _fields;
1124 class MEDFileFieldsIterator
1127 MEDLOADER_EXPORT MEDFileFieldsIterator(MEDFileFields *fs);
1128 MEDLOADER_EXPORT ~MEDFileFieldsIterator();
1129 MEDLOADER_EXPORT MEDFileAnyTypeFieldMultiTS *nextt();
1131 MEDCouplingAutoRefCountObjectPtr<MEDFileFields> _fs;