1 // Copyright (C) 2007-2016 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, or (at your option) any later version.
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 "MEDFileFieldOverView.hxx"
27 #include "MEDFileUtilities.txx"
28 #include "MEDFileEntities.hxx"
31 #include "MEDLoaderTraits.hxx"
32 #include "MEDCouplingTraits.hxx"
33 #include "MEDCouplingRefCountObject.hxx"
34 #include "MEDCouplingFieldInt.hxx"
35 #include "MEDCouplingMemArray.hxx"
36 #include "MEDCouplingPartDefinition.hxx"
38 #include "NormalizedUnstructuredMesh.hxx"
39 #include "InterpKernelException.hxx"
50 class MEDFileFieldGlobs;
51 class MEDCouplingMesh;
52 class MEDCouplingFieldDouble;
54 class MEDFileFieldVisitor;
59 virtual MEDFileGTKeeper *deepCopy() const = 0;
60 virtual INTERP_KERNEL::NormalizedCellType getGeoType() const = 0;
61 virtual std::string getRepr() const = 0;
62 virtual bool isEqual(const MEDFileGTKeeper *other) const = 0;
63 virtual ~MEDFileGTKeeper();
66 class MEDFileGTKeeperSta : public MEDFileGTKeeper
69 MEDFileGTKeeperSta(INTERP_KERNEL::NormalizedCellType gt):_geo_type(gt) { }
70 MEDFileGTKeeper *deepCopy() const;
71 INTERP_KERNEL::NormalizedCellType getGeoType() const;
72 std::string getRepr() const;
73 bool isEqual(const MEDFileGTKeeper *other) const;
75 INTERP_KERNEL::NormalizedCellType _geo_type;
79 class MEDFileGTKeeperDyn : public MEDFileGTKeeper
82 MEDFileGTKeeperDyn(const MEDFileUMesh *mesh, const MEDFileUMesh *section, const MEDFileStructureElement *se);
83 MEDFileGTKeeper *deepCopy() const;
84 INTERP_KERNEL::NormalizedCellType getGeoType() const;
85 std::string getRepr() const;
86 bool isEqual(const MEDFileGTKeeper *other) const;
87 const MEDFileUMesh *getMesh() const { return _mesh; }
88 const MEDFileUMesh *getSection() const { return _section; }
89 const MEDFileStructureElement *getSE() const { return _se; }
91 MCConstAuto<MEDFileUMesh> _mesh;
92 MCConstAuto<MEDFileUMesh> _section;
93 MCConstAuto<MEDFileStructureElement> _se;
96 class MEDFileFieldLoc : public RefCountObject
99 MEDLOADER_EXPORT void simpleRepr(std::ostream& oss) const;
100 MEDLOADER_EXPORT std::string getName() const { return _name; }
101 MEDLOADER_EXPORT void setName(const std::string& name);
102 static MEDFileFieldLoc *New(med_idt fid, const std::string& locName);
103 static MEDFileFieldLoc *New(med_idt fid, int i, const MEDFileEntities *entities);
104 static MEDFileFieldLoc *New(const std::string& locName, INTERP_KERNEL::NormalizedCellType geoType, const std::vector<double>& refCoo, const std::vector<double>& gsCoo, const std::vector<double>& w);
105 std::size_t getHeapMemorySizeWithoutChildren() const;
106 std::vector<const BigMemoryObject *> getDirectChildrenWithNull() const;
107 MEDFileFieldLoc *deepCopy() const;
108 bool isOnStructureElement() const;
109 const MEDFileGTKeeper *getUndergroundGTKeeper() const { return _gt; }
110 MEDLOADER_EXPORT int getNbOfGaussPtPerCell() const { return _nb_gauss_pt; }
111 MEDLOADER_EXPORT void writeLL(med_idt fid) const;
112 MEDLOADER_EXPORT std::string repr() const;
113 MEDLOADER_EXPORT bool isName(const std::string& name) const { return _name==name; }
114 MEDLOADER_EXPORT int getDimension() const { return _dim; }
115 MEDLOADER_EXPORT int getNumberOfGaussPoints() const { return _nb_gauss_pt; }
116 MEDLOADER_EXPORT int getNumberOfPointsInCells() const { return _nb_node_per_cell; }
117 MEDLOADER_EXPORT const std::vector<double>& getRefCoords() const { return _ref_coo; }
118 MEDLOADER_EXPORT const std::vector<double>& getGaussCoords() const { return _gs_coo; }
119 MEDLOADER_EXPORT const std::vector<double>& getGaussWeights() const { return _w; }
120 MEDLOADER_EXPORT INTERP_KERNEL::NormalizedCellType getGeoType() const { return _gt->getGeoType(); }
121 MEDLOADER_EXPORT bool isEqual(const MEDFileFieldLoc& other, double eps) const;
123 MEDFileFieldLoc(const MEDFileFieldLoc& other);
124 MEDFileFieldLoc(med_idt fid, const std::string& locName);
125 MEDFileFieldLoc(med_idt fid, int id, const MEDFileEntities *entities);
126 MEDFileFieldLoc(const std::string& locName, INTERP_KERNEL::NormalizedCellType geoType, const std::vector<double>& refCoo, const std::vector<double>& gsCoo, const std::vector<double>& w);
130 INTERP_KERNEL::AutoCppPtr<MEDFileGTKeeper> _gt;
131 int _nb_node_per_cell;
133 std::vector<double> _ref_coo;
134 std::vector<double> _gs_coo;
135 std::vector<double> _w;
139 class MEDFileAnyTypeField1TSWithoutSDA;
140 class MEDFileFieldPerMeshPerTypeCommon;
141 class MEDFileFieldPerMeshPerType;
142 class MEDFileField1TSWithoutSDA;
143 class MEDFileFieldNameScope;
144 class MEDFileFieldGlobsReal;
145 class MEDFileFieldPerMesh;
147 class MEDFileFieldPerMeshPerTypePerDisc : public RefCountObject, public MEDFileWritable
150 static MEDFileFieldPerMeshPerTypePerDisc *NewOnRead(MEDFileFieldPerMeshPerTypeCommon *fath, TypeOfField type, int profileIt, const PartDefinition *pd);
151 static MEDFileFieldPerMeshPerTypePerDisc *New(MEDFileFieldPerMeshPerTypeCommon *fath, TypeOfField type, int locId);
152 static MEDFileFieldPerMeshPerTypePerDisc *New(const MEDFileFieldPerMeshPerTypePerDisc& other);
153 std::size_t getHeapMemorySizeWithoutChildren() const;
154 std::vector<const BigMemoryObject *> getDirectChildrenWithNull() const;
155 MEDFileFieldPerMeshPerTypePerDisc *deepCopy(MEDFileFieldPerMeshPerTypeCommon *father) const;
156 void assignFieldNoProfile(int& start, int offset, int nbOfCells, const MEDCouplingFieldDouble *field, const DataArray *arrr, MEDFileFieldGlobsReal& glob, const MEDFileFieldNameScope& nasc);
157 void assignFieldProfile(bool isPflAlone, 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);
158 void assignNodeFieldNoProfile(int& start, const MEDCouplingFieldDouble *field, const DataArray *arrr, MEDFileFieldGlobsReal& glob);
159 void getCoarseData(TypeOfField& type, std::pair<int,int>& dad, std::string& pfl, std::string& loc) const;
160 void writeLL(med_idt fid, const MEDFileFieldNameScope& nasc) const;
161 const MEDFileFieldPerMeshPerTypeCommon *getFather() const;
162 void loadOnlyStructureOfDataRecursively(med_idt fid, int& start, const MEDFileFieldNameScope& nasc);
163 void loadBigArray(med_idt fid, const MEDFileFieldNameScope& nasc);
164 void setNewStart(int newValueOfStart);
165 int getIteration() const;
166 int getOrder() const;
167 double getTime() const;
168 std::string getMeshName() const;
169 TypeOfField getType() const;
170 void simpleRepr(int bkOffset, std::ostream& oss, int id) const;
171 void fillTypesOfFieldAvailable(std::set<TypeOfField>& types) const;
172 void setType(TypeOfField newType);
173 INTERP_KERNEL::NormalizedCellType getGeoType() const;
174 int getNumberOfComponents() const;
175 int getNumberOfTuples() const;
176 int getStart() const { return _start; }
177 int getEnd() const { return _end; }
178 void setEnd(int endd) { _end=endd; }
179 int getNumberOfVals() const { return _nval; }
180 DataArray *getOrCreateAndGetArray();
181 const DataArray *getOrCreateAndGetArray() const;
182 const std::vector<std::string>& getInfo() const;
183 std::string getProfile() const;
184 void setProfile(const std::string& newPflName);
185 std::string getLocalization() const;
186 void setLocalization(const std::string& newLocName);
187 int getLocId() const { return _loc_id; }
188 void setLocId(int newId) const { _loc_id=newId; }
189 void setFather(MEDFileFieldPerMeshPerTypeCommon *newFather) { _father=newFather; }
190 void changePflsRefsNamesGen(const std::vector< std::pair<std::vector<std::string>, std::string > >& mapOfModif);
191 void changeLocsRefsNamesGen(const std::vector< std::pair<std::vector<std::string>, std::string > >& mapOfModif);
192 void getFieldAtLevel(TypeOfField type, const MEDFileFieldGlobsReal *glob, std::vector< std::pair<int,int> >& dads, std::vector<const DataArrayInt *>& pfls, std::vector<int>& locs,
193 std::vector<INTERP_KERNEL::NormalizedCellType>& geoTypes) const;
194 void fillValues(int discId, int& startEntryId, std::vector< std::pair<std::pair<INTERP_KERNEL::NormalizedCellType,int>,std::pair<int,int> > >& entries) const;
195 int fillEltIdsFromCode(int offset, const std::vector<int>& codeOfMesh, const MEDFileFieldGlobsReal& glob, int *ptToFill) const;
196 int fillTupleIds(int *ptToFill) const;
197 static int ConvertType(TypeOfField type, int locId);
198 static std::vector< std::vector< const MEDFileFieldPerMeshPerTypePerDisc *> > SplitPerDiscretization(const std::vector< const MEDFileFieldPerMeshPerTypePerDisc *>& entries);
199 static bool RenumberChunks(int offset, const std::vector< const MEDFileFieldPerMeshPerTypePerDisc *>& entriesOnSameDisc,
200 const DataArrayInt *explicitIdsInMesh, const std::vector<int>& newCode,
201 MEDFileFieldGlobsReal& glob, DataArrayDouble *arr, std::vector< MCAuto<MEDFileFieldPerMeshPerTypePerDisc> >& result);
202 static MEDFileFieldPerMeshPerTypePerDisc *NewObjectOnSameDiscThanPool(TypeOfField typeF, INTERP_KERNEL::NormalizedCellType geoType, DataArrayInt *idsOfMeshElt,
203 bool isPfl, int nbi, int offset, std::list< const MEDFileFieldPerMeshPerTypePerDisc *>& entriesOnSameDisc,
204 MEDFileFieldGlobsReal& glob, bool ¬InExisting);
205 static MCAuto<MEDFileFieldPerMeshPerTypePerDisc> Aggregate(int &start, const std::vector<std::pair<int,const MEDFileFieldPerMeshPerTypePerDisc *> >& pms, const std::vector< std::vector< std::pair<int,int> > >& dts, TypeOfField tof, MEDFileFieldPerMeshPerType *father, std::vector<std::pair< int, std::pair<int,int> > >& extractInfo);
206 MEDFileFieldPerMeshPerTypePerDisc(MEDFileFieldPerMeshPerTypeCommon *fath, TypeOfField type):_type(type),_father(fath),_start(-1),_end(-1),_nval(-1),_loc_id(-5),_profile_it(-1) { }
208 MEDFileFieldPerMeshPerTypePerDisc(MEDFileFieldPerMeshPerTypeCommon *fath, TypeOfField type, int profileIt, const PartDefinition *pd);
209 MEDFileFieldPerMeshPerTypePerDisc(MEDFileFieldPerMeshPerTypeCommon *fath, TypeOfField type, int profileIt, const std::string& dummy);
210 MEDFileFieldPerMeshPerTypePerDisc(const MEDFileFieldPerMeshPerTypePerDisc& other);
211 MEDFileFieldPerMeshPerTypePerDisc();
213 void goReadZeValuesInFile(med_idt fid, const std::string& fieldName, int nbOfCompo, int iteration, int order, med_entity_type menti, med_geometry_type mgeoti, unsigned char *startFeedingPtr);
216 MEDFileFieldPerMeshPerTypeCommon *_father;
219 //! _nval is different than end-start in case of ON_GAUSS_PT and ON_GAUSS_NE ! (_nval=(_end-_start)/nbi)
221 std::string _profile;
222 std::string _localization;
223 //! only on assignement -3 : ON_NODES, -2 : ON_CELLS, -1 : ON_GAUSS_NE, 0..* : ON_GAUSS_PT
225 mutable int _profile_it;
226 MCAuto<PartDefinition> _pd;
228 mutable int _tmp_work1;
231 class MEDFileFieldPerMeshPerTypeCommon : public RefCountObject, public MEDFileWritable
234 std::size_t getHeapMemorySizeWithoutChildren() const;
235 std::vector<const BigMemoryObject *> getDirectChildrenWithNull() const;
236 void assignFieldNoProfile(int& start, int offset, int nbOfCells, const MEDCouplingFieldDouble *field, const DataArray *arr, MEDFileFieldGlobsReal& glob, const MEDFileFieldNameScope& nasc);
237 void assignFieldProfile(bool isPflAlone, 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);
238 void assignNodeFieldNoProfile(int& start, const MEDCouplingFieldDouble *field, const DataArray *arr, MEDFileFieldGlobsReal& glob);
239 void assignNodeFieldProfile(int& start, const DataArrayInt *pfl, const MEDCouplingFieldDouble *field, const DataArray *arr, MEDFileFieldGlobsReal& glob, const MEDFileFieldNameScope& nasc);
240 const MEDFileFieldPerMesh *getFather() const;
241 void loadOnlyStructureOfDataRecursively(med_idt fid, int &start, const MEDFileFieldNameScope& nasc);
242 void loadBigArraysRecursively(med_idt fid, const MEDFileFieldNameScope& nasc);
243 void writeLL(med_idt fid, const MEDFileFieldNameScope& nasc) const;
244 bool isUniqueLevel(int& dim) const;
245 void fillTypesOfFieldAvailable(std::set<TypeOfField>& types) const;
246 void fillFieldSplitedByType(std::vector< std::pair<int,int> >& dads, std::vector<TypeOfField>& types, std::vector<std::string>& pfls, std::vector<std::string>& locs) const;
247 int getIteration() const;
248 int getOrder() const;
249 double getTime() const;
250 std::string getMeshName() const;
251 void getSizes(int& globalSz, int& nbOfEntries) const;
252 int getNumberOfComponents() const;
253 bool presenceOfMultiDiscPerGeoType() const;
254 void pushDiscretization(MEDFileFieldPerMeshPerTypePerDisc *disc);
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 void changePflsRefsNamesGen(const std::vector< std::pair<std::vector<std::string>, std::string > >& mapOfModif);
263 void changeLocsRefsNamesGen(const std::vector< std::pair<std::vector<std::string>, std::string > >& mapOfModif);
264 MEDFileFieldPerMeshPerTypePerDisc *getLeafGivenLocId(int locId);
265 const MEDFileFieldPerMeshPerTypePerDisc *getLeafGivenLocId(int locId) const;
266 int getNumberOfLoc() const { return _field_pm_pt_pd.size(); }
267 void fillValues(int& startEntryId, std::vector< std::pair<std::pair<INTERP_KERNEL::NormalizedCellType,int>,std::pair<int,int> > >& entries) const;
268 void setLeaves(const std::vector< MCAuto< MEDFileFieldPerMeshPerTypePerDisc > >& leaves);
269 bool keepOnlySpatialDiscretization(TypeOfField tof, int &globalNum, std::vector< std::pair<int,int> >& its);
270 bool keepOnlyGaussDiscretization(std::size_t idOfDisc, int &globalNum, std::vector< std::pair<int,int> >& its);
271 static med_entity_type ConvertIntoMEDFileType(TypeOfField ikType, INTERP_KERNEL::NormalizedCellType ikGeoType, med_geometry_type& medfGeoType);
272 MEDFileFieldPerMeshPerTypeCommon(MEDFileFieldPerMesh *father):_father(father) { }
273 void setFather(MEDFileFieldPerMesh *father);
274 void accept(MEDFileFieldVisitor& visitor) const;
276 virtual ~MEDFileFieldPerMeshPerTypeCommon();
277 virtual void getDimension(int& dim) const = 0;
278 virtual INTERP_KERNEL::NormalizedCellType getGeoType() const = 0;
279 virtual void entriesForMEDfile(TypeOfField mct, med_geometry_type& gt, med_entity_type& ent) const = 0;
280 virtual void simpleRepr(int bkOffset, std::ostream& oss, int id) const = 0;
281 virtual std::string getGeoTypeRepr() const = 0;
282 virtual MEDFileFieldPerMeshPerTypeCommon *deepCopy(MEDFileFieldPerMesh *father) const = 0;
283 virtual 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 = 0;
285 void deepCopyElements();
286 std::vector<int> addNewEntryIfNecessary(const MEDCouplingFieldDouble *field, int offset, int nbOfCells);
287 std::vector<int> addNewEntryIfNecessaryGauss(const MEDCouplingFieldDouble *field, int offset, int nbOfCells);
288 std::vector<int> addNewEntryIfNecessary(const MEDCouplingFieldDouble *field, const DataArrayInt *subCells);
289 std::vector<int> addNewEntryIfNecessaryGauss(const MEDCouplingFieldDouble *field, const DataArrayInt *subCells);
291 MEDFileFieldPerMesh *_father;
293 std::vector< MCAuto<MEDFileFieldPerMeshPerTypePerDisc> > _field_pm_pt_pd;
296 class MEDFileFieldPerMeshPerType : public MEDFileFieldPerMeshPerTypeCommon
299 static MEDFileFieldPerMeshPerType *New(MEDFileFieldPerMesh *fath, INTERP_KERNEL::NormalizedCellType geoType);
300 static MEDFileFieldPerMeshPerType *NewOnRead(med_idt fid, MEDFileFieldPerMesh *fath, TypeOfField type, INTERP_KERNEL::NormalizedCellType geoType, const MEDFileFieldNameScope& nasc, const PartDefinition *pd);
301 static MCAuto<MEDFileFieldPerMeshPerType> Aggregate(int &start, const std::vector< std::pair<int,const MEDFileFieldPerMeshPerType *> >& pms, const std::vector< std::vector< std::pair<int,int> > >& dts, INTERP_KERNEL::NormalizedCellType gt, MEDFileFieldPerMesh *father, std::vector<std::pair< int, std::pair<int,int> > >& extractInfo);
302 public:// overload of abstract methods
303 void getDimension(int& dim) const;
304 INTERP_KERNEL::NormalizedCellType getGeoType() const;
305 void entriesForMEDfile(TypeOfField mct, med_geometry_type& gt, med_entity_type& ent) const;
306 void simpleRepr(int bkOffset, std::ostream& oss, int id) const;
307 std::string getGeoTypeRepr() const;
308 MEDFileFieldPerMeshPerType *deepCopy(MEDFileFieldPerMesh *father) const;
309 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;
311 MEDFileFieldPerMeshPerType(med_idt fid, MEDFileFieldPerMesh *fath, TypeOfField type, INTERP_KERNEL::NormalizedCellType geoType, const MEDFileFieldNameScope& nasc, const PartDefinition *pd);
312 MEDFileFieldPerMeshPerType(MEDFileFieldPerMesh *father, INTERP_KERNEL::NormalizedCellType gt);
314 INTERP_KERNEL::NormalizedCellType _geo_type;
317 class MEDFileFieldPerMeshPerTypeDyn : public MEDFileFieldPerMeshPerTypeCommon
320 static MEDFileFieldPerMeshPerTypeDyn *NewOnRead(med_idt fid, MEDFileFieldPerMesh *fath, const MEDFileEntities *entities, int idGT, const MEDFileFieldNameScope& nasc);
321 int getDynGT() const;
322 std::string getModelName() const;
324 void getDimension(int& dim) const;
325 INTERP_KERNEL::NormalizedCellType getGeoType() const;
326 void entriesForMEDfile(TypeOfField mct, med_geometry_type& gt, med_entity_type& ent) const;
327 void simpleRepr(int bkOffset, std::ostream& oss, int id) const;
328 std::string getGeoTypeRepr() const;
329 MEDFileFieldPerMeshPerTypeDyn *deepCopy(MEDFileFieldPerMesh *father) const;
330 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;
332 MEDFileFieldPerMeshPerTypeDyn(med_idt fid, MEDFileFieldPerMesh *fath, const MEDFileStructureElement *se, const MEDFileFieldNameScope& nasc);
334 MCConstAuto<MEDFileStructureElement> _se;
339 class MEDFileFieldPerMesh : public RefCountObject, public MEDFileWritable
342 static MEDFileFieldPerMesh *New(MEDFileAnyTypeField1TSWithoutSDA *fath, const MEDCouplingMesh *mesh);
343 static MEDFileFieldPerMesh *NewOnRead(med_idt fid, MEDFileAnyTypeField1TSWithoutSDA *fath, int meshCsit, int meshIteration, int meshOrder, const MEDFileFieldNameScope& nasc, const MEDFileMesh *mm, const MEDFileEntities *entities);
344 std::size_t getHeapMemorySizeWithoutChildren() const;
345 std::vector<const BigMemoryObject *> getDirectChildrenWithNull() const;
346 MEDFileFieldPerMesh *deepCopy(MEDFileAnyTypeField1TSWithoutSDA *father) const;
347 void simpleRepr(int bkOffset,std::ostream& oss, int id) const;
348 void copyTinyInfoFrom(const MEDCouplingMesh *mesh);
349 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);
350 void assignFieldNoProfileNoRenum(int& start, const std::vector<int>& code, const MEDCouplingFieldDouble *field, const DataArray *arr, MEDFileFieldGlobsReal& glob, const MEDFileFieldNameScope& nasc);
351 void assignNodeFieldNoProfile(int& start, const MEDCouplingFieldDouble *field, const DataArray *arr, MEDFileFieldGlobsReal& glob);
352 void assignNodeFieldProfile(int& start, const DataArrayInt *pfl, const MEDCouplingFieldDouble *field, const DataArray *arr, MEDFileFieldGlobsReal& glob, const MEDFileFieldNameScope& nasc);
353 void loadOnlyStructureOfDataRecursively(med_idt fid, int &start, const MEDFileFieldNameScope& nasc);
354 void loadBigArraysRecursively(med_idt fid, const MEDFileFieldNameScope& nasc);
355 void writeLL(med_idt fid, const MEDFileFieldNameScope& nasc) const;
356 void fillTypesOfFieldAvailable(std::set<TypeOfField>& types) const;
357 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;
358 void accept(MEDFileFieldVisitor& visitor) const;
359 void getDimension(int& dim) const;
360 bool isUniqueLevel(int& dim) const;
361 double getTime() const;
362 int getIteration() const;
363 int getOrder() const;
364 int getMeshIteration() const { return _mesh_iteration; }
365 int getMeshOrder() const { return _mesh_order; }
366 std::string getMeshName() const;
367 void setMeshName(const std::string& meshName);
368 int getNumberOfComponents() const;
369 bool presenceOfMultiDiscPerGeoType() const;
370 bool presenceOfStructureElements() const;
371 bool onlyStructureElements() const;
372 void killStructureElements();
373 void keepOnlyStructureElements();
374 void keepOnlyOnSE(const std::string& seName);
375 void getMeshSENames(std::vector< std::pair<std::string,std::string> >& ps) const;
376 DataArray *getOrCreateAndGetArray();
377 const DataArray *getOrCreateAndGetArray() const;
378 const std::vector<std::string>& getInfo() const;
379 std::vector<std::string> getPflsReallyUsed() const;
380 std::vector<std::string> getLocsReallyUsed() const;
381 std::vector<std::string> getPflsReallyUsedMulti() const;
382 std::vector<std::string> getLocsReallyUsedMulti() const;
383 void convertMedBallIntoClassic();
384 bool changeMeshNames(const std::vector< std::pair<std::string,std::string> >& modifTab);
385 bool renumberEntitiesLyingOnMesh(const std::string& meshName, const std::vector<int>& oldCode, const std::vector<int>& newCode, const DataArrayInt *renumO2N, MEDFileFieldGlobsReal& glob);
386 void keepOnlySpatialDiscretization(TypeOfField tof, int &globalNum, std::vector< std::pair<int,int> >& its);
387 void keepOnlyGaussDiscretization(std::size_t idOfDisc, int &globalNum, std::vector< std::pair<int,int> >& its);
388 void changePflsRefsNamesGen(const std::vector< std::pair<std::vector<std::string>, std::string > >& mapOfModif);
389 void changeLocsRefsNamesGen(const std::vector< std::pair<std::vector<std::string>, std::string > >& mapOfModif);
390 MEDCouplingFieldDouble *getFieldOnMeshAtLevel(TypeOfField type, const MEDFileFieldGlobsReal *glob, const MEDCouplingMesh *mesh, bool& isPfl, MCAuto<DataArray> &arrOut, const MEDFileFieldNameScope& nasc) const;
391 DataArray *getFieldOnMeshAtLevelWithPfl(TypeOfField type, const MEDCouplingMesh *mesh, DataArrayInt *&pfl, const MEDFileFieldGlobsReal *glob, const MEDFileFieldNameScope& nasc) const;
392 void getUndergroundDataArrayExt(std::vector< std::pair<std::pair<INTERP_KERNEL::NormalizedCellType,int>,std::pair<int,int> > >& entries) const;
393 MEDFileFieldPerMeshPerTypePerDisc *getLeafGivenTypeAndLocId(INTERP_KERNEL::NormalizedCellType typ, int locId);
394 const MEDFileFieldPerMeshPerTypePerDisc *getLeafGivenTypeAndLocId(INTERP_KERNEL::NormalizedCellType typ, int locId) const;
395 static MCAuto<MEDFileFieldPerMesh> Aggregate(int &start, const std::vector<const MEDFileFieldPerMesh *>& pms, const std::vector< std::vector< std::pair<int,int> > >& dts, MEDFileAnyTypeField1TSWithoutSDA *father, std::vector<std::pair< int, std::pair<int,int> > >& extractInfo);
397 int addNewEntryIfNecessary(INTERP_KERNEL::NormalizedCellType type);
398 MEDCouplingFieldDouble *finishField(TypeOfField type, const MEDFileFieldGlobsReal *glob,
399 const std::vector< std::pair<int,int> >& dads, const std::vector<int>& locs, const MEDCouplingMesh *mesh, bool& isPfl, MCAuto<DataArray> &arrOut, const MEDFileFieldNameScope& nasc) const;
400 MEDCouplingFieldDouble *finishField2(TypeOfField type, const MEDFileFieldGlobsReal *glob,
401 const std::vector< std::pair<int,int> >& dads, const std::vector<int>& locs,
402 const std::vector<INTERP_KERNEL::NormalizedCellType>& geoTypes,
403 const MEDCouplingMesh *mesh, const DataArrayInt *da, bool& isPfl, MCAuto<DataArray> &arrOut, const MEDFileFieldNameScope& nasc) const;
404 MEDCouplingFieldDouble *finishFieldNode2(const MEDFileFieldGlobsReal *glob,
405 const std::vector< std::pair<int,int> >& dads, const std::vector<int>& locs,
406 const MEDCouplingMesh *mesh, const DataArrayInt *da, bool& isPfl, MCAuto<DataArray> &arrOut, const MEDFileFieldNameScope& nasc) const;
407 DataArray *finishField4(const std::vector< std::pair<int,int> >& dads, const DataArrayInt *pflIn, int nbOfElems, DataArrayInt *&pflOut) const;
408 void assignNewLeaves(const std::vector< MCAuto< MEDFileFieldPerMeshPerTypePerDisc > >& leaves);
409 static void SortArraysPerType(const MEDFileFieldGlobsReal *glob, TypeOfField type,
410 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,
411 std::vector<int>& code, std::vector<DataArrayInt *>& notNullPfls);
412 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);
413 MEDFileFieldPerMesh(med_idt fid, MEDFileAnyTypeField1TSWithoutSDA *fath, int meshCsit, int meshIteration, int meshOrder, const MEDFileFieldNameScope& nasc, const MEDFileMesh *mm, const MEDFileEntities *entities);
414 MEDFileFieldPerMesh(MEDFileAnyTypeField1TSWithoutSDA *fath, const MEDCouplingMesh *mesh);
415 MEDFileFieldPerMesh(MEDFileAnyTypeField1TSWithoutSDA *fath, const std::string& meshName, int meshIt, int meshOrd):_father(fath),_mesh_iteration(meshIt),_mesh_order(meshOrd) { }
419 MEDFileAnyTypeField1TSWithoutSDA *_father;
420 std::vector< MCAuto< MEDFileFieldPerMeshPerTypeCommon > > _field_pm_pt;
423 class MEDFileFieldGlobsReal;
425 class MEDFileFieldGlobs : public RefCountObject
428 static MEDFileFieldGlobs *New(med_idt fid);
429 static MEDFileFieldGlobs *New();
430 std::size_t getHeapMemorySizeWithoutChildren() const;
431 std::vector<const BigMemoryObject *> getDirectChildrenWithNull() const;
432 MEDFileFieldGlobs *deepCopy() const;
433 MEDFileFieldGlobs *shallowCpyPart(const std::vector<std::string>& pfls, const std::vector<std::string>& locs) const;
434 MEDFileFieldGlobs *deepCpyPart(const std::vector<std::string>& pfls, const std::vector<std::string>& locs) const;
435 void simpleRepr(std::ostream& oss) const;
436 void appendGlobs(const MEDFileFieldGlobs& other, double eps);
437 void checkGlobsPflsPartCoherency(const std::vector<std::string>& pflsUsed) const;
438 void checkGlobsLocsPartCoherency(const std::vector<std::string>& locsUsed) const;
439 void loadProfileInFile(med_idt fid, int id, const std::string& pflName);
440 void loadProfileInFile(med_idt fid, int id);
441 void loadGlobals(med_idt fid, const MEDFileFieldGlobsReal& real);
442 void loadAllGlobals(med_idt fid, const MEDFileEntities *entities);
443 void writeGlobals(med_idt fid, const MEDFileWritable& opt) const;
444 std::vector<std::string> getPfls() const;
445 std::vector<std::string> getLocs() const;
446 bool existsPfl(const std::string& pflName) const;
447 bool existsLoc(const std::string& locName) const;
448 std::string createNewNameOfPfl() const;
449 std::string createNewNameOfLoc() const;
450 std::vector< std::vector<int> > whichAreEqualProfiles() const;
451 std::vector< std::vector<int> > whichAreEqualLocs(double eps) const;
452 void setFileName(const std::string& fileName) { _file_name=fileName; }
453 void changePflsNamesInStruct(const std::vector< std::pair<std::vector<std::string>, std::string > >& mapOfModif);
454 void changeLocsNamesInStruct(const std::vector< std::pair<std::vector<std::string>, std::string > >& mapOfModif);
455 int getNbOfGaussPtPerCell(int locId) const;
456 int getLocalizationId(const std::string& loc) const;
457 std::string getFileName() const { return _file_name; }
458 const MEDFileFieldLoc& getLocalizationFromId(int locId) const;
459 const MEDFileFieldLoc& getLocalization(const std::string& locName) const;
460 const DataArrayInt *getProfileFromId(int pflId) const;
461 const DataArrayInt *getProfile(const std::string& pflName) const;
462 MEDFileFieldLoc& getLocalizationFromId(int locId);
463 MEDFileFieldLoc& getLocalization(const std::string& locName);
464 DataArrayInt *getProfile(const std::string& pflName);
465 DataArrayInt *getProfileFromId(int pflId);
466 void killProfileIds(const std::vector<int>& pflIds);
467 void killLocalizationIds(const std::vector<int>& locIds);
468 void killStructureElementsInGlobs();
470 void appendProfile(DataArrayInt *pfl);
471 void appendLoc(const std::string& locName, INTERP_KERNEL::NormalizedCellType geoType, const std::vector<double>& refCoo, const std::vector<double>& gsCoo, const std::vector<double>& w);
473 static std::string CreateNewNameNotIn(const std::string& prefix, const std::vector<std::string>& namesToAvoid);
475 MEDFileFieldGlobs(med_idt fid);
477 ~MEDFileFieldGlobs();
479 std::vector< MCAuto<DataArrayInt> > _pfls;
480 std::vector< MCAuto<MEDFileFieldLoc> > _locs;
481 std::string _file_name;
484 /// @endcond INTERNAL
486 class MEDFileFieldGlobsReal
489 MEDLOADER_EXPORT MEDFileFieldGlobsReal(med_idt fid);
490 MEDLOADER_EXPORT MEDFileFieldGlobsReal();
491 MEDLOADER_EXPORT std::size_t getHeapMemorySizeWithoutChildren() const;
492 MEDLOADER_EXPORT std::vector<const BigMemoryObject *> getDirectChildrenWithNull() const;
493 MEDLOADER_EXPORT void simpleReprGlobs(std::ostream& oss) const;
494 MEDLOADER_EXPORT void resetContent();
495 MEDLOADER_EXPORT void killStructureElementsInGlobs();
496 MEDLOADER_EXPORT void shallowCpyGlobs(const MEDFileFieldGlobsReal& other);
497 MEDLOADER_EXPORT void deepCpyGlobs(const MEDFileFieldGlobsReal& other);
498 MEDLOADER_EXPORT void shallowCpyOnlyUsedGlobs(const MEDFileFieldGlobsReal& other);
499 MEDLOADER_EXPORT void deepCpyOnlyUsedGlobs(const MEDFileFieldGlobsReal& other);
500 MEDLOADER_EXPORT void appendGlobs(const MEDFileFieldGlobsReal& other, double eps);
501 MEDLOADER_EXPORT void checkGlobsCoherency() const;
502 MEDLOADER_EXPORT void checkGlobsPflsPartCoherency() const;
503 MEDLOADER_EXPORT void checkGlobsLocsPartCoherency() const;
504 MEDLOADER_EXPORT virtual std::vector<std::string> getPflsReallyUsed() const = 0;
505 MEDLOADER_EXPORT virtual std::vector<std::string> getLocsReallyUsed() const = 0;
506 MEDLOADER_EXPORT virtual std::vector<std::string> getPflsReallyUsedMulti() const = 0;
507 MEDLOADER_EXPORT virtual std::vector<std::string> getLocsReallyUsedMulti() const = 0;
508 MEDLOADER_EXPORT virtual void changePflsRefsNamesGen(const std::vector< std::pair<std::vector<std::string>, std::string > >& mapOfModif) = 0;
509 MEDLOADER_EXPORT virtual void changeLocsRefsNamesGen(const std::vector< std::pair<std::vector<std::string>, std::string > >& mapOfModif) = 0;
510 MEDLOADER_EXPORT virtual ~MEDFileFieldGlobsReal();
512 MEDLOADER_EXPORT void loadProfileInFile(med_idt fid, int id, const std::string& pflName);
513 MEDLOADER_EXPORT void loadProfileInFile(med_idt fid, int id);
514 MEDLOADER_EXPORT void loadGlobals(med_idt fid);
515 MEDLOADER_EXPORT void loadAllGlobals(med_idt fid, const MEDFileEntities *entities=0);
516 MEDLOADER_EXPORT void writeGlobals(med_idt fid, const MEDFileWritable& opt) const;
517 MEDLOADER_EXPORT std::vector<std::string> getPfls() const;
518 MEDLOADER_EXPORT std::vector<std::string> getLocs() const;
519 MEDLOADER_EXPORT bool existsPfl(const std::string& pflName) const;
520 MEDLOADER_EXPORT bool existsLoc(const std::string& locName) const;
521 MEDLOADER_EXPORT std::string createNewNameOfPfl() const;
522 MEDLOADER_EXPORT std::string createNewNameOfLoc() const;
523 MEDLOADER_EXPORT std::vector< std::vector<int> > whichAreEqualProfiles() const;
524 MEDLOADER_EXPORT std::vector< std::vector<int> > whichAreEqualLocs(double eps) const;
525 MEDLOADER_EXPORT void setFileName(const std::string& fileName);
526 MEDLOADER_EXPORT void changePflsNamesInStruct(const std::vector< std::pair<std::vector<std::string>, std::string > >& mapOfModif);
527 MEDLOADER_EXPORT void changeLocsNamesInStruct(const std::vector< std::pair<std::vector<std::string>, std::string > >& mapOfModif);
528 MEDLOADER_EXPORT void changePflsNames(const std::vector< std::pair<std::vector<std::string>, std::string > >& mapOfModif);
529 MEDLOADER_EXPORT void changeLocsNames(const std::vector< std::pair<std::vector<std::string>, std::string > >& mapOfModif);
530 MEDLOADER_EXPORT void changePflName(const std::string& oldName, const std::string& newName);
531 MEDLOADER_EXPORT void changeLocName(const std::string& oldName, const std::string& newName);
532 MEDLOADER_EXPORT std::vector< std::pair<std::vector<std::string>, std::string > > zipPflsNames();
533 MEDLOADER_EXPORT std::vector< std::pair<std::vector<std::string>, std::string > > zipLocsNames(double eps);
534 MEDLOADER_EXPORT int getNbOfGaussPtPerCell(int locId) const;
535 MEDLOADER_EXPORT int getLocalizationId(const std::string& loc) const;
536 MEDLOADER_EXPORT std::string getFileName() const;
537 MEDLOADER_EXPORT const MEDFileFieldLoc& getLocalizationFromId(int locId) const;
538 MEDLOADER_EXPORT const MEDFileFieldLoc& getLocalization(const std::string& locName) const;
539 MEDLOADER_EXPORT MEDFileFieldLoc& getLocalizationFromId(int locId);
540 MEDLOADER_EXPORT MEDFileFieldLoc& getLocalization(const std::string& locName);
541 MEDLOADER_EXPORT const DataArrayInt *getProfile(const std::string& pflName) const;
542 MEDLOADER_EXPORT const DataArrayInt *getProfileFromId(int pflId) const;
543 MEDLOADER_EXPORT DataArrayInt *getProfile(const std::string& pflName);
544 MEDLOADER_EXPORT DataArrayInt *getProfileFromId(int pflId);
545 MEDLOADER_EXPORT void killProfileIds(const std::vector<int>& pflIds);
546 MEDLOADER_EXPORT void killLocalizationIds(const std::vector<int>& locIds);
548 MEDLOADER_EXPORT void appendProfile(DataArrayInt *pfl);
549 MEDLOADER_EXPORT void appendLoc(const std::string& locName, INTERP_KERNEL::NormalizedCellType geoType, const std::vector<double>& refCoo, const std::vector<double>& gsCoo, const std::vector<double>& w);
551 MEDFileFieldGlobs *contentNotNull();
552 const MEDFileFieldGlobs *contentNotNull() const;
554 MCAuto< MEDFileFieldGlobs > _globals;
557 class MEDFileFieldNameScope
560 MEDLOADER_EXPORT MEDFileFieldNameScope();
561 MEDLOADER_EXPORT MEDFileFieldNameScope(const std::string& fieldName, const std::string& meshName);
562 MEDLOADER_EXPORT std::string getName() const;
563 MEDLOADER_EXPORT void setName(const std::string& fieldName);
564 MEDLOADER_EXPORT std::string getDtUnit() const;
565 MEDLOADER_EXPORT void setDtUnit(const std::string& dtUnit);
566 MEDLOADER_EXPORT void copyNameScope(const MEDFileFieldNameScope& other);
567 MEDLOADER_EXPORT std::string getMeshName() const;
568 MEDLOADER_EXPORT void setMeshName(const std::string& meshName);
571 std::string _dt_unit;
572 std::string _mesh_name;
578 * SDA is for Shared Data Arrays such as profiles.
580 class MEDFileAnyTypeField1TSWithoutSDA : public RefCountObject, public MEDFileFieldNameScope
583 MEDLOADER_EXPORT MEDFileAnyTypeField1TSWithoutSDA();
584 MEDLOADER_EXPORT MEDFileAnyTypeField1TSWithoutSDA(const std::string& fieldName, const std::string& meshName, int csit, int iteration, int order);
585 MEDLOADER_EXPORT int getIteration() const { return _iteration; }
586 MEDLOADER_EXPORT int getOrder() const { return _order; }
587 MEDLOADER_EXPORT double getTime(int& iteration, int& order) const { iteration=_iteration; order=_order; return _dt; }
588 MEDLOADER_EXPORT void setTime(int iteration, int order, double val) { _dt=val; _iteration=iteration; _order=order; }
589 MEDLOADER_EXPORT int getDimension() const;
590 MEDLOADER_EXPORT bool changeMeshNames(const std::vector< std::pair<std::string,std::string> >& modifTab);
591 MEDLOADER_EXPORT int getMeshIteration() const;
592 MEDLOADER_EXPORT int getMeshOrder() const;
593 MEDLOADER_EXPORT bool isDealingTS(int iteration, int order) const;
594 MEDLOADER_EXPORT std::pair<int,int> getDtIt() const;
595 MEDLOADER_EXPORT void fillIteration(std::pair<int,int>& p) const;
596 MEDLOADER_EXPORT void fillTypesOfFieldAvailable(std::vector<TypeOfField>& types) const;
597 MEDLOADER_EXPORT std::vector<TypeOfField> getTypesOfFieldAvailable() const;
599 MEDLOADER_EXPORT std::vector<std::string> getPflsReallyUsed2() const;
600 MEDLOADER_EXPORT std::vector<std::string> getLocsReallyUsed2() const;
601 MEDLOADER_EXPORT std::vector<std::string> getPflsReallyUsedMulti2() const;
602 MEDLOADER_EXPORT std::vector<std::string> getLocsReallyUsedMulti2() const;
603 MEDLOADER_EXPORT void changePflsRefsNamesGen2(const std::vector< std::pair<std::vector<std::string>, std::string > >& mapOfModif);
604 MEDLOADER_EXPORT void changeLocsRefsNamesGen2(const std::vector< std::pair<std::vector<std::string>, std::string > >& mapOfModif);
606 MEDLOADER_EXPORT int getNonEmptyLevels(const std::string& mname, std::vector<int>& levs) const;
607 MEDLOADER_EXPORT void convertMedBallIntoClassic();
608 MEDLOADER_EXPORT void makeReduction(INTERP_KERNEL::NormalizedCellType ct, TypeOfField tof, const DataArrayInt *pfl);
609 MEDLOADER_EXPORT std::vector< std::vector<std::pair<int,int> > > getFieldSplitedByType(const std::string& mname, std::vector<INTERP_KERNEL::NormalizedCellType>& types, std::vector< std::vector<TypeOfField> >& typesF, std::vector< std::vector<std::string> >& pfls, std::vector< std::vector<std::string> >& locs) const;
611 MEDLOADER_EXPORT MEDFileFieldPerMeshPerTypePerDisc *getLeafGivenMeshAndTypeAndLocId(const std::string& mName, INTERP_KERNEL::NormalizedCellType typ, int locId);
612 MEDLOADER_EXPORT const MEDFileFieldPerMeshPerTypePerDisc *getLeafGivenMeshAndTypeAndLocId(const std::string& mName, INTERP_KERNEL::NormalizedCellType typ, int locId) const;
613 MEDLOADER_EXPORT void deepCpyLeavesFrom(const MEDFileAnyTypeField1TSWithoutSDA& other);
614 MEDLOADER_EXPORT void accept(MEDFileFieldVisitor& visitor) const;
616 MEDLOADER_EXPORT int getNumberOfComponents() const;
617 MEDLOADER_EXPORT const std::vector<std::string>& getInfo() const;
618 MEDLOADER_EXPORT std::vector<std::string>& getInfo();
619 MEDLOADER_EXPORT bool presenceOfMultiDiscPerGeoType() const;
620 MEDLOADER_EXPORT bool presenceOfStructureElements() const;
621 MEDLOADER_EXPORT bool onlyStructureElements() const;
622 MEDLOADER_EXPORT void killStructureElements();
623 MEDLOADER_EXPORT void keepOnlyStructureElements();
624 MEDLOADER_EXPORT void keepOnlyOnSE(const std::string& seName);
625 MEDLOADER_EXPORT void getMeshSENames(std::vector< std::pair<std::string,std::string> >& ps) const;
626 MEDLOADER_EXPORT void setInfo(const std::vector<std::string>& infos);
627 MEDLOADER_EXPORT std::size_t getHeapMemorySizeWithoutChildren() const;
628 MEDLOADER_EXPORT std::vector<const BigMemoryObject *> getDirectChildrenWithNull() const;
629 MEDLOADER_EXPORT int copyTinyInfoFrom(const MEDCouplingFieldDouble *field, const DataArray *arr);
630 MEDLOADER_EXPORT void setFieldNoProfileSBT(const MEDCouplingFieldDouble *field, const DataArray *arr, MEDFileFieldGlobsReal& glob, const MEDFileFieldNameScope& nasc);
631 MEDLOADER_EXPORT void setFieldProfile(const MEDCouplingFieldDouble *field, const DataArray *arrOfVals, const MEDFileMesh *mesh, int meshDimRelToMax, const DataArrayInt *profile, MEDFileFieldGlobsReal& glob, const MEDFileFieldNameScope& nasc);
632 MEDLOADER_EXPORT virtual void simpleRepr(int bkOffset, std::ostream& oss, int f1tsId) const;
633 MEDLOADER_EXPORT virtual MEDFileAnyTypeField1TSWithoutSDA *deepCopy() const = 0;
634 MEDLOADER_EXPORT virtual MEDFileAnyTypeField1TSWithoutSDA *shallowCpy() const = 0;
635 MEDLOADER_EXPORT virtual std::vector< MCAuto<MEDFileAnyTypeField1TSWithoutSDA> > splitComponents() const;
636 MEDLOADER_EXPORT virtual const char *getTypeStr() const = 0;
637 MEDLOADER_EXPORT virtual DataArray *getUndergroundDataArray() const = 0;
638 MEDLOADER_EXPORT virtual DataArray *getUndergroundDataArrayExt(std::vector< std::pair<std::pair<INTERP_KERNEL::NormalizedCellType,int>,std::pair<int,int> > >& entries) const = 0;
639 MEDLOADER_EXPORT virtual void setArray(DataArray *arr) = 0;
640 MEDLOADER_EXPORT virtual DataArray *createNewEmptyDataArrayInstance() const = 0;
641 MEDLOADER_EXPORT virtual DataArray *getOrCreateAndGetArray() = 0;
642 MEDLOADER_EXPORT virtual const DataArray *getOrCreateAndGetArray() const = 0;
644 MEDLOADER_EXPORT MEDCouplingFieldDouble *fieldOnMesh(const MEDFileFieldGlobsReal *glob, const MEDFileMesh *mesh, MCAuto<DataArray>& arrOut, const MEDFileFieldNameScope& nasc) const;
645 MEDLOADER_EXPORT MEDCouplingFieldDouble *getFieldAtLevel(TypeOfField type, int meshDimRelToMax, const std::string& mName, int renumPol, const MEDFileFieldGlobsReal *glob, MCAuto<DataArray> &arrOut, const MEDFileFieldNameScope& nasc) const;
646 MEDLOADER_EXPORT MEDCouplingFieldDouble *getFieldOnMeshAtLevel(TypeOfField type, int meshDimRelToMax, int renumPol, const MEDFileFieldGlobsReal *glob, const MEDFileMesh *mesh, MCAuto<DataArray> &arrOut, const MEDFileFieldNameScope& nasc) const;
647 MEDLOADER_EXPORT MEDCouplingFieldDouble *getFieldAtTopLevel(TypeOfField type, const std::string& mName, int renumPol, const MEDFileFieldGlobsReal *glob, MCAuto<DataArray> &arrOut, const MEDFileFieldNameScope& nasc) const;
648 MEDLOADER_EXPORT MEDCouplingFieldDouble *getFieldOnMeshAtLevel(TypeOfField type, int renumPol, const MEDFileFieldGlobsReal *glob, const MEDCouplingMesh *mesh, const DataArrayInt *cellRenum, const DataArrayInt *nodeRenum, MCAuto<DataArray> &arrOut, const MEDFileFieldNameScope& nasc) const;
649 DataArray *getFieldWithProfile(TypeOfField type, int meshDimRelToMax, const MEDFileMesh *mesh, DataArrayInt *&pfl, const MEDFileFieldGlobsReal *glob, const MEDFileFieldNameScope& nasc) const;
651 MEDLOADER_EXPORT bool renumberEntitiesLyingOnMesh(const std::string& meshName, const std::vector<int>& oldCode, const std::vector<int>& newCode, const DataArrayInt *renumO2N, MEDFileFieldGlobsReal& glob);
652 MEDLOADER_EXPORT std::vector< MCAuto<MEDFileAnyTypeField1TSWithoutSDA> > splitDiscretizations() const;
653 MEDLOADER_EXPORT std::vector< MCAuto<MEDFileAnyTypeField1TSWithoutSDA> > splitMultiDiscrPerGeoTypes() const;
654 MEDLOADER_EXPORT int keepOnlySpatialDiscretization(TypeOfField tof, std::vector< std::pair<int,int> >& its);
655 MEDLOADER_EXPORT int keepOnlyGaussDiscretization(std::size_t idOfDisc, std::vector< std::pair<int,int> >& its);
657 MEDLOADER_EXPORT void allocNotFromFile(int newNbOfTuples);
658 MEDLOADER_EXPORT bool allocIfNecessaryTheArrayToReceiveDataFromFile();
659 MEDLOADER_EXPORT void loadOnlyStructureOfDataRecursively(med_idt fid, const MEDFileFieldNameScope& nasc, const MEDFileMeshes *ms, const MEDFileEntities *entities);
660 MEDLOADER_EXPORT void loadBigArraysRecursively(med_idt fid, const MEDFileFieldNameScope& nasc);
661 MEDLOADER_EXPORT void loadBigArraysRecursivelyIfNecessary(med_idt fid, const MEDFileFieldNameScope& nasc);
662 MEDLOADER_EXPORT void loadStructureAndBigArraysRecursively(med_idt fid, const MEDFileFieldNameScope& nasc, const MEDFileMeshes *ms, const MEDFileEntities *entities);
663 MEDLOADER_EXPORT void unloadArrays();
664 MEDLOADER_EXPORT void writeLL(med_idt fid, const MEDFileWritable& opts, const MEDFileFieldNameScope& nasc) const;
666 int getMeshIdFromMeshName(const std::string& mName) const;
667 int addNewEntryIfNecessary(const MEDCouplingMesh *mesh);
668 void updateData(int newLgth, const std::vector< std::pair<int,int> >& oldStartStops);
670 std::vector< MCAuto< MEDFileFieldPerMesh > > _field_per_mesh;
675 //! only useable on reading
677 // -3 means allocated and build from scratch
678 // -2 means allocated and read from a file
679 // -1 means not allocated and build from scratch
680 // >=0 means not allocated and read from a file
681 mutable int _nb_of_tuples_to_be_allocated;
684 class MEDFileIntField1TSWithoutSDA;
687 class MEDFileField1TSTemplateWithoutSDA : public MEDFileAnyTypeField1TSWithoutSDA
690 MEDFileField1TSTemplateWithoutSDA(const std::string& fieldName, const std::string& meshName, int csit, int iteration, int order):MEDFileAnyTypeField1TSWithoutSDA(fieldName,meshName,csit,iteration,order) { }
691 MEDFileField1TSTemplateWithoutSDA():MEDFileAnyTypeField1TSWithoutSDA() { }
693 MEDLOADER_EXPORT void setArray(DataArray *arr);
694 MEDLOADER_EXPORT DataArray *createNewEmptyDataArrayInstance() const;
695 MEDLOADER_EXPORT typename Traits<T>::ArrayType *getOrCreateAndGetArrayTemplate();
696 MEDLOADER_EXPORT typename Traits<T>::ArrayType const *getOrCreateAndGetArrayTemplate() const;
697 MEDLOADER_EXPORT typename Traits<T>::ArrayType *getUndergroundDataArrayTemplate() const;
698 MEDLOADER_EXPORT DataArray *getOrCreateAndGetArray();
699 MEDLOADER_EXPORT const DataArray *getOrCreateAndGetArray() const;
700 MEDLOADER_EXPORT DataArray *getUndergroundDataArray() const;
701 MEDLOADER_EXPORT void aggregate(const typename std::vector< typename MLFieldTraits<T>::F1TSWSDAType const * >& f1tss, const std::vector< std::vector< std::pair<int,int> > >& dts);
703 MCAuto< typename Traits<T>::ArrayType > _arr;
707 * SDA is for Shared Data Arrays such as profiles.
709 class MEDFileField1TSWithoutSDA : public MEDFileField1TSTemplateWithoutSDA<double>
712 MEDLOADER_EXPORT const char *getTypeStr() const;
713 MEDLOADER_EXPORT DataArray *getUndergroundDataArrayExt(std::vector< std::pair<std::pair<INTERP_KERNEL::NormalizedCellType,int>,std::pair<int,int> > >& entries) const;
714 MEDLOADER_EXPORT DataArrayDouble *getUndergroundDataArrayDoubleExt(std::vector< std::pair<std::pair<INTERP_KERNEL::NormalizedCellType,int>,std::pair<int,int> > >& entries) const;
715 MEDLOADER_EXPORT std::vector< std::vector<DataArrayDouble *> > getFieldSplitedByType2(const std::string& mname, std::vector<INTERP_KERNEL::NormalizedCellType>& types, std::vector< std::vector<TypeOfField> >& typesF, std::vector< std::vector<std::string> >& pfls, std::vector< std::vector<std::string> >& locs) const;
716 MEDLOADER_EXPORT static void CheckMeshDimRel(int meshDimRelToMax);
717 MEDLOADER_EXPORT static std::vector<int> CheckSBTMesh(const MEDCouplingMesh *mesh);
718 MEDLOADER_EXPORT static MEDFileField1TSWithoutSDA *New(const std::string& fieldName, const std::string& meshName, int csit, int iteration, int order, const std::vector<std::string>& infos);
720 MEDLOADER_EXPORT MEDFileField1TSWithoutSDA();
721 MEDLOADER_EXPORT MEDFileField1TSWithoutSDA(const std::string& fieldName, const std::string& meshName, int csit, int iteration, int order, const std::vector<std::string>& infos);
722 MEDLOADER_EXPORT MEDFileField1TSWithoutSDA *shallowCpy() const;
723 MEDLOADER_EXPORT MEDFileField1TSWithoutSDA *deepCopy() const;
724 MEDLOADER_EXPORT MEDFileIntField1TSWithoutSDA *convertToInt() const;
726 static const char TYPE_STR[];
730 * SDA is for Shared Data Arrays such as profiles.
732 class MEDFileIntField1TSWithoutSDA : public MEDFileField1TSTemplateWithoutSDA<int>
735 MEDLOADER_EXPORT MEDFileIntField1TSWithoutSDA();
736 MEDLOADER_EXPORT static MEDFileIntField1TSWithoutSDA *New(const std::string& fieldName, const std::string& meshName, int csit, int iteration, int order, const std::vector<std::string>& infos);
737 MEDLOADER_EXPORT MEDFileIntField1TSWithoutSDA *deepCopy() const;
738 MEDLOADER_EXPORT MEDFileIntField1TSWithoutSDA *shallowCpy() const;
739 MEDLOADER_EXPORT const char *getTypeStr() const;
740 MEDLOADER_EXPORT DataArray *getUndergroundDataArrayExt(std::vector< std::pair<std::pair<INTERP_KERNEL::NormalizedCellType,int>,std::pair<int,int> > >& entries) const;
741 MEDLOADER_EXPORT DataArrayInt *getUndergroundDataArrayIntExt(std::vector< std::pair<std::pair<INTERP_KERNEL::NormalizedCellType,int>,std::pair<int,int> > >& entries) const;
742 MEDLOADER_EXPORT MEDFileField1TSWithoutSDA *convertToDouble() const;
744 MEDFileIntField1TSWithoutSDA(const std::string& fieldName, const std::string& meshName, int csit, int iteration, int order, const std::vector<std::string>& infos);
746 MEDLOADER_EXPORT static const char TYPE_STR[];
750 * SDA is for Shared Data Arrays such as profiles.
752 class MEDFileFloatField1TSWithoutSDA : public MEDFileField1TSTemplateWithoutSDA<float>
755 MEDLOADER_EXPORT MEDFileFloatField1TSWithoutSDA();
756 MEDLOADER_EXPORT static MEDFileFloatField1TSWithoutSDA *New(const std::string& fieldName, const std::string& meshName, int csit, int iteration, int order, const std::vector<std::string>& infos);
757 MEDLOADER_EXPORT MEDFileFloatField1TSWithoutSDA *deepCopy() const;
758 MEDLOADER_EXPORT MEDFileFloatField1TSWithoutSDA *shallowCpy() const;
759 MEDLOADER_EXPORT const char *getTypeStr() const;
760 MEDLOADER_EXPORT DataArray *getUndergroundDataArrayExt(std::vector< std::pair<std::pair<INTERP_KERNEL::NormalizedCellType,int>,std::pair<int,int> > >& entries) const;
761 MEDLOADER_EXPORT DataArrayFloat *getUndergroundDataArrayFloatExt(std::vector< std::pair<std::pair<INTERP_KERNEL::NormalizedCellType,int>,std::pair<int,int> > >& entries) const;
762 MEDLOADER_EXPORT MEDFileField1TSWithoutSDA *convertToDouble() const;
764 MEDFileFloatField1TSWithoutSDA(const std::string& fieldName, const std::string& meshName, int csit, int iteration, int order, const std::vector<std::string>& infos);
766 MEDLOADER_EXPORT static const char TYPE_STR[];
772 class MEDFileAnyTypeField1TS : public RefCountObject, public MEDFileWritableStandAlone, public MEDFileFieldGlobsReal
775 MEDLOADER_EXPORT MEDFileAnyTypeField1TS();
776 MEDLOADER_EXPORT MEDFileAnyTypeField1TS(med_idt fid, bool loadAll, const MEDFileMeshes *ms, const MEDFileEntities *entities=0);
777 MEDLOADER_EXPORT MEDFileAnyTypeField1TS(med_idt fid, const std::string& fieldName, bool loadAll, const MEDFileMeshes *ms, const MEDFileEntities *entities=0);
778 MEDLOADER_EXPORT MEDFileAnyTypeField1TS(med_idt fid, const std::string& fieldName, int iteration, int order, bool loadAll, const MEDFileMeshes *ms, const MEDFileEntities *entities=0);
779 MEDLOADER_EXPORT MEDFileAnyTypeField1TS(const MEDFileAnyTypeField1TSWithoutSDA& other, bool shallowCopyOfContent);
780 MEDLOADER_EXPORT static MEDFileAnyTypeField1TS *BuildNewInstanceFromContent(MEDFileAnyTypeField1TSWithoutSDA *c);
781 MEDLOADER_EXPORT static MEDFileAnyTypeField1TS *BuildNewInstanceFromContent(MEDFileAnyTypeField1TSWithoutSDA *c, med_idt fid);
782 MEDLOADER_EXPORT static MEDFileAnyTypeField1TSWithoutSDA *BuildContentFrom(med_idt fid, bool loadAll, const MEDFileMeshes *ms, const MEDFileEntities *entities);
783 MEDLOADER_EXPORT static MEDFileAnyTypeField1TSWithoutSDA *BuildContentFrom(med_idt fid, const std::string& fieldName, bool loadAll, const MEDFileMeshes *ms, const MEDFileEntities *entities);
784 MEDLOADER_EXPORT static MEDFileAnyTypeField1TSWithoutSDA *BuildContentFrom(med_idt fid, const std::string& fieldName, int iteration, int order, bool loadAll, const MEDFileMeshes *ms, const MEDFileEntities *entities);
785 MEDLOADER_EXPORT void writeLL(med_idt fid) const;
786 // direct forwarding to MEDFileAnyTypeField1TSWithoutSDA instance _content
788 MEDLOADER_EXPORT static MEDFileAnyTypeField1TS *New(const std::string& fileName, bool loadAll=true);
789 MEDLOADER_EXPORT static MEDFileAnyTypeField1TS *New(med_idt fid, bool loadAll=true);
790 MEDLOADER_EXPORT static MEDFileAnyTypeField1TS *New(const std::string& fileName, const std::string& fieldName, bool loadAll=true);
791 MEDLOADER_EXPORT static MEDFileAnyTypeField1TS *New(med_idt fid, const std::string& fieldName, bool loadAll=true);
792 MEDLOADER_EXPORT static MEDFileAnyTypeField1TS *New(const std::string& fileName, const std::string& fieldName, int iteration, int order, bool loadAll=true);
793 MEDLOADER_EXPORT static MEDFileAnyTypeField1TS *New(med_idt fid, const std::string& fieldName, int iteration, int order, bool loadAll=true);
794 MEDLOADER_EXPORT static MEDFileAnyTypeField1TS *NewAdv(const std::string& fileName, const std::string& fieldName, int iteration, int order, bool loadAll, const MEDFileEntities *entities);
795 MEDLOADER_EXPORT static MEDFileAnyTypeField1TS *NewAdv(med_idt fid, const std::string& fieldName, int iteration, int order, bool loadAll, const MEDFileEntities *entities);
796 MEDLOADER_EXPORT int getDimension() const;
797 MEDLOADER_EXPORT int getIteration() const;
798 MEDLOADER_EXPORT int getOrder() const;
799 MEDLOADER_EXPORT double getTime(int& iteration, int& order) const;
800 MEDLOADER_EXPORT void setTime(int iteration, int order, double val);
801 MEDLOADER_EXPORT std::string getName() const;
802 MEDLOADER_EXPORT void setName(const std::string& name);
803 MEDLOADER_EXPORT std::string simpleRepr() const;
804 MEDLOADER_EXPORT void simpleRepr(int bkOffset, std::ostream& oss, int f1tsId) const;
805 MEDLOADER_EXPORT std::string getDtUnit() const;
806 MEDLOADER_EXPORT void setDtUnit(const std::string& dtUnit);
807 MEDLOADER_EXPORT std::string getMeshName() const;
808 MEDLOADER_EXPORT void setMeshName(const std::string& newMeshName);
809 MEDLOADER_EXPORT bool changeMeshNames(const std::vector< std::pair<std::string,std::string> >& modifTab);
810 MEDLOADER_EXPORT int getMeshIteration() const;
811 MEDLOADER_EXPORT int getMeshOrder() const;
812 MEDLOADER_EXPORT int getNumberOfComponents() const;
813 MEDLOADER_EXPORT bool isDealingTS(int iteration, int order) const;
814 MEDLOADER_EXPORT std::pair<int,int> getDtIt() const;
815 MEDLOADER_EXPORT void fillIteration(std::pair<int,int>& p) const;
816 MEDLOADER_EXPORT void fillTypesOfFieldAvailable(std::vector<TypeOfField>& types) const;
817 MEDLOADER_EXPORT void setInfo(const std::vector<std::string>& infos);
818 MEDLOADER_EXPORT const std::vector<std::string>& getInfo() const;
819 MEDLOADER_EXPORT std::vector<std::string>& getInfo();
820 MEDLOADER_EXPORT bool presenceOfMultiDiscPerGeoType() const;
821 MEDLOADER_EXPORT std::vector<TypeOfField> getTypesOfFieldAvailable() const;
822 MEDLOADER_EXPORT std::vector< std::vector<std::pair<int,int> > > getFieldSplitedByType(const std::string& mname, std::vector<INTERP_KERNEL::NormalizedCellType>& types, std::vector< std::vector<TypeOfField> >& typesF,
823 std::vector< std::vector<std::string> >& pfls, std::vector< std::vector<std::string> >& locs) const;
824 MEDLOADER_EXPORT MEDFileFieldPerMeshPerTypePerDisc *getLeafGivenMeshAndTypeAndLocId(const std::string& mName, INTERP_KERNEL::NormalizedCellType typ, int locId);
825 MEDLOADER_EXPORT const MEDFileFieldPerMeshPerTypePerDisc *getLeafGivenMeshAndTypeAndLocId(const std::string& mName, INTERP_KERNEL::NormalizedCellType typ, int locId) const;
826 MEDLOADER_EXPORT int getNonEmptyLevels(const std::string& mname, std::vector<int>& levs) const;
827 MEDLOADER_EXPORT void convertMedBallIntoClassic();
828 MEDLOADER_EXPORT void makeReduction(INTERP_KERNEL::NormalizedCellType ct, TypeOfField tof, const DataArrayInt *pfl);
830 MEDLOADER_EXPORT void loadArrays();
831 MEDLOADER_EXPORT void loadArraysIfNecessary();
832 MEDLOADER_EXPORT void unloadArrays();
833 MEDLOADER_EXPORT void unloadArraysWithoutDataLoss();
834 MEDLOADER_EXPORT std::vector< MCAuto< MEDFileAnyTypeField1TS > > splitComponents() const;
835 MEDLOADER_EXPORT std::vector< MCAuto< MEDFileAnyTypeField1TS > > splitDiscretizations() const;
836 MEDLOADER_EXPORT std::vector< MCAuto< MEDFileAnyTypeField1TS > > splitMultiDiscrPerGeoTypes() const;
837 MEDLOADER_EXPORT MEDFileAnyTypeField1TS *deepCopy() const;
838 MEDLOADER_EXPORT int copyTinyInfoFrom(const MEDCouplingFieldDouble *field, const DataArray *arr);
839 MEDLOADER_EXPORT virtual MEDFileAnyTypeField1TS *shallowCpy() const = 0;
841 //! underground method see MEDFileField1TSWithoutSDA::setProfileNameOnLeaf
842 MEDLOADER_EXPORT void setProfileNameOnLeaf(const std::string& mName, INTERP_KERNEL::NormalizedCellType typ, int locId, const std::string& newPflName, bool forceRenameOnGlob=false);
843 //! underground method see MEDFileField1TSWithoutSDA::setLocNameOnLeaf
844 MEDLOADER_EXPORT void setLocNameOnLeaf(const std::string& mName, INTERP_KERNEL::NormalizedCellType typ, int locId, const std::string& newLocName, bool forceRenameOnGlob=false);
845 MEDLOADER_EXPORT std::size_t getHeapMemorySizeWithoutChildren() const;
846 MEDLOADER_EXPORT std::vector<const BigMemoryObject *> getDirectChildrenWithNull() const;
847 MEDLOADER_EXPORT std::vector<std::string> getPflsReallyUsed() const;
848 MEDLOADER_EXPORT std::vector<std::string> getLocsReallyUsed() const;
849 MEDLOADER_EXPORT std::vector<std::string> getPflsReallyUsedMulti() const;
850 MEDLOADER_EXPORT std::vector<std::string> getLocsReallyUsedMulti() const;
851 MEDLOADER_EXPORT void changePflsRefsNamesGen(const std::vector< std::pair<std::vector<std::string>, std::string > >& mapOfModif);
852 MEDLOADER_EXPORT void changeLocsRefsNamesGen(const std::vector< std::pair<std::vector<std::string>, std::string > >& mapOfModif);
854 MEDLOADER_EXPORT static int LocateField2(med_idt fid, int fieldIdCFormat, bool checkFieldId, std::string& fieldName, med_field_type& typcha, std::vector<std::string>& infos, std::string& dtunitOut, std::string& meshName);
855 MEDLOADER_EXPORT static int LocateField(med_idt fid, const std::string& fieldName, int& posCFormat, med_field_type& typcha, std::vector<std::string>& infos, std::string& dtunitOut, std::string& meshName);
857 MEDLOADER_EXPORT virtual MEDFileAnyTypeField1TS *extractPart(const std::map<int, MCAuto<DataArrayInt> >& extractDef, MEDFileMesh *mm) const = 0;
859 MEDLOADER_EXPORT virtual med_field_type getMEDFileFieldType() const = 0;
860 MEDLOADER_EXPORT MEDFileAnyTypeField1TSWithoutSDA *contentNotNullBase();
861 MEDLOADER_EXPORT const MEDFileAnyTypeField1TSWithoutSDA *contentNotNullBase() const;
863 MCAuto<MEDFileAnyTypeField1TSWithoutSDA> _content;
866 class MEDFileIntField1TS;
869 class MEDFileTemplateField1TS : public MEDFileAnyTypeField1TS
872 MEDLOADER_EXPORT static typename MLFieldTraits<T>::F1TSType *New();
873 MEDLOADER_EXPORT static typename MLFieldTraits<T>::F1TSType *New(const std::string& fileName, bool loadAll=true);
874 MEDLOADER_EXPORT static typename MLFieldTraits<T>::F1TSType *New(med_idt fid, bool loadAll=true);
875 MEDLOADER_EXPORT static typename MLFieldTraits<T>::F1TSType *New(DataArrayByte *db) { return BuildFromMemoryChunk<typename MLFieldTraits<T>::F1TSType>(db); }
876 MEDLOADER_EXPORT static typename MLFieldTraits<T>::F1TSType *New(const std::string& fileName, const std::string& fieldName, bool loadAll=true);
877 MEDLOADER_EXPORT static typename MLFieldTraits<T>::F1TSType *New(med_idt fid, const std::string& fieldName, bool loadAll=true);
878 MEDLOADER_EXPORT static typename MLFieldTraits<T>::F1TSType *New(const std::string& fileName, const std::string& fieldName, int iteration, int order, bool loadAll=true);
879 MEDLOADER_EXPORT static typename MLFieldTraits<T>::F1TSType *New(med_idt fid, const std::string& fieldName, int iteration, int order, bool loadAll=true);
880 MEDLOADER_EXPORT static typename MLFieldTraits<T>::F1TSType *New(const typename MLFieldTraits<T>::F1TSWSDAType& other, bool shallowCopyOfContent);
882 ~MEDFileTemplateField1TS() { }
883 MEDFileTemplateField1TS();
884 MEDFileTemplateField1TS(med_idt fid, bool loadAll, const MEDFileMeshes *ms):MEDFileAnyTypeField1TS(fid,loadAll,ms) { }
885 MEDFileTemplateField1TS(med_idt fid, const std::string& fieldName, bool loadAll, const MEDFileMeshes *ms):MEDFileAnyTypeField1TS(fid,fieldName,loadAll,ms) { }
886 MEDFileTemplateField1TS(med_idt fid, const std::string& fieldName, int iteration, int order, bool loadAll, const MEDFileMeshes *ms):MEDFileAnyTypeField1TS(fid,fieldName,iteration,order,loadAll,ms) { }
887 MEDFileTemplateField1TS(const typename MLFieldTraits<T>::F1TSWSDAType& other, bool shallowCopyOfContent):MEDFileAnyTypeField1TS(other,shallowCopyOfContent) { }
888 const typename MLFieldTraits<T>::F1TSWSDAType *contentNotNull() const;
889 typename MLFieldTraits<T>::F1TSWSDAType *contentNotNull();
895 class MEDFileField1TS : public MEDFileTemplateField1TS<double>
897 friend class MEDFileTemplateField1TS<double>;
899 MEDLOADER_EXPORT MEDFileIntField1TS *convertToInt(bool isDeepCpyGlobs=true) const;
901 MEDLOADER_EXPORT MEDCouplingFieldDouble *field(const MEDFileMesh *mesh) const;
902 MEDLOADER_EXPORT MEDCouplingFieldDouble *getFieldAtLevel(TypeOfField type, int meshDimRelToMax, int renumPol=0) const;
903 MEDLOADER_EXPORT MEDCouplingFieldDouble *getFieldAtTopLevel(TypeOfField type, int renumPol=0) const;
904 MEDLOADER_EXPORT MEDCouplingFieldDouble *getFieldOnMeshAtLevel(TypeOfField type, int meshDimRelToMax, const MEDFileMesh *mesh, int renumPol=0) const;
905 MEDLOADER_EXPORT MEDCouplingFieldDouble *getFieldOnMeshAtLevel(TypeOfField type, const MEDCouplingMesh *mesh, int renumPol=0) const;
906 MEDLOADER_EXPORT MEDCouplingFieldDouble *getFieldAtLevelOld(TypeOfField type, const std::string& mname, int meshDimRelToMax, int renumPol=0) const;
907 MEDLOADER_EXPORT DataArrayDouble *getFieldWithProfile(TypeOfField type, int meshDimRelToMax, const MEDFileMesh *mesh, DataArrayInt *&pfl) const;
909 MEDLOADER_EXPORT void setFieldNoProfileSBT(const MEDCouplingFieldDouble *field);
910 MEDLOADER_EXPORT void setFieldProfile(const MEDCouplingFieldDouble *field, const MEDFileMesh *mesh, int meshDimRelToMax, const DataArrayInt *profile);
911 // direct forwarding to MEDFileField1TSWithoutSDA instance _content
913 MEDLOADER_EXPORT MEDFileField1TS *shallowCpy() const;
914 MEDLOADER_EXPORT DataArrayDouble *getUndergroundDataArray() const;
915 MEDLOADER_EXPORT DataArrayDouble *getUndergroundDataArrayExt(std::vector< std::pair<std::pair<INTERP_KERNEL::NormalizedCellType,int>,std::pair<int,int> > >& entries) const;
917 MEDLOADER_EXPORT std::vector< std::vector<DataArrayDouble *> > getFieldSplitedByType2(const std::string& mname, std::vector<INTERP_KERNEL::NormalizedCellType>& types, std::vector< std::vector<TypeOfField> >& typesF,
918 std::vector< std::vector<std::string> >& pfls, std::vector< std::vector<std::string> >& locs) const;
920 MEDLOADER_EXPORT static void SetDataArrayDoubleInField(MEDCouplingFieldDouble *f, MCAuto<DataArray>& arr);
921 MEDLOADER_EXPORT static DataArrayDouble *ReturnSafelyDataArrayDouble(MCAuto<DataArray>& arr);
923 MEDLOADER_EXPORT MEDFileField1TS *extractPart(const std::map<int, MCAuto<DataArrayInt> >& extractDef, MEDFileMesh *mm) const;
925 med_field_type getMEDFileFieldType() const { return MED_FLOAT64; }
927 ~MEDFileField1TS() { }
928 MEDFileField1TS(med_idt fid, bool loadAll, const MEDFileMeshes *ms);
929 MEDFileField1TS(med_idt fid, const std::string& fieldName, bool loadAll, const MEDFileMeshes *ms);
930 MEDFileField1TS(med_idt fid, const std::string& fieldName, int iteration, int order, bool loadAll, const MEDFileMeshes *ms);
931 MEDFileField1TS(const MEDFileField1TSWithoutSDA& other, bool shallowCopyOfContent);
932 MEDFileField1TS() { }
935 class MEDFileIntField1TS : public MEDFileTemplateField1TS<int>
937 friend class MEDFileTemplateField1TS<int>;
939 MEDLOADER_EXPORT MEDFileField1TS *convertToDouble(bool isDeepCpyGlobs=true) const;
940 MEDLOADER_EXPORT MEDFileIntField1TS *shallowCpy() const;
942 MEDLOADER_EXPORT MEDCouplingFieldInt *field(const MEDFileMesh *mesh) const;
943 MEDLOADER_EXPORT MEDCouplingFieldInt *getFieldAtLevel(TypeOfField type, int meshDimRelToMax, int renumPol=0) const;
944 MEDLOADER_EXPORT MEDCouplingFieldInt *getFieldAtTopLevel(TypeOfField type, int renumPol=0) const;
945 MEDLOADER_EXPORT MEDCouplingFieldInt *getFieldOnMeshAtLevel(TypeOfField type, int meshDimRelToMax, const MEDFileMesh *mesh, int renumPol=0) const;
946 MEDLOADER_EXPORT MEDCouplingFieldInt *getFieldOnMeshAtLevel(TypeOfField type, const MEDCouplingMesh *mesh, int renumPol=0) const;
947 MEDLOADER_EXPORT MEDCouplingFieldInt *getFieldAtLevelOld(TypeOfField type, const std::string& mname, int meshDimRelToMax, int renumPol=0) const;
948 MEDLOADER_EXPORT DataArrayInt *getFieldWithProfile(TypeOfField type, int meshDimRelToMax, const MEDFileMesh *mesh, DataArrayInt *&pfl) const;
950 MEDLOADER_EXPORT void setFieldNoProfileSBT(const MEDCouplingFieldInt *field);
951 MEDLOADER_EXPORT void setFieldProfile(const MEDCouplingFieldInt *field, const MEDFileMesh *mesh, int meshDimRelToMax, const DataArrayInt *profile);
952 MEDLOADER_EXPORT DataArrayInt *getUndergroundDataArray() const;
954 MEDLOADER_EXPORT static DataArrayInt *ReturnSafelyDataArrayInt(MCAuto<DataArray>& arr);
955 MEDLOADER_EXPORT static MCAuto<MEDCouplingFieldInt> SetDataArrayDoubleInIntField(MEDCouplingFieldDouble *f, MCAuto<DataArray>& arr);
956 MEDLOADER_EXPORT static MCAuto<MEDCouplingFieldDouble> ConvertFieldIntToFieldDouble(const MEDCouplingFieldInt *f);
958 MEDLOADER_EXPORT MEDFileIntField1TS *extractPart(const std::map<int, MCAuto<DataArrayInt> >& extractDef, MEDFileMesh *mm) const;
960 med_field_type getMEDFileFieldType() const { return MED_INT32; }
962 ~MEDFileIntField1TS() { }
963 MEDFileIntField1TS() { }
964 MEDFileIntField1TS(med_idt fid, bool loadAll, const MEDFileMeshes *ms);
965 MEDFileIntField1TS(med_idt fid, const std::string& fieldName, bool loadAll, const MEDFileMeshes *ms);
966 MEDFileIntField1TS(med_idt fid, const std::string& fieldName, int iteration, int order, bool loadAll, const MEDFileMeshes *ms);
967 MEDFileIntField1TS(const MEDFileIntField1TSWithoutSDA& other, bool shallowCopyOfContent);
970 class MEDFileAnyTypeFieldMultiTSWithoutSDA : public RefCountObject, public MEDFileFieldNameScope
973 MEDFileAnyTypeFieldMultiTSWithoutSDA();
974 MEDFileAnyTypeFieldMultiTSWithoutSDA(const std::string& fieldName, const std::string& meshName);
975 MEDFileAnyTypeFieldMultiTSWithoutSDA(med_idt fid, int fieldId, bool loadAll, const MEDFileMeshes *ms, const MEDFileEntities *entities);
976 MEDFileAnyTypeFieldMultiTSWithoutSDA(med_idt fid, const std::string& fieldName, const std::string& meshName, med_field_type fieldTyp, const std::vector<std::string>& infos, int nbOfStep, const std::string& dtunit, bool loadAll, const MEDFileMeshes *ms, const MEDFileEntities *entities);
978 MEDLOADER_EXPORT std::size_t getHeapMemorySizeWithoutChildren() const;
979 MEDLOADER_EXPORT std::vector<const BigMemoryObject *> getDirectChildrenWithNull() const;
980 MEDLOADER_EXPORT virtual MEDFileAnyTypeFieldMultiTSWithoutSDA *deepCopy() const;
981 MEDLOADER_EXPORT virtual std::vector< MCAuto<MEDFileAnyTypeFieldMultiTSWithoutSDA> > splitComponents() const;
982 MEDLOADER_EXPORT virtual std::vector< MCAuto<MEDFileAnyTypeFieldMultiTSWithoutSDA> > splitDiscretizations() const;
983 MEDLOADER_EXPORT virtual std::vector< MCAuto<MEDFileAnyTypeFieldMultiTSWithoutSDA> > splitMultiDiscrPerGeoTypes() const;
984 MEDLOADER_EXPORT virtual const char *getTypeStr() const = 0;
985 MEDLOADER_EXPORT virtual MEDFileAnyTypeFieldMultiTSWithoutSDA *shallowCpy() const = 0;
986 MEDLOADER_EXPORT virtual MEDFileAnyTypeFieldMultiTSWithoutSDA *createNew() const = 0;
987 MEDLOADER_EXPORT virtual MEDFileAnyTypeField1TSWithoutSDA *createNew1TSWithoutSDAEmptyInstance() const = 0;
988 MEDLOADER_EXPORT virtual void checkCoherencyOfType(const MEDFileAnyTypeField1TSWithoutSDA *f1ts) const = 0;
989 MEDLOADER_EXPORT const std::vector<std::string>& getInfo() const;
990 MEDLOADER_EXPORT bool presenceOfMultiDiscPerGeoType() const;
991 MEDLOADER_EXPORT void setInfo(const std::vector<std::string>& info);
992 MEDLOADER_EXPORT int getTimeStepPos(int iteration, int order) const;
993 MEDLOADER_EXPORT const MEDFileAnyTypeField1TSWithoutSDA& getTimeStepEntry(int iteration, int order) const;
994 MEDLOADER_EXPORT MEDFileAnyTypeField1TSWithoutSDA& getTimeStepEntry(int iteration, int order);
995 MEDLOADER_EXPORT bool changeMeshNames(const std::vector< std::pair<std::string,std::string> >& modifTab);
996 MEDLOADER_EXPORT int getNumberOfTS() const;
997 MEDLOADER_EXPORT void eraseEmptyTS();
998 MEDLOADER_EXPORT void eraseTimeStepIds(const int *startIds, const int *endIds);
999 MEDLOADER_EXPORT void eraseTimeStepIds2(int bg, int end, int step);
1000 MEDLOADER_EXPORT MEDFileAnyTypeFieldMultiTSWithoutSDA *buildFromTimeStepIds(const int *startIds, const int *endIds) const;
1001 MEDLOADER_EXPORT MEDFileAnyTypeFieldMultiTSWithoutSDA *buildFromTimeStepIds2(int bg, int end, int step) const;
1002 MEDLOADER_EXPORT MEDFileAnyTypeFieldMultiTSWithoutSDA *partOfThisLyingOnSpecifiedTimeSteps(const std::vector< std::pair<int,int> >& timeSteps) const;
1003 MEDLOADER_EXPORT MEDFileAnyTypeFieldMultiTSWithoutSDA *partOfThisNotLyingOnSpecifiedTimeSteps(const std::vector< std::pair<int,int> >& timeSteps) const;
1004 MEDLOADER_EXPORT bool presenceOfStructureElements() const;
1005 MEDLOADER_EXPORT bool onlyStructureElements() const;
1006 MEDLOADER_EXPORT void killStructureElements();
1007 MEDLOADER_EXPORT void keepOnlyStructureElements();
1008 MEDLOADER_EXPORT void keepOnlyOnSE(const std::string& seName);
1009 MEDLOADER_EXPORT void getMeshSENames(std::vector< std::pair<std::string,std::string> >& ps) const;
1010 MEDLOADER_EXPORT int getPosOfTimeStep(int iteration, int order) const;
1011 MEDLOADER_EXPORT int getPosGivenTime(double time, double eps=1e-8) const;
1012 MEDLOADER_EXPORT std::vector< std::pair<int,int> > getIterations() const;
1013 MEDLOADER_EXPORT std::vector< std::pair<int,int> > getTimeSteps(std::vector<double>& ret1) const;
1014 MEDLOADER_EXPORT void pushBackTimeStep(MCAuto<MEDFileAnyTypeField1TSWithoutSDA>& tse);
1015 MEDLOADER_EXPORT void synchronizeNameScope();
1016 MEDLOADER_EXPORT void simpleRepr(int bkOffset, std::ostream& oss, int fmtsId) const;
1017 MEDLOADER_EXPORT int getNonEmptyLevels(int iteration, int order, const std::string& mname, std::vector<int>& levs) const;
1018 MEDLOADER_EXPORT void appendFieldNoProfileSBT(const MEDCouplingFieldDouble *field, const DataArray *arr, MEDFileFieldGlobsReal& glob);
1019 MEDLOADER_EXPORT void appendFieldProfile(const MEDCouplingFieldDouble *field, const DataArray *arr, const MEDFileMesh *mesh, int meshDimRelToMax, const DataArrayInt *profile, MEDFileFieldGlobsReal& glob);
1020 MEDLOADER_EXPORT std::vector< std::vector< std::pair<int,int> > > getFieldSplitedByType(int iteration, int order, const std::string& mname, std::vector<INTERP_KERNEL::NormalizedCellType>& types, std::vector< std::vector<TypeOfField> >& typesF, std::vector< std::vector<std::string> >& pfls, std::vector< std::vector<std::string> >& locs) const;
1021 MEDLOADER_EXPORT std::vector< std::vector<TypeOfField> > getTypesOfFieldAvailable() const;
1022 MEDLOADER_EXPORT DataArray *getUndergroundDataArray(int iteration, int order) const;
1023 MEDLOADER_EXPORT DataArray *getUndergroundDataArrayExt(int iteration, int order, std::vector< std::pair<std::pair<INTERP_KERNEL::NormalizedCellType,int>,std::pair<int,int> > >& entries) const;
1024 MEDLOADER_EXPORT bool renumberEntitiesLyingOnMesh(const std::string& meshName, const std::vector<int>& oldCode, const std::vector<int>& newCode, const DataArrayInt *renumO2N, MEDFileFieldGlobsReal& glob);
1025 MEDLOADER_EXPORT void accept(MEDFileFieldVisitor& visitor) const;
1026 MEDLOADER_EXPORT void loadStructureOrStructureAndBigArraysRecursively(med_idt fid, int nbPdt, med_field_type fieldTyp, bool loadAll, const MEDFileMeshes *ms, const MEDFileEntities *entities);
1027 MEDLOADER_EXPORT void writeLL(med_idt fid, const MEDFileWritable& opts) const;
1028 MEDLOADER_EXPORT void loadBigArraysRecursively(med_idt fid, const MEDFileFieldNameScope& nasc);
1029 MEDLOADER_EXPORT void loadBigArraysRecursivelyIfNecessary(med_idt fid, const MEDFileFieldNameScope& nasc);
1030 MEDLOADER_EXPORT void unloadArrays();
1032 MEDLOADER_EXPORT const MEDFileAnyTypeField1TSWithoutSDA *getTimeStepAtPos2(int pos) const;
1033 MEDLOADER_EXPORT MEDFileAnyTypeField1TSWithoutSDA *getTimeStepAtPos2(int pos);
1034 MEDLOADER_EXPORT std::vector<std::string> getPflsReallyUsed2() const;
1035 MEDLOADER_EXPORT std::vector<std::string> getLocsReallyUsed2() const;
1036 MEDLOADER_EXPORT std::vector<std::string> getPflsReallyUsedMulti2() const;
1037 MEDLOADER_EXPORT std::vector<std::string> getLocsReallyUsedMulti2() const;
1038 MEDLOADER_EXPORT void changePflsRefsNamesGen2(const std::vector< std::pair<std::vector<std::string>, std::string > >& mapOfModif);
1039 MEDLOADER_EXPORT void changeLocsRefsNamesGen2(const std::vector< std::pair<std::vector<std::string>, std::string > >& mapOfModif);
1040 MEDLOADER_EXPORT void setIteration(int i, MCAuto<MEDFileAnyTypeField1TSWithoutSDA> ts);
1042 virtual med_field_type getMEDFileFieldType() const = 0;
1043 void copyTinyInfoFrom(const MEDCouplingFieldDouble *field, const DataArray *arr);
1044 void checkCoherencyOfTinyInfo(const MEDCouplingFieldDouble *field, const DataArray *arr) const;
1045 void checkThatComponentsMatch(const std::vector<std::string>& compos) const;
1046 void checkThatNbOfCompoOfTSMatchThis() const;
1048 std::vector<std::string> _infos;
1049 std::vector< MCAuto<MEDFileAnyTypeField1TSWithoutSDA> > _time_steps;
1052 class MEDFileIntFieldMultiTSWithoutSDA;
1054 class MEDFileFieldMultiTSWithoutSDA : public MEDFileAnyTypeFieldMultiTSWithoutSDA
1057 MEDLOADER_EXPORT static MEDFileFieldMultiTSWithoutSDA *New(med_idt fid, const std::string& fieldName, const std::string& meshName, med_field_type fieldTyp, const std::vector<std::string>& infos, int nbOfStep, const std::string& dtunit, bool loadAll, const MEDFileMeshes *ms, const MEDFileEntities *entities);
1058 MEDLOADER_EXPORT MEDFileFieldMultiTSWithoutSDA(med_idt fid, int fieldId, bool loadAll, const MEDFileMeshes *ms, const MEDFileEntities *entities);
1059 MEDLOADER_EXPORT const char *getTypeStr() const;
1060 MEDLOADER_EXPORT MEDFileAnyTypeFieldMultiTSWithoutSDA *shallowCpy() const;
1061 MEDLOADER_EXPORT MEDFileAnyTypeFieldMultiTSWithoutSDA *createNew() const;
1062 MEDLOADER_EXPORT std::vector< std::vector<DataArrayDouble *> > getFieldSplitedByType2(int iteration, int order, const std::string& mname, std::vector<INTERP_KERNEL::NormalizedCellType>& types, std::vector< std::vector<TypeOfField> >& typesF, std::vector< std::vector<std::string> >& pfls, std::vector< std::vector<std::string> >& locs) const;
1063 MEDLOADER_EXPORT MEDFileIntFieldMultiTSWithoutSDA *convertToInt() const;
1065 MEDFileFieldMultiTSWithoutSDA(const std::string& fieldName, const std::string& meshName);
1066 MEDFileFieldMultiTSWithoutSDA(med_idt fid, const std::string& fieldName, const std::string& meshName, med_field_type fieldTyp, const std::vector<std::string>& infos, int nbOfStep, const std::string& dtunit, bool loadAll, const MEDFileMeshes *ms, const MEDFileEntities *entities);
1067 med_field_type getMEDFileFieldType() const { return MED_FLOAT64; }
1068 MEDFileAnyTypeField1TSWithoutSDA *createNew1TSWithoutSDAEmptyInstance() const;
1069 void checkCoherencyOfType(const MEDFileAnyTypeField1TSWithoutSDA *f1ts) const;
1071 MEDLOADER_EXPORT MEDFileFieldMultiTSWithoutSDA();
1074 class MEDFileIntFieldMultiTSWithoutSDA : public MEDFileAnyTypeFieldMultiTSWithoutSDA
1077 MEDLOADER_EXPORT static MEDFileIntFieldMultiTSWithoutSDA *New(med_idt fid, const std::string& fieldName, const std::string& meshName, med_field_type fieldTyp, const std::vector<std::string>& infos, int nbOfStep, const std::string& dtunit, bool loadAll, const MEDFileMeshes *ms, const MEDFileEntities *entities);
1078 MEDLOADER_EXPORT MEDFileIntFieldMultiTSWithoutSDA(med_idt fid, int fieldId, bool loadAll, const MEDFileMeshes *ms, const MEDFileEntities *entities);
1079 MEDLOADER_EXPORT const char *getTypeStr() const;
1080 MEDLOADER_EXPORT MEDFileAnyTypeFieldMultiTSWithoutSDA *shallowCpy() const;
1081 MEDLOADER_EXPORT MEDFileAnyTypeFieldMultiTSWithoutSDA *createNew() const;
1082 MEDLOADER_EXPORT MEDFileFieldMultiTSWithoutSDA *convertToDouble() const;
1084 MEDFileIntFieldMultiTSWithoutSDA(const std::string& fieldName, const std::string& meshName);
1085 MEDFileIntFieldMultiTSWithoutSDA(med_idt fid, const std::string& fieldName, const std::string& meshName, med_field_type fieldTyp, const std::vector<std::string>& infos, int nbOfStep, const std::string& dtunit, bool loadAll, const MEDFileMeshes *ms, const MEDFileEntities *entities);
1086 med_field_type getMEDFileFieldType() const { return MED_INT32; }
1087 MEDFileAnyTypeField1TSWithoutSDA *createNew1TSWithoutSDAEmptyInstance() const;
1088 void checkCoherencyOfType(const MEDFileAnyTypeField1TSWithoutSDA *f1ts) const;
1090 MEDLOADER_EXPORT MEDFileIntFieldMultiTSWithoutSDA();
1093 class MEDFileAnyTypeFieldMultiTSIterator;
1094 class MEDFileFastCellSupportComparator;
1098 class MEDFileAnyTypeFieldMultiTS : public RefCountObject, public MEDFileWritableStandAlone, public MEDFileFieldGlobsReal
1101 MEDFileAnyTypeFieldMultiTS();
1102 MEDFileAnyTypeFieldMultiTS(med_idt fid, bool loadAll, const MEDFileMeshes *ms);
1103 MEDFileAnyTypeFieldMultiTS(med_idt fid, const std::string& fieldName, bool loadAll, const MEDFileMeshes *ms, const MEDFileEntities *entities=0);
1104 MEDFileAnyTypeFieldMultiTS(const MEDFileAnyTypeFieldMultiTSWithoutSDA& other, bool shallowCopyOfContent);
1105 static MEDFileAnyTypeFieldMultiTS *BuildNewInstanceFromContent(MEDFileAnyTypeFieldMultiTSWithoutSDA *c, med_idt fid);
1106 static MEDFileAnyTypeFieldMultiTSWithoutSDA *BuildContentFrom(med_idt fid, bool loadAll, const MEDFileMeshes *ms);
1107 static MEDFileAnyTypeFieldMultiTSWithoutSDA *BuildContentFrom(med_idt fid, const std::string& fieldName, bool loadAll, const MEDFileMeshes *ms, const MEDFileEntities *entities);
1109 MEDLOADER_EXPORT static MEDFileAnyTypeFieldMultiTS *New(const std::string& fileName, bool loadAll=true);
1110 MEDLOADER_EXPORT static MEDFileAnyTypeFieldMultiTS *New(med_idt fid, bool loadAll=true);
1111 MEDLOADER_EXPORT static MEDFileAnyTypeFieldMultiTS *New(const std::string& fileName, const std::string& fieldName, bool loadAll=true);
1112 MEDLOADER_EXPORT static MEDFileAnyTypeFieldMultiTS *New(med_idt fid, const std::string& fieldName, bool loadAll=true);
1113 MEDLOADER_EXPORT static MEDFileAnyTypeFieldMultiTS *BuildNewInstanceFromContent(MEDFileAnyTypeFieldMultiTSWithoutSDA *c);
1114 MEDLOADER_EXPORT void loadArrays();
1115 MEDLOADER_EXPORT void loadArraysIfNecessary();
1116 MEDLOADER_EXPORT void unloadArrays();
1117 MEDLOADER_EXPORT void unloadArraysWithoutDataLoss();
1118 MEDLOADER_EXPORT void writeLL(med_idt fid) const;
1119 MEDLOADER_EXPORT std::size_t getHeapMemorySizeWithoutChildren() const;
1120 MEDLOADER_EXPORT std::vector<const BigMemoryObject *> getDirectChildrenWithNull() const;
1121 MEDLOADER_EXPORT virtual MEDFileAnyTypeFieldMultiTS *deepCopy() const;
1122 MEDLOADER_EXPORT std::vector< MCAuto< MEDFileAnyTypeFieldMultiTS > > splitComponents() const;
1123 MEDLOADER_EXPORT std::vector< MCAuto< MEDFileAnyTypeFieldMultiTS > > splitDiscretizations() const;
1124 MEDLOADER_EXPORT std::vector< MCAuto< MEDFileAnyTypeFieldMultiTS > > splitMultiDiscrPerGeoTypes() const;
1125 MEDLOADER_EXPORT virtual MEDFileAnyTypeFieldMultiTS *shallowCpy() const = 0;
1126 MEDLOADER_EXPORT virtual void checkCoherencyOfType(const MEDFileAnyTypeField1TS *f1ts) const = 0;
1128 MEDLOADER_EXPORT virtual MEDFileAnyTypeField1TS *getTimeStepAtPos(int pos) const = 0;
1129 MEDLOADER_EXPORT MEDFileAnyTypeField1TS *getTimeStep(int iteration, int order) const;
1130 MEDLOADER_EXPORT MEDFileAnyTypeField1TS *getTimeStepGivenTime(double time, double eps=1e-8) const;
1131 MEDLOADER_EXPORT static std::vector< std::vector<MEDFileAnyTypeFieldMultiTS *> > SplitIntoCommonTimeSeries(const std::vector<MEDFileAnyTypeFieldMultiTS *>& vectFMTS);
1132 MEDLOADER_EXPORT static std::vector< std::vector<MEDFileAnyTypeFieldMultiTS *> > SplitPerCommonSupport(const std::vector<MEDFileAnyTypeFieldMultiTS *>& vectFMTS, const MEDFileMesh *mesh, std::vector< MCAuto<MEDFileFastCellSupportComparator> >& fsc);
1133 MEDLOADER_EXPORT static int CheckSupportAcrossTime(MEDFileAnyTypeFieldMultiTS *f0, MEDFileAnyTypeFieldMultiTS *f1, const MEDFileMesh *mesh, TypeOfField& tof0, TypeOfField& tof1);
1134 public:// direct forwarding to MEDFileField1TSWithoutSDA instance _content
1135 MEDLOADER_EXPORT std::string getName() const;
1136 MEDLOADER_EXPORT void setName(const std::string& name);
1137 MEDLOADER_EXPORT std::string getDtUnit() const;
1138 MEDLOADER_EXPORT void setDtUnit(const std::string& dtUnit);
1139 MEDLOADER_EXPORT std::string getMeshName() const;
1140 MEDLOADER_EXPORT void setMeshName(const std::string& newMeshName);
1141 MEDLOADER_EXPORT std::string simpleRepr() const;
1142 MEDLOADER_EXPORT void simpleRepr(int bkOffset, std::ostream& oss, int fmtsId) const;
1143 MEDLOADER_EXPORT int getNumberOfTS() const;
1144 MEDLOADER_EXPORT void eraseEmptyTS();
1145 MEDLOADER_EXPORT void eraseTimeStepIds(const int *startIds, const int *endIds);
1146 MEDLOADER_EXPORT void eraseTimeStepIds2(int bg, int end, int step);
1147 MEDLOADER_EXPORT MEDFileAnyTypeFieldMultiTS *buildSubPart(const int *startIds, const int *endIds) const;
1148 MEDLOADER_EXPORT MEDFileAnyTypeFieldMultiTS *buildSubPartSlice(int bg, int end, int step) const;
1149 MEDLOADER_EXPORT std::vector< std::pair<int,int> > getTimeSteps(std::vector<double>& ret1) const;
1150 MEDLOADER_EXPORT std::vector< std::pair<int,int> > getIterations() const;
1151 MEDLOADER_EXPORT void pushBackTimeSteps(const std::vector<MEDFileAnyTypeField1TS *>& f1ts);
1152 MEDLOADER_EXPORT void pushBackTimeSteps(MEDFileAnyTypeFieldMultiTS *fmts);
1153 MEDLOADER_EXPORT void pushBackTimeStep(MEDFileAnyTypeField1TS *f1ts);
1154 MEDLOADER_EXPORT void synchronizeNameScope();
1155 MEDLOADER_EXPORT int getPosOfTimeStep(int iteration, int order) const;
1156 MEDLOADER_EXPORT int getPosGivenTime(double time, double eps=1e-8) const;
1157 MEDLOADER_EXPORT MEDFileAnyTypeFieldMultiTSIterator *iterator();
1158 MEDLOADER_EXPORT bool changeMeshNames(const std::vector< std::pair<std::string,std::string> >& modifTab);
1159 MEDLOADER_EXPORT const std::vector<std::string>& getInfo() const;
1160 MEDLOADER_EXPORT bool presenceOfMultiDiscPerGeoType() const;
1161 MEDLOADER_EXPORT void setInfo(const std::vector<std::string>& info);
1162 MEDLOADER_EXPORT int getNumberOfComponents() const;
1163 MEDLOADER_EXPORT int getNonEmptyLevels(int iteration, int order, const std::string& mname, std::vector<int>& levs) const;
1164 MEDLOADER_EXPORT std::vector< std::vector<TypeOfField> > getTypesOfFieldAvailable() const;
1165 MEDLOADER_EXPORT std::vector< std::vector< std::pair<int,int> > > getFieldSplitedByType(int iteration, int order, const std::string& mname, std::vector<INTERP_KERNEL::NormalizedCellType>& types, std::vector< std::vector<TypeOfField> >& typesF, std::vector< std::vector<std::string> >& pfls, std::vector< std::vector<std::string> >& locs) const;
1166 MEDLOADER_EXPORT MCAuto<MEDFileAnyTypeFieldMultiTSWithoutSDA> getContent();
1168 MEDLOADER_EXPORT virtual MEDFileAnyTypeFieldMultiTS *buildNewEmpty() const = 0;
1169 MEDLOADER_EXPORT MEDFileAnyTypeFieldMultiTS *extractPart(const std::map<int, MCAuto<DataArrayInt> >& extractDef, MEDFileMesh *mm) const;
1170 MEDLOADER_EXPORT static MCAuto<MEDFileAnyTypeFieldMultiTS> Aggregate(const std::vector<const MEDFileAnyTypeFieldMultiTS *>& fmtss, const std::vector< std::vector< std::pair<int,int> > >& dts);
1172 MEDLOADER_EXPORT std::vector<std::string> getPflsReallyUsed() const;
1173 MEDLOADER_EXPORT std::vector<std::string> getLocsReallyUsed() const;
1174 MEDLOADER_EXPORT std::vector<std::string> getPflsReallyUsedMulti() const;
1175 MEDLOADER_EXPORT std::vector<std::string> getLocsReallyUsedMulti() const;
1176 MEDLOADER_EXPORT void changePflsRefsNamesGen(const std::vector< std::pair<std::vector<std::string>, std::string > >& mapOfModif);
1177 MEDLOADER_EXPORT void changeLocsRefsNamesGen(const std::vector< std::pair<std::vector<std::string>, std::string > >& mapOfModif);
1179 MEDFileAnyTypeFieldMultiTSWithoutSDA *contentNotNullBase();
1180 const MEDFileAnyTypeFieldMultiTSWithoutSDA *contentNotNullBase() const;
1182 static std::vector< std::vector<MEDFileAnyTypeFieldMultiTS *> > SplitPerCommonSupportNotNodesAlg(const std::vector<MEDFileAnyTypeFieldMultiTS *>& vectFMTS, const MEDFileMesh *mesh, std::vector< MCAuto<MEDFileFastCellSupportComparator> >& cmps);
1184 MCAuto<MEDFileAnyTypeFieldMultiTSWithoutSDA> _content;
1187 class MEDFileIntFieldMultiTS;
1192 class MEDFileFieldMultiTS : public MEDFileAnyTypeFieldMultiTS
1195 MEDLOADER_EXPORT static MEDFileFieldMultiTS *New();
1196 MEDLOADER_EXPORT static MEDFileFieldMultiTS *New(const std::string& fileName, bool loadAll=true);
1197 MEDLOADER_EXPORT static MEDFileFieldMultiTS *New(med_idt fid, bool loadAll=true);
1198 MEDLOADER_EXPORT static MEDFileFieldMultiTS *New(DataArrayByte *db) { return BuildFromMemoryChunk<MEDFileFieldMultiTS>(db); }
1199 MEDLOADER_EXPORT static MEDFileFieldMultiTS *New(const std::string& fileName, const std::string& fieldName, bool loadAll=true);
1200 MEDLOADER_EXPORT static MEDFileFieldMultiTS *New(med_idt fid, const std::string& fieldName, bool loadAll=true);
1201 MEDLOADER_EXPORT static MEDFileFieldMultiTS *New(const MEDFileFieldMultiTSWithoutSDA& other, bool shallowCopyOfContent);
1202 MEDLOADER_EXPORT static MEDFileFieldMultiTS *LoadSpecificEntities(const std::string& fileName, const std::string& fieldName, const std::vector< std::pair<TypeOfField,INTERP_KERNEL::NormalizedCellType> >& entities, bool loadAll=true);
1203 MEDLOADER_EXPORT MEDFileAnyTypeFieldMultiTS *shallowCpy() const;
1204 MEDLOADER_EXPORT void checkCoherencyOfType(const MEDFileAnyTypeField1TS *f1ts) const;
1205 MEDLOADER_EXPORT MEDFileIntFieldMultiTS *convertToInt(bool isDeepCpyGlobs=true) const;
1207 MEDLOADER_EXPORT MEDFileField1TS *getTimeStepAtPos(int pos) const;
1208 MEDLOADER_EXPORT MEDFileAnyTypeField1TS *getTimeStep(int iteration, int order) const;
1209 MEDLOADER_EXPORT MEDFileAnyTypeField1TS *getTimeStepGivenTime(double time, double eps=1e-8) const;
1211 MEDLOADER_EXPORT MEDCouplingFieldDouble *field(int iteration, int order, const MEDFileMesh *mesh) const;
1212 MEDLOADER_EXPORT MEDCouplingFieldDouble *getFieldAtLevel(TypeOfField type, int iteration, int order, int meshDimRelToMax, int renumPol=0) const;
1213 MEDLOADER_EXPORT MEDCouplingFieldDouble *getFieldAtTopLevel(TypeOfField type, int iteration, int order, int renumPol=0) const;
1214 MEDLOADER_EXPORT MEDCouplingFieldDouble *getFieldOnMeshAtLevel(TypeOfField type, int iteration, int order, int meshDimRelToMax, const MEDFileMesh *mesh, int renumPol=0) const;
1215 MEDLOADER_EXPORT MEDCouplingFieldDouble *getFieldOnMeshAtLevel(TypeOfField type, int iteration, int order, const MEDCouplingMesh *mesh, int renumPol=0) const;
1216 MEDLOADER_EXPORT MEDCouplingFieldDouble *getFieldAtLevelOld(TypeOfField type, const std::string& mname, int iteration, int order, int meshDimRelToMax, int renumPol=0) const;
1217 MEDLOADER_EXPORT DataArrayDouble *getFieldWithProfile(TypeOfField type, int iteration, int order, int meshDimRelToMax, const MEDFileMesh *mesh, DataArrayInt *&pfl) const;
1219 MEDLOADER_EXPORT void appendFieldNoProfileSBT(const MEDCouplingFieldDouble *field);
1220 MEDLOADER_EXPORT void appendFieldProfile(const MEDCouplingFieldDouble *field, const MEDFileMesh *mesh, int meshDimRelToMax, const DataArrayInt *profile);
1221 MEDLOADER_EXPORT std::vector< std::vector<DataArrayDouble *> > getFieldSplitedByType2(int iteration, int order, const std::string& mname, std::vector<INTERP_KERNEL::NormalizedCellType>& types, std::vector< std::vector<TypeOfField> >& typesF, std::vector< std::vector<std::string> >& pfls, std::vector< std::vector<std::string> >& locs) const;
1222 MEDLOADER_EXPORT DataArrayDouble *getUndergroundDataArray(int iteration, int order) const;
1223 MEDLOADER_EXPORT DataArrayDouble *getUndergroundDataArrayExt(int iteration, int order, std::vector< std::pair<std::pair<INTERP_KERNEL::NormalizedCellType,int>,std::pair<int,int> > >& entries) const;
1225 MEDLOADER_EXPORT MEDFileFieldMultiTS *buildNewEmpty() const;
1227 const MEDFileFieldMultiTSWithoutSDA *contentNotNull() const;
1228 MEDFileFieldMultiTSWithoutSDA *contentNotNull();
1230 ~MEDFileFieldMultiTS() { }
1231 MEDFileFieldMultiTS();
1232 MEDFileFieldMultiTS(const MEDFileFieldMultiTSWithoutSDA& other, bool shallowCopyOfContent);
1233 MEDFileFieldMultiTS(med_idt fid, bool loadAll, const MEDFileMeshes *ms);
1234 MEDFileFieldMultiTS(med_idt fid, const std::string& fieldName, bool loadAll, const MEDFileMeshes *ms, const MEDFileEntities *entities=0);
1240 class MEDFileIntFieldMultiTS : public MEDFileAnyTypeFieldMultiTS
1243 MEDLOADER_EXPORT static MEDFileIntFieldMultiTS *New();
1244 MEDLOADER_EXPORT static MEDFileIntFieldMultiTS *New(const std::string& fileName, bool loadAll=true);
1245 MEDLOADER_EXPORT static MEDFileIntFieldMultiTS *New(med_idt fid, bool loadAll=true);
1246 MEDLOADER_EXPORT static MEDFileIntFieldMultiTS *New(DataArrayByte *db) { return BuildFromMemoryChunk<MEDFileIntFieldMultiTS>(db); }
1247 MEDLOADER_EXPORT static MEDFileIntFieldMultiTS *New(const std::string& fileName, const std::string& fieldName, bool loadAll=true);
1248 MEDLOADER_EXPORT static MEDFileIntFieldMultiTS *New(med_idt fid, const std::string& fieldName, bool loadAll=true);
1249 MEDLOADER_EXPORT static MEDFileIntFieldMultiTS *New(const MEDFileIntFieldMultiTSWithoutSDA& other, bool shallowCopyOfContent);
1250 MEDLOADER_EXPORT static MEDFileIntFieldMultiTS *LoadSpecificEntities(const std::string& fileName, const std::string& fieldName, const std::vector< std::pair<TypeOfField,INTERP_KERNEL::NormalizedCellType> >& entities, bool loadAll=true);
1251 MEDLOADER_EXPORT MEDFileAnyTypeFieldMultiTS *shallowCpy() const;
1252 MEDLOADER_EXPORT void checkCoherencyOfType(const MEDFileAnyTypeField1TS *f1ts) const;
1253 MEDLOADER_EXPORT MEDFileIntField1TS *getTimeStepAtPos(int pos) const;
1254 MEDLOADER_EXPORT MEDFileFieldMultiTS *convertToDouble(bool isDeepCpyGlobs=true) const;
1256 MEDLOADER_EXPORT MEDCouplingFieldInt *field(int iteration, int order, const MEDFileMesh *mesh) const;
1257 MEDLOADER_EXPORT MEDCouplingFieldInt *getFieldAtLevel(TypeOfField type, int iteration, int order, int meshDimRelToMax, int renumPol=0) const;
1258 MEDLOADER_EXPORT MEDCouplingFieldInt *getFieldAtTopLevel(TypeOfField type, int iteration, int order, int renumPol=0) const;
1259 MEDLOADER_EXPORT MEDCouplingFieldInt *getFieldOnMeshAtLevel(TypeOfField type, int iteration, int order, int meshDimRelToMax, const MEDFileMesh *mesh, int renumPol=0) const;
1260 MEDLOADER_EXPORT MEDCouplingFieldInt *getFieldOnMeshAtLevel(TypeOfField type, int iteration, int order, const MEDCouplingMesh *mesh, int renumPol=0) const;
1261 MEDLOADER_EXPORT MEDCouplingFieldInt *getFieldAtLevelOld(TypeOfField type, int iteration, int order, const std::string& mname, int meshDimRelToMax, int renumPol=0) const;
1262 MEDLOADER_EXPORT DataArrayInt *getFieldWithProfile(TypeOfField type, int iteration, int order, int meshDimRelToMax, const MEDFileMesh *mesh, DataArrayInt *&pfl) const;
1264 MEDLOADER_EXPORT void appendFieldNoProfileSBT(const MEDCouplingFieldInt *field);
1265 MEDLOADER_EXPORT void appendFieldProfile(const MEDCouplingFieldInt *field, const MEDFileMesh *mesh, int meshDimRelToMax, const DataArrayInt *profile);
1267 MEDLOADER_EXPORT DataArrayInt *getUndergroundDataArray(int iteration, int order) const;
1269 MEDLOADER_EXPORT MEDFileIntFieldMultiTS *buildNewEmpty() const;
1271 const MEDFileIntFieldMultiTSWithoutSDA *contentNotNull() const;
1272 MEDFileIntFieldMultiTSWithoutSDA *contentNotNull();
1274 ~MEDFileIntFieldMultiTS() { }
1275 MEDFileIntFieldMultiTS();
1276 MEDFileIntFieldMultiTS(const MEDFileIntFieldMultiTSWithoutSDA& other, bool shallowCopyOfContent);
1277 MEDFileIntFieldMultiTS(med_idt fid, bool loadAll, const MEDFileMeshes *ms);
1278 MEDFileIntFieldMultiTS(med_idt fid, const std::string& fieldName, bool loadAll, const MEDFileMeshes *ms, const MEDFileEntities *entities=0);
1281 class MEDFileAnyTypeFieldMultiTSIterator
1284 MEDLOADER_EXPORT MEDFileAnyTypeFieldMultiTSIterator(MEDFileAnyTypeFieldMultiTS *fmts);
1285 MEDLOADER_EXPORT ~MEDFileAnyTypeFieldMultiTSIterator();
1286 MEDLOADER_EXPORT MEDFileAnyTypeField1TS *nextt();
1288 MCAuto<MEDFileAnyTypeFieldMultiTS> _fmts;
1293 class MEDFileFieldsIterator;
1294 class MEDFileStructureElements;
1299 class MEDFileFields : public RefCountObject, public MEDFileFieldGlobsReal, public MEDFileWritableStandAlone
1302 MEDLOADER_EXPORT static MEDFileFields *New();
1303 MEDLOADER_EXPORT static MEDFileFields *New(const std::string& fileName, bool loadAll=true);
1304 MEDLOADER_EXPORT static MEDFileFields *New(med_idt fid, bool loadAll=true);
1305 MEDLOADER_EXPORT static MEDFileFields *NewAdv(const std::string& fileName, bool loadAll, const MEDFileEntities *entities);
1306 MEDLOADER_EXPORT static MEDFileFields *NewAdv(med_idt fid, bool loadAll, const MEDFileEntities *entities);
1307 MEDLOADER_EXPORT static MEDFileFields *NewWithDynGT(const std::string& fileName, const MEDFileStructureElements *se, bool loadAll=true);
1308 MEDLOADER_EXPORT static MEDFileFields *NewWithDynGT(med_idt fid, const MEDFileStructureElements *se, bool loadAll=true);
1309 MEDLOADER_EXPORT static MEDFileFields *New(DataArrayByte *db) { return BuildFromMemoryChunk<MEDFileFields>(db); }
1310 MEDLOADER_EXPORT static MEDFileFields *LoadPartOf(const std::string& fileName, bool loadAll=true, const MEDFileMeshes *ms=0);
1311 MEDLOADER_EXPORT static MEDFileFields *LoadSpecificEntities(const std::string& fileName, const std::vector< std::pair<TypeOfField,INTERP_KERNEL::NormalizedCellType> >& entities, bool loadAll=true);
1312 MEDLOADER_EXPORT std::size_t getHeapMemorySizeWithoutChildren() const;
1313 MEDLOADER_EXPORT std::vector<const BigMemoryObject *> getDirectChildrenWithNull() const;
1314 MEDLOADER_EXPORT MEDFileFields *deepCopy() const;
1315 MEDLOADER_EXPORT MEDFileFields *shallowCpy() const;
1316 MEDLOADER_EXPORT void writeLL(med_idt fid) const;
1317 MEDLOADER_EXPORT void loadArrays();
1318 MEDLOADER_EXPORT void loadArraysIfNecessary();
1319 MEDLOADER_EXPORT void unloadArrays();
1320 MEDLOADER_EXPORT void unloadArraysWithoutDataLoss();
1321 MEDLOADER_EXPORT int getNumberOfFields() const;
1322 MEDLOADER_EXPORT std::vector< std::pair<int,int> > getCommonIterations(bool& areThereSomeForgottenTS) const;
1323 MEDLOADER_EXPORT std::vector<std::string> getFieldsNames() const;
1324 MEDLOADER_EXPORT std::vector<std::string> getMeshesNames() const;
1325 MEDLOADER_EXPORT std::string simpleRepr() const;
1326 MEDLOADER_EXPORT void simpleRepr(int bkOffset, std::ostream& oss) const;
1328 MEDLOADER_EXPORT void resize(int newSize);
1329 MEDLOADER_EXPORT void pushField(MEDFileAnyTypeFieldMultiTS *field);
1330 MEDLOADER_EXPORT void pushFields(const std::vector<MEDFileAnyTypeFieldMultiTS *>& fields);
1331 MEDLOADER_EXPORT void setFieldAtPos(int i, MEDFileAnyTypeFieldMultiTS *field);
1332 MEDLOADER_EXPORT int getPosFromFieldName(const std::string& fieldName) const;
1333 MEDLOADER_EXPORT MEDFileAnyTypeFieldMultiTS *getFieldAtPos(int i) const;
1334 MEDLOADER_EXPORT MEDFileAnyTypeFieldMultiTS *getFieldWithName(const std::string& fieldName) const;
1335 MEDLOADER_EXPORT MEDFileFields *buildSubPart(const int *startIds, const int *endIds) const;
1336 MEDLOADER_EXPORT bool removeFieldsWithoutAnyTimeStep();
1337 MEDLOADER_EXPORT MEDFileFields *partOfThisLyingOnSpecifiedMeshName(const std::string& meshName) const;
1338 MEDLOADER_EXPORT MEDFileFields *partOfThisLyingOnSpecifiedTimeSteps(const std::vector< std::pair<int,int> >& timeSteps) const;
1339 MEDLOADER_EXPORT MEDFileFields *partOfThisNotLyingOnSpecifiedTimeSteps(const std::vector< std::pair<int,int> >& timeSteps) const;
1340 MEDLOADER_EXPORT bool presenceOfStructureElements() const;
1341 MEDLOADER_EXPORT void killStructureElements();
1342 MEDLOADER_EXPORT void keepOnlyStructureElements();
1343 MEDLOADER_EXPORT void keepOnlyOnMeshSE(const std::string& meshName, const std::string& seName);
1344 MEDLOADER_EXPORT void getMeshSENames(std::vector< std::pair<std::string,std::string> >& ps) const;
1345 MEDLOADER_EXPORT void blowUpSE(MEDFileMeshes *ms, const MEDFileStructureElements *ses);
1346 MEDLOADER_EXPORT MCAuto<MEDFileFields> partOfThisOnStructureElements() const;
1347 MEDLOADER_EXPORT MCAuto<MEDFileFields> partOfThisLyingOnSpecifiedMeshSEName(const std::string& meshName, const std::string& seName) const;
1348 MEDLOADER_EXPORT void aggregate(const MEDFileFields& other);
1349 MEDLOADER_EXPORT MEDFileFieldsIterator *iterator();
1350 MEDLOADER_EXPORT void destroyFieldAtPos(int i);
1351 MEDLOADER_EXPORT void destroyFieldsAtPos(const int *startIds, const int *endIds);
1352 MEDLOADER_EXPORT void destroyFieldsAtPos2(int bg, int end, int step);
1353 MEDLOADER_EXPORT bool changeMeshNames(const std::vector< std::pair<std::string,std::string> >& modifTab);
1354 MEDLOADER_EXPORT bool renumberEntitiesLyingOnMesh(const std::string& meshName, const std::vector<int>& oldCode, const std::vector<int>& newCode, const DataArrayInt *renumO2N);
1355 MEDLOADER_EXPORT void accept(MEDFileFieldVisitor& visitor) const;
1357 MEDLOADER_EXPORT MEDFileFields *extractPart(const std::map<int, MCAuto<DataArrayInt> >& extractDef, MEDFileMesh *mm) const;
1359 MEDLOADER_EXPORT std::vector<std::string> getPflsReallyUsed() const;
1360 MEDLOADER_EXPORT std::vector<std::string> getLocsReallyUsed() const;
1361 MEDLOADER_EXPORT std::vector<std::string> getPflsReallyUsedMulti() const;
1362 MEDLOADER_EXPORT std::vector<std::string> getLocsReallyUsedMulti() const;
1363 MEDLOADER_EXPORT void changePflsRefsNamesGen(const std::vector< std::pair<std::vector<std::string>, std::string > >& mapOfModif);
1364 MEDLOADER_EXPORT void changeLocsRefsNamesGen(const std::vector< std::pair<std::vector<std::string>, std::string > >& mapOfModif);
1366 ~MEDFileFields() { }
1368 MEDFileFields(med_idt fid, bool loadAll, const MEDFileMeshes *ms, const MEDFileEntities *entities);
1370 std::vector< MCAuto<MEDFileAnyTypeFieldMultiTSWithoutSDA> > _fields;
1373 class MEDFileFieldsIterator
1376 MEDLOADER_EXPORT MEDFileFieldsIterator(MEDFileFields *fs);
1377 MEDLOADER_EXPORT ~MEDFileFieldsIterator();
1378 MEDLOADER_EXPORT MEDFileAnyTypeFieldMultiTS *nextt();
1380 MCAuto<MEDFileFields> _fs;