Salome HOME
feat: new crackAlong method
[tools/medcoupling.git] / src / MEDLoader / MEDFileField1TS.hxx
1 // Copyright (C) 2007-2024  CEA, EDF
2 //
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.
7 //
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.
12 //
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
16 //
17 // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
18 //
19 // Author : Anthony Geay (EDF R&D)
20
21 #ifndef __MEDFILEFIELD1TS_HXX__
22 #define __MEDFILEFIELD1TS_HXX__
23
24 #include "MEDLoaderDefines.hxx"
25 #include "MEDFileFieldGlobs.hxx"
26 #include "MEDFileFieldInternal.hxx"
27 #include "MEDLoaderTraits.hxx"
28
29 #include "med.h"
30
31 namespace MEDCoupling
32 {
33   class TimeHolder;
34   class MEDFileMeshes;
35
36   /*!
37    * SDA is for Shared Data Arrays such as profiles.
38    */
39   class MEDFileAnyTypeField1TSWithoutSDA : public RefCountObject, public MEDFileFieldNameScope
40   {
41   public:
42     MEDLOADER_EXPORT MEDFileAnyTypeField1TSWithoutSDA();
43     MEDLOADER_EXPORT MEDFileAnyTypeField1TSWithoutSDA(const std::string& fieldName, const std::string& meshName, int csit, int iteration, int order);
44     MEDLOADER_EXPORT std::string getClassName() const override { return std::string("MEDFileAnyTypeField1TSWithoutSDA"); }
45     MEDLOADER_EXPORT int getIteration() const { return _iteration; }
46     MEDLOADER_EXPORT int getOrder() const { return _order; }
47     MEDLOADER_EXPORT double getTime(int& iteration, int& order) const { iteration=_iteration; order=_order; return _dt; }
48     MEDLOADER_EXPORT void setTime(int iteration, int order, double val) { _dt=val; _iteration=iteration; _order=order; }
49     MEDLOADER_EXPORT int getDimension() const;
50     MEDLOADER_EXPORT bool changeMeshNames(const std::vector< std::pair<std::string,std::string> >& modifTab);
51     MEDLOADER_EXPORT int getMeshIteration() const;
52     MEDLOADER_EXPORT int getMeshOrder() const;
53     MEDLOADER_EXPORT bool isDealingTS(int iteration, int order) const;
54     MEDLOADER_EXPORT std::pair<int,int> getDtIt() const;
55     MEDLOADER_EXPORT void fillIteration(std::pair<int,int>& p) const;
56     MEDLOADER_EXPORT void fillTypesOfFieldAvailable(std::vector<TypeOfField>& types) const;
57     MEDLOADER_EXPORT std::vector<TypeOfField> getTypesOfFieldAvailable() const;
58     //
59     MEDLOADER_EXPORT std::vector<std::string> getPflsReallyUsed2() const;
60     MEDLOADER_EXPORT std::vector<std::string> getLocsReallyUsed2() const;
61     MEDLOADER_EXPORT std::vector<std::string> getPflsReallyUsedMulti2() const;
62     MEDLOADER_EXPORT std::vector<std::string> getLocsReallyUsedMulti2() const;
63     MEDLOADER_EXPORT void changePflsRefsNamesGen2(const std::vector< std::pair<std::vector<std::string>, std::string > >& mapOfModif);
64     MEDLOADER_EXPORT void changeLocsRefsNamesGen2(const std::vector< std::pair<std::vector<std::string>, std::string > >& mapOfModif);
65     //
66     MEDLOADER_EXPORT int getNonEmptyLevels(const std::string& mname, std::vector<int>& levs) const;
67     MEDLOADER_EXPORT void convertMedBallIntoClassic();
68     MEDLOADER_EXPORT void makeReduction(INTERP_KERNEL::NormalizedCellType ct, TypeOfField tof, const DataArrayIdType *pfl);
69     MEDLOADER_EXPORT std::vector< std::vector<std::pair<mcIdType,mcIdType> > > 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;
70     //
71     MEDLOADER_EXPORT MEDFileFieldPerMeshPerTypePerDisc *getLeafGivenMeshAndTypeAndLocId(const std::string& mName, INTERP_KERNEL::NormalizedCellType typ, int locId);
72     MEDLOADER_EXPORT const MEDFileFieldPerMeshPerTypePerDisc *getLeafGivenMeshAndTypeAndLocId(const std::string& mName, INTERP_KERNEL::NormalizedCellType typ, int locId) const;
73     MEDLOADER_EXPORT void deepCpyLeavesFrom(const MEDFileAnyTypeField1TSWithoutSDA& other);
74     MEDLOADER_EXPORT void accept(MEDFileFieldVisitor& visitor) const;
75   public:
76     MEDLOADER_EXPORT std::size_t getNumberOfComponents() const;
77     MEDLOADER_EXPORT const std::vector<std::string>& getInfo() const;
78     MEDLOADER_EXPORT std::vector<std::string>& getInfo();
79     MEDLOADER_EXPORT bool presenceOfMultiDiscPerGeoType() const;
80     MEDLOADER_EXPORT bool presenceOfStructureElements() const;
81     MEDLOADER_EXPORT bool onlyStructureElements() const;
82     MEDLOADER_EXPORT void killStructureElements();
83     MEDLOADER_EXPORT void keepOnlyStructureElements();
84     MEDLOADER_EXPORT void keepOnlyOnSE(const std::string& seName);
85     MEDLOADER_EXPORT void getMeshSENames(std::vector< std::pair<std::string,std::string> >& ps) const;
86     MEDLOADER_EXPORT void setInfo(const std::vector<std::string>& infos);
87     MEDLOADER_EXPORT std::size_t getHeapMemorySizeWithoutChildren() const;
88     MEDLOADER_EXPORT std::vector<const BigMemoryObject *> getDirectChildrenWithNull() const;
89     MEDLOADER_EXPORT mcIdType copyTinyInfoFrom(const TimeHolder *th, const MEDCouplingFieldTemplate *field, const DataArray *arr);
90     MEDLOADER_EXPORT void setFieldNoProfileSBT(const TimeHolder *th, const MEDCouplingFieldTemplate *field, const DataArray *arr, MEDFileFieldGlobsReal& glob, const MEDFileFieldNameScope& nasc);
91     MEDLOADER_EXPORT void setFieldProfile(const TimeHolder *th, const MEDCouplingFieldTemplate *field, const DataArray *arrOfVals, const MEDFileMesh *mesh, int meshDimRelToMax, const DataArrayIdType *profile, MEDFileFieldGlobsReal& glob, const MEDFileFieldNameScope& nasc, bool smartPflKiller=true);
92     MEDLOADER_EXPORT virtual void simpleRepr(int bkOffset, std::ostream& oss, int f1tsId) const;
93     MEDLOADER_EXPORT virtual MEDFileAnyTypeField1TSWithoutSDA *deepCopy() const = 0;
94     MEDLOADER_EXPORT virtual MEDFileAnyTypeField1TSWithoutSDA *shallowCpy() const = 0;
95     MEDLOADER_EXPORT virtual std::vector< MCAuto<MEDFileAnyTypeField1TSWithoutSDA> > splitComponents() const;
96     MEDLOADER_EXPORT virtual const char *getTypeStr() const = 0;
97     MEDLOADER_EXPORT virtual DataArray *getUndergroundDataArray() const = 0;
98     MEDLOADER_EXPORT virtual DataArray *getUndergroundDataArrayExt(std::vector< std::pair<std::pair<INTERP_KERNEL::NormalizedCellType,int>,std::pair<mcIdType,mcIdType> > >& entries) const = 0;
99     MEDLOADER_EXPORT virtual void setArray(DataArray *arr) = 0;
100     MEDLOADER_EXPORT virtual DataArray *createNewEmptyDataArrayInstance() const = 0;
101     MEDLOADER_EXPORT virtual DataArray *getOrCreateAndGetArray() = 0;
102     MEDLOADER_EXPORT virtual const DataArray *getOrCreateAndGetArray() const = 0;
103   public:
104     MEDLOADER_EXPORT MEDCouplingFieldDouble *fieldOnMesh(const MEDFileFieldGlobsReal *glob, const MEDFileMesh *mesh, MCAuto<DataArray>& arrOut, const MEDFileFieldNameScope& nasc) const;
105     MEDLOADER_EXPORT MEDCouplingFieldDouble *getFieldAtLevel(TypeOfField type, int meshDimRelToMax, const std::string& mName, int renumPol, const MEDFileFieldGlobsReal *glob, MCAuto<DataArray> &arrOut, const MEDFileFieldNameScope& nasc) const;
106     MEDLOADER_EXPORT MEDCouplingFieldDouble *getFieldOnMeshAtLevel(TypeOfField type, int meshDimRelToMax, int renumPol, const MEDFileFieldGlobsReal *glob, const MEDFileMesh *mesh, MCAuto<DataArray> &arrOut, const MEDFileFieldNameScope& nasc) const;
107     MEDLOADER_EXPORT MEDCouplingFieldDouble *getFieldAtTopLevel(TypeOfField type, const std::string& mName, int renumPol, const MEDFileFieldGlobsReal *glob, MCAuto<DataArray> &arrOut, const MEDFileFieldNameScope& nasc) const;
108     MEDLOADER_EXPORT MEDCouplingFieldDouble *getFieldOnMeshAtLevel(TypeOfField type, int renumPol, const MEDFileFieldGlobsReal *glob, const MEDCouplingMesh *mesh, const DataArrayIdType *cellRenum, const DataArrayIdType *nodeRenum, MCAuto<DataArray> &arrOut, const MEDFileFieldNameScope& nasc) const;
109     DataArray *getFieldWithProfile(TypeOfField type, int meshDimRelToMax, const MEDFileMesh *mesh, DataArrayIdType *&pfl, const MEDFileFieldGlobsReal *glob, const MEDFileFieldNameScope& nasc) const;
110   public:
111     MEDLOADER_EXPORT bool renumberEntitiesLyingOnMesh(const std::string& meshName, const std::vector<mcIdType>& oldCode, const std::vector<mcIdType>& newCode, const DataArrayIdType *renumO2N, MEDFileFieldGlobsReal& glob);
112     MEDLOADER_EXPORT std::vector< MCAuto<MEDFileAnyTypeField1TSWithoutSDA> > splitDiscretizations() const;
113     MEDLOADER_EXPORT std::vector< MCAuto<MEDFileAnyTypeField1TSWithoutSDA> > splitMultiDiscrPerGeoTypes() const;
114     MEDLOADER_EXPORT mcIdType keepOnlySpatialDiscretization(TypeOfField tof, std::vector< std::pair<mcIdType,mcIdType> >& its);
115     MEDLOADER_EXPORT mcIdType keepOnlyGaussDiscretization(std::size_t idOfDisc, std::vector< std::pair<mcIdType,mcIdType> >& its);
116   public:
117     MEDLOADER_EXPORT void allocNotFromFile(mcIdType newNbOfTuples);
118     MEDLOADER_EXPORT bool allocIfNecessaryTheArrayToReceiveDataFromFile();
119     MEDLOADER_EXPORT void loadOnlyStructureOfDataRecursively(med_idt fid, const MEDFileFieldNameScope& nasc, const MEDFileMeshes *ms, const MEDFileEntities *entities, const MEDFileCapability *capability = nullptr);
120     MEDLOADER_EXPORT void loadOnlyStructureOfDataRecursively(med_idt fid, const MEDFileFieldNameScope& nasc, const PartDefinition *pd, const MEDFileEntities *entities, const MEDFileCapability *capability = nullptr);
121     MEDLOADER_EXPORT void loadBigArraysRecursively(med_idt fid, const MEDFileFieldNameScope& nasc);
122     MEDLOADER_EXPORT void loadBigArraysRecursivelyIfNecessary(med_idt fid, const MEDFileFieldNameScope& nasc);
123     MEDLOADER_EXPORT void loadStructureAndBigArraysRecursively(med_idt fid, const MEDFileFieldNameScope& nasc, const MEDFileMeshes *ms, const MEDFileEntities *entities);
124     MEDLOADER_EXPORT void loadStructureAndBigArraysRecursively(med_idt fid, const MEDFileFieldNameScope& nasc, const PartDefinition *pd, const MEDFileEntities *entities);
125     MEDLOADER_EXPORT void unloadArrays();
126     MEDLOADER_EXPORT void writeLL(med_idt fid, const MEDFileWritable& opts, const MEDFileFieldNameScope& nasc) const;
127     MEDLOADER_EXPORT static std::string FieldNameToMEDFileConvention(const std::string& nonCorrectFieldName);
128   protected:
129     int getMeshIdFromMeshName(const std::string& mName) const;
130     int addNewEntryIfNecessary(const MEDCouplingMesh *mesh);
131     void updateData(mcIdType newLgth, const std::vector< std::pair<mcIdType,mcIdType> >& oldStartStops);
132   protected:
133     std::vector< MCAuto< MEDFileFieldPerMesh > > _field_per_mesh;
134     int _iteration;
135     int _order;
136     double _dt;
137   public:
138     //! only useable on reading
139     mutable int _csit;
140     // -3 means allocated and build from scratch
141     // -2 means allocated and read from a file
142     // -1 means not allocated and build from scratch
143     // >=0 means not allocated and read from a file
144     mutable mcIdType _nb_of_tuples_to_be_allocated;
145   };
146
147   class MEDFileInt32Field1TSWithoutSDA;
148
149   template<class T>
150   class MEDFileField1TSTemplateWithoutSDA : public MEDFileAnyTypeField1TSWithoutSDA
151   {
152   protected:
153     MEDFileField1TSTemplateWithoutSDA(const std::string& fieldName, const std::string& meshName, int csit, int iteration, int order):MEDFileAnyTypeField1TSWithoutSDA(fieldName,meshName,csit,iteration,order) { }
154     MEDFileField1TSTemplateWithoutSDA() { }
155   public:
156     MEDLOADER_EXPORT void setArray(DataArray *arr);
157     MEDLOADER_EXPORT DataArray *createNewEmptyDataArrayInstance() const;
158     MEDLOADER_EXPORT typename Traits<T>::ArrayType *getOrCreateAndGetArrayTemplate();
159     MEDLOADER_EXPORT typename Traits<T>::ArrayType const *getOrCreateAndGetArrayTemplate() const;
160     MEDLOADER_EXPORT typename Traits<T>::ArrayType *getUndergroundDataArrayTemplate() const;
161     MEDLOADER_EXPORT typename Traits<T>::ArrayType *getUndergroundDataArrayTemplateExt(std::vector< std::pair<std::pair<INTERP_KERNEL::NormalizedCellType,int>,std::pair<mcIdType,mcIdType> > >& entries) const;
162     MEDLOADER_EXPORT DataArray *getOrCreateAndGetArray();
163     MEDLOADER_EXPORT const DataArray *getOrCreateAndGetArray() const;
164     MEDLOADER_EXPORT DataArray *getUndergroundDataArray() const;
165     MEDLOADER_EXPORT void aggregate(const typename std::vector< typename MLFieldTraits<T>::F1TSWSDAType const * >& f1tss, const std::vector< std::vector< std::pair<int,mcIdType> > >& dts);
166     MEDLOADER_EXPORT void copyTimeInfoFrom(const typename Traits<T>::FieldType *mcf);
167   protected:
168     MCAuto< typename Traits<T>::ArrayType > _arr;
169   };
170
171   /*!
172    * SDA is for Shared Data Arrays such as profiles.
173    */
174   class MEDFileField1TSWithoutSDA : public MEDFileField1TSTemplateWithoutSDA<double>
175   {
176   public:
177     MEDLOADER_EXPORT const char *getTypeStr() const;
178     MEDLOADER_EXPORT std::string getClassName() const override { return std::string("MEDFileField1TSWithoutSDA"); }
179     MEDLOADER_EXPORT DataArray *getUndergroundDataArrayExt(std::vector< std::pair<std::pair<INTERP_KERNEL::NormalizedCellType,int>,std::pair<mcIdType,mcIdType> > >& entries) const;
180     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;
181     MEDLOADER_EXPORT static void CheckMeshDimRel(int meshDimRelToMax);
182     MEDLOADER_EXPORT static std::vector<mcIdType> CheckSBTMesh(const MEDCouplingMesh *mesh);
183     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);
184   public:
185     MEDLOADER_EXPORT MEDFileField1TSWithoutSDA();
186     MEDLOADER_EXPORT MEDFileField1TSWithoutSDA(const std::string& fieldName, const std::string& meshName, int csit, int iteration, int order, const std::vector<std::string>& infos);
187     MEDLOADER_EXPORT MEDFileField1TSWithoutSDA *shallowCpy() const;
188     MEDLOADER_EXPORT MEDFileField1TSWithoutSDA *deepCopy() const;
189     MEDLOADER_EXPORT MEDFileInt32Field1TSWithoutSDA *convertToInt() const;
190     MEDLOADER_EXPORT MEDFileInt64Field1TSWithoutSDA *convertToInt64() const;
191     MEDLOADER_EXPORT MEDFileFloatField1TSWithoutSDA *convertToFloat() const;
192   public:
193     static const char TYPE_STR[];
194   };
195
196   template<class T>
197   class MEDFileField1TSNDTemplateWithoutSDA : public MEDFileField1TSTemplateWithoutSDA<T>
198   {
199   public:
200     MEDLOADER_EXPORT MEDFileField1TSWithoutSDA *convertToDouble() const;
201   protected:
202     MEDFileField1TSNDTemplateWithoutSDA() { }
203     MEDFileField1TSNDTemplateWithoutSDA(const std::string& fieldName, const std::string& meshName, int csit, int iteration, int order, const std::vector<std::string>& infos):MEDFileField1TSTemplateWithoutSDA<T>(fieldName,meshName,csit,iteration,order) { }
204   };
205
206   /*!
207    * SDA is for Shared Data Arrays such as profiles.
208    */
209   class MEDFileInt32Field1TSWithoutSDA : public MEDFileField1TSNDTemplateWithoutSDA<Int32>
210   {
211   public:
212     MEDLOADER_EXPORT MEDFileInt32Field1TSWithoutSDA();
213     MEDLOADER_EXPORT std::string getClassName() const override { return std::string("MEDFileInt32Field1TSWithoutSDA"); }
214     MEDLOADER_EXPORT static MEDFileInt32Field1TSWithoutSDA *New(const std::string& fieldName, const std::string& meshName, int csit, int iteration, int order, const std::vector<std::string>& infos);
215     MEDLOADER_EXPORT MEDFileInt32Field1TSWithoutSDA *deepCopy() const;
216     MEDLOADER_EXPORT MEDFileInt32Field1TSWithoutSDA *shallowCpy() const;
217     MEDLOADER_EXPORT const char *getTypeStr() const;
218     MEDLOADER_EXPORT DataArray *getUndergroundDataArrayExt(std::vector< std::pair<std::pair<INTERP_KERNEL::NormalizedCellType,int>,std::pair<mcIdType,mcIdType> > >& entries) const;
219     MEDLOADER_EXPORT DataArrayInt32 *getUndergroundDataArrayIntExt(std::vector< std::pair<std::pair<INTERP_KERNEL::NormalizedCellType,int>,std::pair<mcIdType,mcIdType> > >& entries) const;
220   protected:
221     MEDFileInt32Field1TSWithoutSDA(const std::string& fieldName, const std::string& meshName, int csit, int iteration, int order, const std::vector<std::string>& infos);
222   public:
223     MEDLOADER_EXPORT static const char TYPE_STR[];
224   };
225
226   /*!
227    * SDA is for Shared Data Arrays such as profiles.
228    */
229   class MEDFileInt64Field1TSWithoutSDA : public MEDFileField1TSNDTemplateWithoutSDA<Int64>
230   {
231   public:
232     MEDLOADER_EXPORT MEDFileInt64Field1TSWithoutSDA();
233     MEDLOADER_EXPORT std::string getClassName() const override { return std::string("MEDFileInt64Field1TSWithoutSDA"); }
234     MEDLOADER_EXPORT static MEDFileInt64Field1TSWithoutSDA *New(const std::string& fieldName, const std::string& meshName, int csit, int iteration, int order, const std::vector<std::string>& infos);
235     MEDLOADER_EXPORT MEDFileInt64Field1TSWithoutSDA *deepCopy() const;
236     MEDLOADER_EXPORT MEDFileInt64Field1TSWithoutSDA *shallowCpy() const;
237     MEDLOADER_EXPORT const char *getTypeStr() const;
238     MEDLOADER_EXPORT DataArray *getUndergroundDataArrayExt(std::vector< std::pair<std::pair<INTERP_KERNEL::NormalizedCellType,int>,std::pair<mcIdType,mcIdType> > >& entries) const;
239     MEDLOADER_EXPORT DataArrayInt64 *getUndergroundDataArrayIntExt(std::vector< std::pair<std::pair<INTERP_KERNEL::NormalizedCellType,int>,std::pair<mcIdType,mcIdType> > >& entries) const;
240   protected:
241     MEDFileInt64Field1TSWithoutSDA(const std::string& fieldName, const std::string& meshName, int csit, int iteration, int order, const std::vector<std::string>& infos);
242   public:
243     MEDLOADER_EXPORT static const char TYPE_STR[];
244   };
245
246   /*!
247    * SDA is for Shared Data Arrays such as profiles.
248    */
249   class MEDFileFloatField1TSWithoutSDA : public MEDFileField1TSNDTemplateWithoutSDA<float>
250   {
251   public:
252     MEDLOADER_EXPORT MEDFileFloatField1TSWithoutSDA();
253     MEDLOADER_EXPORT std::string getClassName() const override { return std::string("MEDFileFloatField1TSWithoutSDA"); }
254     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);
255     MEDLOADER_EXPORT MEDFileFloatField1TSWithoutSDA *deepCopy() const;
256     MEDLOADER_EXPORT MEDFileFloatField1TSWithoutSDA *shallowCpy() const;
257     MEDLOADER_EXPORT const char *getTypeStr() const;
258     MEDLOADER_EXPORT DataArray *getUndergroundDataArrayExt(std::vector< std::pair<std::pair<INTERP_KERNEL::NormalizedCellType,int>,std::pair<mcIdType,mcIdType> > >& entries) const;
259     MEDLOADER_EXPORT DataArrayFloat *getUndergroundDataArrayFloatExt(std::vector< std::pair<std::pair<INTERP_KERNEL::NormalizedCellType,int>,std::pair<mcIdType,mcIdType> > >& entries) const;
260   protected:
261     MEDFileFloatField1TSWithoutSDA(const std::string& fieldName, const std::string& meshName, int csit, int iteration, int order, const std::vector<std::string>& infos);
262   public:
263     MEDLOADER_EXPORT static const char TYPE_STR[];
264   };
265
266   /*!
267    * User class.
268    */
269   class MEDFileAnyTypeField1TS : public RefCountObject, public MEDFileWritableStandAlone, public MEDFileFieldGlobsReal
270   {
271   protected:
272     MEDLOADER_EXPORT MEDFileAnyTypeField1TS();
273     MEDLOADER_EXPORT MEDFileAnyTypeField1TS(med_idt fid, bool loadAll, const MEDFileMeshes *ms, const MEDFileEntities *entities=0);
274     MEDLOADER_EXPORT MEDFileAnyTypeField1TS(med_idt fid, const std::string& fieldName, bool loadAll, const MEDFileMeshes *ms, const MEDFileEntities *entities=0);
275     MEDLOADER_EXPORT MEDFileAnyTypeField1TS(med_idt fid, const std::string& fieldName, int iteration, int order, bool loadAll, const MEDFileMeshes *ms, const MEDFileEntities *entities=0);
276     MEDLOADER_EXPORT MEDFileAnyTypeField1TS(const MEDFileAnyTypeField1TSWithoutSDA& other, bool shallowCopyOfContent);
277     MEDLOADER_EXPORT std::string getClassName() const override { return std::string("MEDFileAnyTypeField1TS"); }
278     MEDLOADER_EXPORT static MEDFileAnyTypeField1TS *BuildNewInstanceFromContent(MEDFileAnyTypeField1TSWithoutSDA *c);
279     MEDLOADER_EXPORT static MEDFileAnyTypeField1TS *BuildNewInstanceFromContent(MEDFileAnyTypeField1TSWithoutSDA *c, med_idt fid);
280     MEDLOADER_EXPORT static MEDFileAnyTypeField1TSWithoutSDA *BuildContentFrom(med_idt fid, bool loadAll, const MEDFileMeshes *ms, const MEDFileEntities *entities);
281     MEDLOADER_EXPORT static MEDFileAnyTypeField1TSWithoutSDA *BuildContentFrom(med_idt fid, const std::string& fieldName, bool loadAll, const MEDFileMeshes *ms, const MEDFileEntities *entities);
282     MEDLOADER_EXPORT static MEDFileAnyTypeField1TSWithoutSDA *BuildContentFrom(med_idt fid, const std::string& fieldName, int iteration, int order, bool loadAll, const MEDFileMeshes *ms, const MEDFileEntities *entities);
283     MEDLOADER_EXPORT static MEDFileAnyTypeField1TSWithoutSDA *BuildContentFrom(med_idt fid, const std::string& fieldName, int iteration, int order, const PartDefinition *pd, const MEDFileEntities *entities);
284     MEDLOADER_EXPORT static MEDFileAnyTypeField1TSWithoutSDA *AllocateContentFrom(med_idt fid, const std::string& fieldName, int iteration=-1, int order=-1);
285     MEDLOADER_EXPORT void writeLL(med_idt fid) const;
286     // direct forwarding to MEDFileAnyTypeField1TSWithoutSDA instance _content
287   public:
288     MEDLOADER_EXPORT static MEDFileAnyTypeField1TS *New(const std::string& fileName, bool loadAll=true);
289     MEDLOADER_EXPORT static MEDFileAnyTypeField1TS *New(med_idt fid, bool loadAll=true);
290     MEDLOADER_EXPORT static MEDFileAnyTypeField1TS *New(const std::string& fileName, const std::string& fieldName, bool loadAll=true);
291     MEDLOADER_EXPORT static MEDFileAnyTypeField1TS *New(med_idt fid, const std::string& fieldName, bool loadAll=true);
292     MEDLOADER_EXPORT static MEDFileAnyTypeField1TS *New(const std::string& fileName, const std::string& fieldName, int iteration, int order, bool loadAll=true);
293     MEDLOADER_EXPORT static MEDFileAnyTypeField1TS *New(med_idt fid, const std::string& fieldName, int iteration, int order, bool loadAll=true);
294     MEDLOADER_EXPORT static MEDFileAnyTypeField1TS *NewAdv(const std::string& fileName, const std::string& fieldName, int iteration, int order, bool loadAll, const MEDFileEntities *entities);
295     MEDLOADER_EXPORT static MEDFileAnyTypeField1TS *NewAdv(med_idt fid, const std::string& fieldName, int iteration, int order, bool loadAll, const MEDFileEntities *entities);
296     MEDLOADER_EXPORT static MEDFileAnyTypeField1TS *NewAdv(med_idt fid, const std::string& fieldName, int iteration, int order, const MEDFileEntities *entities, const std::vector<mcIdType>& distrib);
297
298     MEDLOADER_EXPORT virtual MCAuto<MEDFileAnyTypeField1TS> buildNewEmpty() const = 0;
299     MEDLOADER_EXPORT int getDimension() const;
300     MEDLOADER_EXPORT int getIteration() const;
301     MEDLOADER_EXPORT int getOrder() const;
302     MEDLOADER_EXPORT double getTime(int& iteration, int& order) const;
303     MEDLOADER_EXPORT void setTime(int iteration, int order, double val);
304     MEDLOADER_EXPORT std::string getName() const;
305     MEDLOADER_EXPORT void setName(const std::string& name);
306     MEDLOADER_EXPORT std::string simpleRepr() const;
307     MEDLOADER_EXPORT void simpleRepr(int bkOffset, std::ostream& oss, int f1tsId) const;
308     MEDLOADER_EXPORT std::string getDtUnit() const;
309     MEDLOADER_EXPORT void setDtUnit(const std::string& dtUnit);
310     MEDLOADER_EXPORT std::string getMeshName() const;
311     MEDLOADER_EXPORT void setMeshName(const std::string& newMeshName);
312     MEDLOADER_EXPORT bool changeMeshNames(const std::vector< std::pair<std::string,std::string> >& modifTab);
313     MEDLOADER_EXPORT int getMeshIteration() const;
314     MEDLOADER_EXPORT int getMeshOrder() const;
315     MEDLOADER_EXPORT std::size_t getNumberOfComponents() const;
316     MEDLOADER_EXPORT bool isDealingTS(int iteration, int order) const;
317     MEDLOADER_EXPORT std::pair<int,int> getDtIt() const;
318     MEDLOADER_EXPORT void fillIteration(std::pair<int,int>& p) const;
319     MEDLOADER_EXPORT void fillTypesOfFieldAvailable(std::vector<TypeOfField>& types) const;
320     MEDLOADER_EXPORT void setInfo(const std::vector<std::string>& infos);
321     MEDLOADER_EXPORT const std::vector<std::string>& getInfo() const;
322     MEDLOADER_EXPORT std::vector<std::string>& getInfo();
323     MEDLOADER_EXPORT bool presenceOfMultiDiscPerGeoType() const;
324     MEDLOADER_EXPORT std::vector<TypeOfField> getTypesOfFieldAvailable() const;
325     MEDLOADER_EXPORT std::vector< std::vector<std::pair<mcIdType,mcIdType> > > getFieldSplitedByType(const std::string& mname, std::vector<INTERP_KERNEL::NormalizedCellType>& types, std::vector< std::vector<TypeOfField> >& typesF,
326         std::vector< std::vector<std::string> >& pfls, std::vector< std::vector<std::string> >& locs) const;
327     MEDLOADER_EXPORT MEDFileFieldPerMeshPerTypePerDisc *getLeafGivenMeshAndTypeAndLocId(const std::string& mName, INTERP_KERNEL::NormalizedCellType typ, int locId);
328     MEDLOADER_EXPORT const MEDFileFieldPerMeshPerTypePerDisc *getLeafGivenMeshAndTypeAndLocId(const std::string& mName, INTERP_KERNEL::NormalizedCellType typ, int locId) const;
329     MEDLOADER_EXPORT int getNonEmptyLevels(const std::string& mname, std::vector<int>& levs) const;
330     MEDLOADER_EXPORT void convertMedBallIntoClassic();
331     MEDLOADER_EXPORT void makeReduction(INTERP_KERNEL::NormalizedCellType ct, TypeOfField tof, const DataArrayIdType *pfl);
332     MEDLOADER_EXPORT virtual MEDFileAnyTypeField1TS *extractPart(const std::map<int, MCAuto<DataArrayIdType> >& extractDef, MEDFileMesh *mm) const = 0;
333     MEDLOADER_EXPORT virtual MEDFileAnyTypeField1TS *shallowCpy() const = 0;
334   public:
335     MEDLOADER_EXPORT void loadArrays();
336     MEDLOADER_EXPORT void loadArraysIfNecessary();
337     MEDLOADER_EXPORT void unloadArrays();
338     MEDLOADER_EXPORT void unloadArraysWithoutDataLoss();
339     MEDLOADER_EXPORT std::vector< MCAuto< MEDFileAnyTypeField1TS > > splitComponents() const;
340     MEDLOADER_EXPORT std::vector< MCAuto< MEDFileAnyTypeField1TS > > splitDiscretizations() const;
341     MEDLOADER_EXPORT std::vector< MCAuto< MEDFileAnyTypeField1TS > > splitMultiDiscrPerGeoTypes() const;
342     MEDLOADER_EXPORT MEDFileAnyTypeField1TS *deepCopy() const;
343     MEDLOADER_EXPORT mcIdType copyTinyInfoFrom(const MEDCouplingFieldDouble *field, const DataArray *arr);
344     MEDLOADER_EXPORT mcIdType copyTinyInfoFrom(const TimeHolder *th, const MEDCouplingFieldTemplate *field, const DataArray *arr);
345   public:
346     //! underground method see MEDFileField1TSWithoutSDA::setProfileNameOnLeaf
347     MEDLOADER_EXPORT void setProfileNameOnLeaf(const std::string& mName, INTERP_KERNEL::NormalizedCellType typ, int locId, const std::string& newPflName, bool forceRenameOnGlob=false);
348     //! underground method see MEDFileField1TSWithoutSDA::setLocNameOnLeaf
349     MEDLOADER_EXPORT void setLocNameOnLeaf(const std::string& mName, INTERP_KERNEL::NormalizedCellType typ, int locId, const std::string& newLocName, bool forceRenameOnGlob=false);
350     MEDLOADER_EXPORT std::size_t getHeapMemorySizeWithoutChildren() const;
351     MEDLOADER_EXPORT std::vector<const BigMemoryObject *> getDirectChildrenWithNull() const;
352     MEDLOADER_EXPORT std::vector<std::string> getPflsReallyUsed() const;
353     MEDLOADER_EXPORT std::vector<std::string> getLocsReallyUsed() const;
354     MEDLOADER_EXPORT std::vector<std::string> getPflsReallyUsedMulti() const;
355     MEDLOADER_EXPORT std::vector<std::string> getLocsReallyUsedMulti() const;
356     MEDLOADER_EXPORT void changePflsRefsNamesGen(const std::vector< std::pair<std::vector<std::string>, std::string > >& mapOfModif);
357     MEDLOADER_EXPORT void changeLocsRefsNamesGen(const std::vector< std::pair<std::vector<std::string>, std::string > >& mapOfModif);
358   public:
359     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);
360     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);
361   public:
362     MEDLOADER_EXPORT virtual med_field_type getMEDFileFieldType() const = 0;
363     MEDLOADER_EXPORT MEDFileAnyTypeField1TSWithoutSDA *contentNotNullBase();
364     MEDLOADER_EXPORT const MEDFileAnyTypeField1TSWithoutSDA *contentNotNullBase() const;
365   protected:
366     MCAuto<MEDFileAnyTypeField1TSWithoutSDA> _content;
367   };
368
369   class MEDFileInt32Field1TS;
370
371   template<class T>
372   class MEDFileTemplateField1TS : public MEDFileAnyTypeField1TS
373   {
374   public:
375     MEDLOADER_EXPORT static typename MLFieldTraits<T>::F1TSType *New();
376     MEDLOADER_EXPORT static typename MLFieldTraits<T>::F1TSType *New(const std::string& fileName, bool loadAll=true);
377     MEDLOADER_EXPORT static typename MLFieldTraits<T>::F1TSType *New(med_idt fid, bool loadAll=true);
378     MEDLOADER_EXPORT static typename MLFieldTraits<T>::F1TSType *New(DataArrayByte *db) { return BuildFromMemoryChunk<typename MLFieldTraits<T>::F1TSType>(db); }
379     MEDLOADER_EXPORT static typename MLFieldTraits<T>::F1TSType *New(const std::string& fileName, const std::string& fieldName, bool loadAll=true);
380     MEDLOADER_EXPORT static typename MLFieldTraits<T>::F1TSType *New(med_idt fid, const std::string& fieldName, bool loadAll=true);
381     MEDLOADER_EXPORT static typename MLFieldTraits<T>::F1TSType *New(const std::string& fileName, const std::string& fieldName, int iteration, int order, bool loadAll=true);
382     MEDLOADER_EXPORT static typename MLFieldTraits<T>::F1TSType *New(med_idt fid, const std::string& fieldName, int iteration, int order, bool loadAll=true);
383     MEDLOADER_EXPORT static typename MLFieldTraits<T>::F1TSType *New(const typename MLFieldTraits<T>::F1TSWSDAType& other, bool shallowCopyOfContent);
384
385   public:
386     MEDLOADER_EXPORT static typename Traits<T>::ArrayType *ReturnSafelyTypedDataArray(MCAuto<DataArray>& arr);
387     MEDLOADER_EXPORT typename Traits<T>::ArrayType *getFieldWithProfile(TypeOfField type, int meshDimRelToMax, const MEDFileMesh *mesh, DataArrayIdType *&pfl) const;
388     MEDLOADER_EXPORT void setArray(DataArray *arr);
389     MEDLOADER_EXPORT typename Traits<T>::ArrayType *getUndergroundDataArray() const;
390     MEDLOADER_EXPORT typename Traits<T>::ArrayType *getUndergroundDataArrayExt(std::vector< std::pair<std::pair<INTERP_KERNEL::NormalizedCellType,int>,std::pair<mcIdType,mcIdType> > >& entries) const;
391     MEDLOADER_EXPORT static MCAuto<typename Traits<T>::FieldType> SetDataArrayInField(MEDCouplingFieldDouble *f, MCAuto<DataArray>& arr);
392     MEDLOADER_EXPORT static MCAuto<MEDCouplingFieldDouble> ToFieldTemplateWithTime(const typename Traits<T>::FieldType *f);
393   public:
394     MEDLOADER_EXPORT void copyTimeInfoFrom(const typename Traits<T>::FieldType *mcf);
395     MEDLOADER_EXPORT typename Traits<T>::FieldType *field(const MEDFileMesh *mesh) const;
396     MEDLOADER_EXPORT typename Traits<T>::FieldType *getFieldAtLevel(TypeOfField type, int meshDimRelToMax, int renumPol=0) const;
397     MEDLOADER_EXPORT typename Traits<T>::FieldType *getFieldAtTopLevel(TypeOfField type, int renumPol=0) const;
398     MEDLOADER_EXPORT typename Traits<T>::FieldType *getFieldOnMeshAtLevel(TypeOfField type, int meshDimRelToMax, const MEDFileMesh *mesh, int renumPol=0) const;
399     MEDLOADER_EXPORT typename Traits<T>::FieldType *getFieldOnMeshAtLevel(TypeOfField type, const MEDCouplingMesh *mesh, int renumPol=0) const;
400     MEDLOADER_EXPORT typename Traits<T>::FieldType *getFieldAtLevelOld(TypeOfField type, const std::string& mname, int meshDimRelToMax, int renumPol=0) const;
401     MEDLOADER_EXPORT void setFieldNoProfileSBT(const typename Traits<T>::FieldType *field);
402     MEDLOADER_EXPORT void setFieldProfile(const typename Traits<T>::FieldType *field, const MEDFileMesh *mesh, int meshDimRelToMax, const DataArrayIdType *profile);
403     MEDLOADER_EXPORT void setFieldProfileFlatly(const typename Traits<T>::FieldType *field, const MEDFileMesh *mesh, int meshDimRelToMax, const DataArrayIdType *profile);
404     MEDLOADER_EXPORT typename MLFieldTraits<T>::F1TSType *extractPartImpl(const std::map<int, MCAuto<DataArrayIdType> >& extractDef, MEDFileMesh *mm) const;
405     MEDLOADER_EXPORT MEDFileAnyTypeField1TS *extractPart(const std::map<int, MCAuto<DataArrayIdType> >& extractDef, MEDFileMesh *mm) const { return this->extractPartImpl(extractDef,mm); }
406   protected:
407     ~MEDFileTemplateField1TS() { }
408     MEDFileTemplateField1TS();
409     MEDFileTemplateField1TS(med_idt fid, bool loadAll, const MEDFileMeshes *ms):MEDFileAnyTypeField1TS(fid,loadAll,ms) { }
410     MEDFileTemplateField1TS(med_idt fid, const std::string& fieldName, bool loadAll, const MEDFileMeshes *ms):MEDFileAnyTypeField1TS(fid,fieldName,loadAll,ms) { }
411     MEDFileTemplateField1TS(med_idt fid, const std::string& fieldName, int iteration, int order, bool loadAll, const MEDFileMeshes *ms):MEDFileAnyTypeField1TS(fid,fieldName,iteration,order,loadAll,ms) { }
412     MEDFileTemplateField1TS(const typename MLFieldTraits<T>::F1TSWSDAType& other, bool shallowCopyOfContent):MEDFileAnyTypeField1TS(other,shallowCopyOfContent) { }
413     const typename MLFieldTraits<T>::F1TSWSDAType *contentNotNull() const;
414     typename MLFieldTraits<T>::F1TSWSDAType *contentNotNull();
415     void setFieldProfileGeneral(const typename Traits<T>::FieldType *field, const MEDFileMesh *mesh, int meshDimRelToMax, const DataArrayIdType *profile, bool smartPflKiller);
416   };
417
418   /*!
419    * User class.
420    */
421   class MEDFileField1TS : public MEDFileTemplateField1TS<double>
422   {
423     friend class MEDFileTemplateField1TS<double>;
424   public:
425     MEDLOADER_EXPORT MEDFileInt32Field1TS *convertToInt(bool isDeepCpyGlobs=true) const;
426     MEDLOADER_EXPORT MEDFileInt64Field1TS *convertToInt64(bool isDeepCpyGlobs=true) const;
427   public:
428     MEDLOADER_EXPORT MCAuto<MEDFileAnyTypeField1TS> buildNewEmpty() const;
429     MEDLOADER_EXPORT MEDFileField1TS *shallowCpy() const;
430     MEDLOADER_EXPORT std::vector< std::vector<DataArrayDouble *> > getFieldSplitedByType2(const std::string& mname, std::vector<INTERP_KERNEL::NormalizedCellType>& types, std::vector< std::vector<TypeOfField> >& typesF,
431                                                                                           std::vector< std::vector<std::string> >& pfls, std::vector< std::vector<std::string> >& locs) const;
432     MEDLOADER_EXPORT std::string getClassName() const override { return std::string("MEDFileField1TS"); }
433   public:
434   private:
435     med_field_type getMEDFileFieldType() const { return MED_FLOAT64; }
436   private:
437     ~MEDFileField1TS() { }
438     MEDFileField1TS(med_idt fid, bool loadAll, const MEDFileMeshes *ms);
439     MEDFileField1TS(med_idt fid, const std::string& fieldName, bool loadAll, const MEDFileMeshes *ms);
440     MEDFileField1TS(med_idt fid, const std::string& fieldName, int iteration, int order, bool loadAll, const MEDFileMeshes *ms);
441     MEDFileField1TS(const MEDFileField1TSWithoutSDA& other, bool shallowCopyOfContent);
442     MEDFileField1TS() { }
443   };
444
445   template<class T>
446   class MEDFileNDTemplateField1TS : public MEDFileTemplateField1TS<T>
447   {
448   public:
449     MEDLOADER_EXPORT MEDFileField1TS *convertToDouble(bool isDeepCpyGlobs=true) const;
450     MEDLOADER_EXPORT MEDFileField1TS *convertToInt(bool isDeepCpyGlobs=true) const;
451     MEDLOADER_EXPORT MEDFileField1TS *convertToInt64(bool isDeepCpyGlobs=true) const;
452   protected:
453     ~MEDFileNDTemplateField1TS() { }
454     MEDFileNDTemplateField1TS() { }
455     MEDFileNDTemplateField1TS(med_idt fid, bool loadAll, const MEDFileMeshes *ms):MEDFileTemplateField1TS<T>(fid,loadAll,ms) { }
456     MEDFileNDTemplateField1TS(med_idt fid, const std::string& fieldName, bool loadAll, const MEDFileMeshes *ms):MEDFileTemplateField1TS<T>(fid,fieldName,loadAll,ms) { }
457     MEDFileNDTemplateField1TS(med_idt fid, const std::string& fieldName, int iteration, int order, bool loadAll, const MEDFileMeshes *ms):MEDFileTemplateField1TS<T>(fid,fieldName,iteration,order,loadAll,ms) { }
458     MEDFileNDTemplateField1TS(const typename MLFieldTraits<T>::F1TSWSDAType& other, bool shallowCopyOfContent):MEDFileTemplateField1TS<T>(other,shallowCopyOfContent) { }
459   };
460
461   class MEDFileInt32Field1TS : public MEDFileNDTemplateField1TS<Int32>
462   {
463     friend class MEDFileTemplateField1TS<Int32>;
464   public:
465     MEDLOADER_EXPORT MCAuto<MEDFileAnyTypeField1TS> buildNewEmpty() const;
466     MEDLOADER_EXPORT MEDFileInt32Field1TS *shallowCpy() const { return new MEDFileInt32Field1TS(*this); }
467     MEDLOADER_EXPORT std::string getClassName() const override { return std::string("MEDFileInt32Field1TS"); }
468   public:
469     MEDLOADER_EXPORT static MCAuto<MEDCouplingFieldDouble> ConvertFieldIntToFieldDouble(const MEDCouplingFieldInt32 *f);
470   private:
471     med_field_type getMEDFileFieldType() const { return MED_INT32; }
472   private:
473     ~MEDFileInt32Field1TS() { }
474     MEDFileInt32Field1TS() { }
475     MEDFileInt32Field1TS(med_idt fid, bool loadAll, const MEDFileMeshes *ms):MEDFileNDTemplateField1TS<Int32>(fid,loadAll,ms) { }
476     MEDFileInt32Field1TS(med_idt fid, const std::string& fieldName, bool loadAll, const MEDFileMeshes *ms):MEDFileNDTemplateField1TS<Int32>(fid,fieldName,loadAll,ms) { }
477     MEDFileInt32Field1TS(med_idt fid, const std::string& fieldName, int iteration, int order, bool loadAll, const MEDFileMeshes *ms):MEDFileNDTemplateField1TS<Int32>(fid,fieldName,iteration,order,loadAll,ms) { }
478     /*!
479      * This constructor is a shallow copy constructor. If \a shallowCopyOfContent is true the content of \a other is shallow copied.
480      * If \a shallowCopyOfContent is false, \a other is taken to be the content of \a this.
481      *
482      * \warning this is a shallow copy constructor
483      */
484     MEDFileInt32Field1TS(const MEDFileInt32Field1TSWithoutSDA& other, bool shallowCopyOfContent):MEDFileNDTemplateField1TS<Int32>(other,shallowCopyOfContent) { }
485   };
486
487   class MEDFileInt64Field1TS : public MEDFileNDTemplateField1TS<Int64>
488   {
489     friend class MEDFileTemplateField1TS<Int64>;
490   public:
491     MEDLOADER_EXPORT MCAuto<MEDFileAnyTypeField1TS> buildNewEmpty() const;
492     MEDLOADER_EXPORT MEDFileInt64Field1TS *shallowCpy() const { return new MEDFileInt64Field1TS(*this); }
493     MEDLOADER_EXPORT std::string getClassName() const override { return std::string("MEDFileInt64Field1TS"); }
494   public:
495     MEDLOADER_EXPORT static MCAuto<MEDCouplingFieldDouble> ConvertFieldIntToFieldDouble(const MEDCouplingFieldInt64 *f);
496   private:
497     med_field_type getMEDFileFieldType() const { return MED_INT64; }
498   private:
499     ~MEDFileInt64Field1TS() { }
500     MEDFileInt64Field1TS() { }
501     MEDFileInt64Field1TS(med_idt fid, bool loadAll, const MEDFileMeshes *ms):MEDFileNDTemplateField1TS<Int64>(fid,loadAll,ms) { }
502     MEDFileInt64Field1TS(med_idt fid, const std::string& fieldName, bool loadAll, const MEDFileMeshes *ms):MEDFileNDTemplateField1TS<Int64>(fid,fieldName,loadAll,ms) { }
503     MEDFileInt64Field1TS(med_idt fid, const std::string& fieldName, int iteration, int order, bool loadAll, const MEDFileMeshes *ms):MEDFileNDTemplateField1TS<Int64>(fid,fieldName,iteration,order,loadAll,ms) { }
504     /*!
505      * This constructor is a shallow copy constructor. If \a shallowCopyOfContent is true the content of \a other is shallow copied.
506      * If \a shallowCopyOfContent is false, \a other is taken to be the content of \a this.
507      *
508      * \warning this is a shallow copy constructor
509      */
510     MEDFileInt64Field1TS(const MEDFileInt64Field1TSWithoutSDA& other, bool shallowCopyOfContent):MEDFileNDTemplateField1TS<Int64>(other,shallowCopyOfContent) { }
511   };
512
513   class MEDFileFloatField1TS : public MEDFileNDTemplateField1TS<float>
514   {
515     friend class MEDFileTemplateField1TS<float>;
516   private:
517     med_field_type getMEDFileFieldType() const { return MED_FLOAT32; }
518     MEDLOADER_EXPORT MEDFileFloatField1TS *shallowCpy() const { return new MEDFileFloatField1TS(*this); }
519     MEDLOADER_EXPORT std::string getClassName() const override { return std::string("MEDFileFloatField1TS"); }
520     MEDLOADER_EXPORT MCAuto<MEDFileAnyTypeField1TS> buildNewEmpty() const;
521   private:
522     ~MEDFileFloatField1TS() { }
523     MEDFileFloatField1TS() { }
524     MEDFileFloatField1TS(med_idt fid, bool loadAll, const MEDFileMeshes *ms):MEDFileNDTemplateField1TS<float>(fid,loadAll,ms) { }
525     MEDFileFloatField1TS(med_idt fid, const std::string& fieldName, bool loadAll, const MEDFileMeshes *ms):MEDFileNDTemplateField1TS<float>(fid,fieldName,loadAll,ms) { }
526     MEDFileFloatField1TS(med_idt fid, const std::string& fieldName, int iteration, int order, bool loadAll, const MEDFileMeshes *ms):MEDFileNDTemplateField1TS<float>(fid,fieldName,iteration,order,loadAll,ms) { }
527     /*!
528      * This constructor is a shallow copy constructor. If \a shallowCopyOfContent is true the content of \a other is shallow copied.
529      * If \a shallowCopyOfContent is false, \a other is taken to be the content of \a this.
530      *
531      * \warning this is a shallow copy constructor
532      */
533     MEDFileFloatField1TS(const MEDFileFloatField1TSWithoutSDA& other, bool shallowCopyOfContent):MEDFileNDTemplateField1TS<float>(other,shallowCopyOfContent) { }
534   };
535 }
536
537 #endif