Salome HOME
Unwarningization under Win.
[tools/medcoupling.git] / src / MEDCoupling / MEDCouplingTimeDiscretization.hxx
1 // Copyright (C) 2007-2013  CEA/DEN, EDF R&D
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.
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 (CEA/DEN)
20
21 #ifndef __PARAMEDMEM_MEDCOUPLINGTIMEDISCRETIZATION_HXX__
22 #define __PARAMEDMEM_MEDCOUPLINGTIMEDISCRETIZATION_HXX__
23
24 #include "MEDCoupling.hxx"
25 #include "MEDCouplingTimeLabel.hxx"
26 #include "MEDCouplingRefCountObject.hxx"
27 #include "InterpKernelException.hxx"
28
29 #include <vector>
30
31 namespace ParaMEDMEM
32 {
33   class MEDCouplingMesh;
34   class DataArrayDouble;
35   class TimeLabel;
36
37   class MEDCouplingTimeDiscretization : public TimeLabel, public BigMemoryObject
38   {
39   protected:
40     MEDCOUPLING_EXPORT MEDCouplingTimeDiscretization();
41     MEDCOUPLING_EXPORT MEDCouplingTimeDiscretization(const MEDCouplingTimeDiscretization& other, bool deepCpy);
42   public:
43     MEDCOUPLING_EXPORT void updateTime() const;
44     MEDCOUPLING_EXPORT virtual std::size_t getHeapMemorySizeWithoutChildren() const;
45     MEDCOUPLING_EXPORT virtual std::vector<const BigMemoryObject *> getDirectChildren() const;
46     MEDCOUPLING_EXPORT static MEDCouplingTimeDiscretization *New(TypeOfTimeDiscretization type) throw(INTERP_KERNEL::Exception);
47     MEDCOUPLING_EXPORT void setTimeUnit(const char *unit) { _time_unit=unit; }
48     MEDCOUPLING_EXPORT const char *getTimeUnit() const { return _time_unit.c_str(); }
49     MEDCOUPLING_EXPORT virtual void copyTinyAttrFrom(const MEDCouplingTimeDiscretization& other) throw(INTERP_KERNEL::Exception);
50     MEDCOUPLING_EXPORT virtual void copyTinyStringsFrom(const MEDCouplingTimeDiscretization& other) throw(INTERP_KERNEL::Exception);
51     MEDCOUPLING_EXPORT virtual void checkCoherency() const throw(INTERP_KERNEL::Exception);
52     MEDCOUPLING_EXPORT virtual bool areCompatible(const MEDCouplingTimeDiscretization *other) const throw(INTERP_KERNEL::Exception);
53     MEDCOUPLING_EXPORT virtual bool areStrictlyCompatible(const MEDCouplingTimeDiscretization *other, std::string& reason) const throw(INTERP_KERNEL::Exception);
54     MEDCOUPLING_EXPORT virtual bool areStrictlyCompatibleForMul(const MEDCouplingTimeDiscretization *other) const throw(INTERP_KERNEL::Exception);
55     MEDCOUPLING_EXPORT virtual bool areStrictlyCompatibleForDiv(const MEDCouplingTimeDiscretization *other) const throw(INTERP_KERNEL::Exception);
56     MEDCOUPLING_EXPORT virtual bool areCompatibleForMeld(const MEDCouplingTimeDiscretization *other) const throw(INTERP_KERNEL::Exception);
57     MEDCOUPLING_EXPORT virtual bool isEqualIfNotWhy(const MEDCouplingTimeDiscretization *other, double prec, std::string& reason) const throw(INTERP_KERNEL::Exception);
58     MEDCOUPLING_EXPORT virtual bool isEqual(const MEDCouplingTimeDiscretization *other, double prec) const throw(INTERP_KERNEL::Exception);
59     MEDCOUPLING_EXPORT virtual bool isEqualWithoutConsideringStr(const MEDCouplingTimeDiscretization *other, double prec) const throw(INTERP_KERNEL::Exception);
60     MEDCOUPLING_EXPORT virtual MEDCouplingTimeDiscretization *buildNewTimeReprFromThis(TypeOfTimeDiscretization type, bool deepCpy) const throw(INTERP_KERNEL::Exception);
61     MEDCOUPLING_EXPORT virtual std::string getStringRepr() const throw(INTERP_KERNEL::Exception) = 0;
62     MEDCOUPLING_EXPORT virtual TypeOfTimeDiscretization getEnum() const throw(INTERP_KERNEL::Exception) = 0;
63     MEDCOUPLING_EXPORT virtual void synchronizeTimeWith(const MEDCouplingMesh *mesh) throw(INTERP_KERNEL::Exception) = 0;
64     MEDCOUPLING_EXPORT virtual MEDCouplingTimeDiscretization *aggregate(const MEDCouplingTimeDiscretization *other) const throw(INTERP_KERNEL::Exception) = 0;
65     MEDCOUPLING_EXPORT virtual MEDCouplingTimeDiscretization *aggregate(const std::vector<const MEDCouplingTimeDiscretization *>& other) const throw(INTERP_KERNEL::Exception) = 0;
66     MEDCOUPLING_EXPORT virtual MEDCouplingTimeDiscretization *meld(const MEDCouplingTimeDiscretization *other) const throw(INTERP_KERNEL::Exception) = 0;
67     MEDCOUPLING_EXPORT virtual MEDCouplingTimeDiscretization *dot(const MEDCouplingTimeDiscretization *other) const throw(INTERP_KERNEL::Exception) = 0;
68     MEDCOUPLING_EXPORT virtual MEDCouplingTimeDiscretization *crossProduct(const MEDCouplingTimeDiscretization *other) const throw(INTERP_KERNEL::Exception) = 0;
69     MEDCOUPLING_EXPORT virtual MEDCouplingTimeDiscretization *max(const MEDCouplingTimeDiscretization *other) const throw(INTERP_KERNEL::Exception) = 0;
70     MEDCOUPLING_EXPORT virtual MEDCouplingTimeDiscretization *min(const MEDCouplingTimeDiscretization *other) const throw(INTERP_KERNEL::Exception) = 0;
71     MEDCOUPLING_EXPORT virtual MEDCouplingTimeDiscretization *add(const MEDCouplingTimeDiscretization *other) const throw(INTERP_KERNEL::Exception) = 0;
72     MEDCOUPLING_EXPORT virtual void addEqual(const MEDCouplingTimeDiscretization *other) throw(INTERP_KERNEL::Exception) = 0;
73     MEDCOUPLING_EXPORT virtual MEDCouplingTimeDiscretization *substract(const MEDCouplingTimeDiscretization *other) const throw(INTERP_KERNEL::Exception) = 0;
74     MEDCOUPLING_EXPORT virtual void substractEqual(const MEDCouplingTimeDiscretization *other) throw(INTERP_KERNEL::Exception) = 0;
75     MEDCOUPLING_EXPORT virtual MEDCouplingTimeDiscretization *multiply(const MEDCouplingTimeDiscretization *other) const throw(INTERP_KERNEL::Exception) = 0;
76     MEDCOUPLING_EXPORT virtual void multiplyEqual(const MEDCouplingTimeDiscretization *other) throw(INTERP_KERNEL::Exception) = 0;
77     MEDCOUPLING_EXPORT virtual MEDCouplingTimeDiscretization *divide(const MEDCouplingTimeDiscretization *other) const throw(INTERP_KERNEL::Exception) = 0;
78     MEDCOUPLING_EXPORT virtual void divideEqual(const MEDCouplingTimeDiscretization *other) throw(INTERP_KERNEL::Exception) = 0;
79     MEDCOUPLING_EXPORT virtual MEDCouplingTimeDiscretization *pow(const MEDCouplingTimeDiscretization *other) const throw(INTERP_KERNEL::Exception) = 0;
80     MEDCOUPLING_EXPORT virtual void powEqual(const MEDCouplingTimeDiscretization *other) throw(INTERP_KERNEL::Exception) = 0;
81     MEDCOUPLING_EXPORT virtual void getTinySerializationIntInformation(std::vector<int>& tinyInfo) const throw(INTERP_KERNEL::Exception);
82     MEDCOUPLING_EXPORT virtual void getTinySerializationDbleInformation(std::vector<double>& tinyInfo) const throw(INTERP_KERNEL::Exception);
83     MEDCOUPLING_EXPORT virtual void getTinySerializationStrInformation(std::vector<std::string>& tinyInfo) const throw(INTERP_KERNEL::Exception);
84     MEDCOUPLING_EXPORT virtual void resizeForUnserialization(const std::vector<int>& tinyInfoI, std::vector<DataArrayDouble *>& arrays) throw(INTERP_KERNEL::Exception);
85     MEDCOUPLING_EXPORT virtual void finishUnserialization(const std::vector<int>& tinyInfoI, const std::vector<double>& tinyInfoD, const std::vector<std::string>& tinyInfoS) throw(INTERP_KERNEL::Exception);
86     MEDCOUPLING_EXPORT virtual void getTinySerializationIntInformation2(std::vector<int>& tinyInfo) const throw(INTERP_KERNEL::Exception) = 0;
87     MEDCOUPLING_EXPORT virtual void getTinySerializationDbleInformation2(std::vector<double>& tinyInfo) const throw(INTERP_KERNEL::Exception) = 0;
88     MEDCOUPLING_EXPORT virtual void finishUnserialization2(const std::vector<int>& tinyInfoI, const std::vector<double>& tinyInfoD) throw(INTERP_KERNEL::Exception) = 0;
89     MEDCOUPLING_EXPORT virtual MEDCouplingTimeDiscretization *performCpy(bool deepCpy) const throw(INTERP_KERNEL::Exception) = 0;
90     MEDCOUPLING_EXPORT void setTimeTolerance(double val) { _time_tolerance=val; }
91     MEDCOUPLING_EXPORT double getTimeTolerance() const { return _time_tolerance; }
92     MEDCOUPLING_EXPORT virtual void checkNoTimePresence() const throw(INTERP_KERNEL::Exception) = 0;
93     MEDCOUPLING_EXPORT virtual void checkTimePresence(double time) const throw(INTERP_KERNEL::Exception) = 0;
94     MEDCOUPLING_EXPORT virtual void setArray(DataArrayDouble *array, TimeLabel *owner) throw(INTERP_KERNEL::Exception);
95     MEDCOUPLING_EXPORT virtual void setEndArray(DataArrayDouble *array, TimeLabel *owner) throw(INTERP_KERNEL::Exception);
96     MEDCOUPLING_EXPORT virtual void setArrays(const std::vector<DataArrayDouble *>& arrays, TimeLabel *owner) throw(INTERP_KERNEL::Exception);
97     MEDCOUPLING_EXPORT DataArrayDouble *getArray() throw(INTERP_KERNEL::Exception) { return _array; }
98     MEDCOUPLING_EXPORT const DataArrayDouble *getArray() const throw(INTERP_KERNEL::Exception) { return _array; }
99     MEDCOUPLING_EXPORT virtual const DataArrayDouble *getEndArray() const throw(INTERP_KERNEL::Exception);
100     MEDCOUPLING_EXPORT virtual DataArrayDouble *getEndArray() throw(INTERP_KERNEL::Exception);
101     MEDCOUPLING_EXPORT virtual std::vector< const DataArrayDouble *> getArraysForTime(double time) const throw(INTERP_KERNEL::Exception) = 0;
102     MEDCOUPLING_EXPORT virtual void getValueForTime(double time, const std::vector<double>& vals, double *res) const throw(INTERP_KERNEL::Exception) = 0; 
103     MEDCOUPLING_EXPORT virtual void getArrays(std::vector<DataArrayDouble *>& arrays) const throw(INTERP_KERNEL::Exception);
104     MEDCOUPLING_EXPORT virtual bool isBefore(const MEDCouplingTimeDiscretization *other) const throw(INTERP_KERNEL::Exception);
105     MEDCOUPLING_EXPORT virtual bool isStrictlyBefore(const MEDCouplingTimeDiscretization *other) const throw(INTERP_KERNEL::Exception);
106     MEDCOUPLING_EXPORT double getTime(int& iteration, int& order) const throw(INTERP_KERNEL::Exception) { return getStartTime(iteration,order); }
107     MEDCOUPLING_EXPORT virtual double getStartTime(int& iteration, int& order) const throw(INTERP_KERNEL::Exception) = 0;
108     MEDCOUPLING_EXPORT virtual double getEndTime(int& iteration, int& order) const throw(INTERP_KERNEL::Exception) = 0;
109     MEDCOUPLING_EXPORT void setTime(double time, int iteration, int order) throw(INTERP_KERNEL::Exception) { setStartTime(time,iteration,order); }
110     MEDCOUPLING_EXPORT void setIteration(int it) throw(INTERP_KERNEL::Exception) { setStartIteration(it); }
111     MEDCOUPLING_EXPORT void setOrder(int order) throw(INTERP_KERNEL::Exception) { setStartOrder(order); }
112     MEDCOUPLING_EXPORT void setTimeValue(double val) throw(INTERP_KERNEL::Exception) { setStartTimeValue(val); }
113     MEDCOUPLING_EXPORT virtual void setStartIteration(int it) throw(INTERP_KERNEL::Exception) = 0;
114     MEDCOUPLING_EXPORT virtual void setEndIteration(int it) throw(INTERP_KERNEL::Exception) = 0;
115     MEDCOUPLING_EXPORT virtual void setStartOrder(int order) throw(INTERP_KERNEL::Exception) = 0;
116     MEDCOUPLING_EXPORT virtual void setEndOrder(int order) throw(INTERP_KERNEL::Exception) = 0;
117     MEDCOUPLING_EXPORT virtual void setStartTimeValue(double time) throw(INTERP_KERNEL::Exception) = 0;
118     MEDCOUPLING_EXPORT virtual void setEndTimeValue(double time) throw(INTERP_KERNEL::Exception) = 0;
119     MEDCOUPLING_EXPORT virtual void setStartTime(double time, int iteration, int order) throw(INTERP_KERNEL::Exception) = 0;
120     MEDCOUPLING_EXPORT virtual void setEndTime(double time, int iteration, int order) throw(INTERP_KERNEL::Exception) = 0;
121     MEDCOUPLING_EXPORT virtual void getValueOnTime(int eltId, double time, double *value) const throw(INTERP_KERNEL::Exception) = 0;
122     MEDCOUPLING_EXPORT virtual void getValueOnDiscTime(int eltId, int iteration, int order, double *value) const throw(INTERP_KERNEL::Exception) = 0;
123     //
124     MEDCOUPLING_EXPORT virtual MEDCouplingTimeDiscretization *doublyContractedProduct() const throw(INTERP_KERNEL::Exception);
125     MEDCOUPLING_EXPORT virtual MEDCouplingTimeDiscretization *determinant() const throw(INTERP_KERNEL::Exception);
126     MEDCOUPLING_EXPORT virtual MEDCouplingTimeDiscretization *eigenValues() const throw(INTERP_KERNEL::Exception);
127     MEDCOUPLING_EXPORT virtual MEDCouplingTimeDiscretization *eigenVectors() const throw(INTERP_KERNEL::Exception);
128     MEDCOUPLING_EXPORT virtual MEDCouplingTimeDiscretization *inverse() const throw(INTERP_KERNEL::Exception);
129     MEDCOUPLING_EXPORT virtual MEDCouplingTimeDiscretization *trace() const throw(INTERP_KERNEL::Exception);
130     MEDCOUPLING_EXPORT virtual MEDCouplingTimeDiscretization *deviator() const throw(INTERP_KERNEL::Exception);
131     MEDCOUPLING_EXPORT virtual MEDCouplingTimeDiscretization *magnitude() const throw(INTERP_KERNEL::Exception);
132     MEDCOUPLING_EXPORT virtual MEDCouplingTimeDiscretization *negate() const throw(INTERP_KERNEL::Exception);
133     MEDCOUPLING_EXPORT virtual MEDCouplingTimeDiscretization *maxPerTuple() const throw(INTERP_KERNEL::Exception);
134     MEDCOUPLING_EXPORT virtual MEDCouplingTimeDiscretization *keepSelectedComponents(const std::vector<int>& compoIds) const throw(INTERP_KERNEL::Exception);
135     MEDCOUPLING_EXPORT virtual void setSelectedComponents(const MEDCouplingTimeDiscretization *other, const std::vector<int>& compoIds) throw(INTERP_KERNEL::Exception);
136     MEDCOUPLING_EXPORT virtual void changeNbOfComponents(int newNbOfComp, double dftValue) throw(INTERP_KERNEL::Exception);
137     MEDCOUPLING_EXPORT virtual void sortPerTuple(bool asc) throw(INTERP_KERNEL::Exception);
138     MEDCOUPLING_EXPORT virtual void setUniformValue(int nbOfTuple, int nbOfCompo, double value) throw(INTERP_KERNEL::Exception);
139     MEDCOUPLING_EXPORT virtual void setOrCreateUniformValueOnAllComponents(int nbOfTuple, double value) throw(INTERP_KERNEL::Exception);
140     MEDCOUPLING_EXPORT virtual void applyLin(double a, double b, int compoId) throw(INTERP_KERNEL::Exception);
141     MEDCOUPLING_EXPORT virtual void applyFunc(int nbOfComp, FunctionToEvaluate func) throw(INTERP_KERNEL::Exception);
142     MEDCOUPLING_EXPORT virtual void applyFunc(int nbOfComp, const char *func) throw(INTERP_KERNEL::Exception);
143     MEDCOUPLING_EXPORT virtual void applyFunc2(int nbOfComp, const char *func) throw(INTERP_KERNEL::Exception);
144     MEDCOUPLING_EXPORT virtual void applyFunc3(int nbOfComp, const std::vector<std::string>& varsOrder, const char *func) throw(INTERP_KERNEL::Exception);
145     MEDCOUPLING_EXPORT virtual void applyFunc(const char *func) throw(INTERP_KERNEL::Exception);
146     MEDCOUPLING_EXPORT virtual void applyFuncFast32(const char *func) throw(INTERP_KERNEL::Exception);
147     MEDCOUPLING_EXPORT virtual void applyFuncFast64(const char *func) throw(INTERP_KERNEL::Exception);
148     MEDCOUPLING_EXPORT virtual void fillFromAnalytic(const DataArrayDouble *loc, int nbOfComp, FunctionToEvaluate func) throw(INTERP_KERNEL::Exception);
149     MEDCOUPLING_EXPORT virtual void fillFromAnalytic(const DataArrayDouble *loc, int nbOfComp, const char *func) throw(INTERP_KERNEL::Exception);
150     MEDCOUPLING_EXPORT virtual void fillFromAnalytic2(const DataArrayDouble *loc, int nbOfComp, const char *func) throw(INTERP_KERNEL::Exception);
151     MEDCOUPLING_EXPORT virtual void fillFromAnalytic3(const DataArrayDouble *loc, int nbOfComp, const std::vector<std::string>& varsOrder, const char *func) throw(INTERP_KERNEL::Exception);
152     //
153     MEDCOUPLING_EXPORT virtual ~MEDCouplingTimeDiscretization();
154   protected:
155     std::string _time_unit;
156     double _time_tolerance;
157     DataArrayDouble *_array;
158   protected:
159     static const double TIME_TOLERANCE_DFT;
160   };
161
162   class MEDCouplingNoTimeLabel : public MEDCouplingTimeDiscretization
163   {
164   public:
165     MEDCOUPLING_EXPORT MEDCouplingNoTimeLabel();
166     MEDCOUPLING_EXPORT MEDCouplingNoTimeLabel(const MEDCouplingTimeDiscretization& other, bool deepCpy);
167     MEDCOUPLING_EXPORT std::string getStringRepr() const throw(INTERP_KERNEL::Exception);
168     MEDCOUPLING_EXPORT TypeOfTimeDiscretization getEnum() const throw(INTERP_KERNEL::Exception) { return DISCRETIZATION; }
169     MEDCOUPLING_EXPORT void synchronizeTimeWith(const MEDCouplingMesh *mesh) throw(INTERP_KERNEL::Exception);
170     MEDCOUPLING_EXPORT MEDCouplingTimeDiscretization *aggregate(const MEDCouplingTimeDiscretization *other) const throw(INTERP_KERNEL::Exception);
171     MEDCOUPLING_EXPORT MEDCouplingTimeDiscretization *aggregate(const std::vector<const MEDCouplingTimeDiscretization *>& other) const throw(INTERP_KERNEL::Exception);
172     MEDCOUPLING_EXPORT MEDCouplingTimeDiscretization *meld(const MEDCouplingTimeDiscretization *other) const throw(INTERP_KERNEL::Exception);
173     MEDCOUPLING_EXPORT MEDCouplingTimeDiscretization *dot(const MEDCouplingTimeDiscretization *other) const throw(INTERP_KERNEL::Exception);
174     MEDCOUPLING_EXPORT MEDCouplingTimeDiscretization *crossProduct(const MEDCouplingTimeDiscretization *other) const throw(INTERP_KERNEL::Exception);
175     MEDCOUPLING_EXPORT MEDCouplingTimeDiscretization *max(const MEDCouplingTimeDiscretization *other) const throw(INTERP_KERNEL::Exception);
176     MEDCOUPLING_EXPORT MEDCouplingTimeDiscretization *min(const MEDCouplingTimeDiscretization *other) const throw(INTERP_KERNEL::Exception);
177     MEDCOUPLING_EXPORT MEDCouplingTimeDiscretization *add(const MEDCouplingTimeDiscretization *other) const throw(INTERP_KERNEL::Exception);
178     MEDCOUPLING_EXPORT void addEqual(const MEDCouplingTimeDiscretization *other) throw(INTERP_KERNEL::Exception);
179     MEDCOUPLING_EXPORT MEDCouplingTimeDiscretization *substract(const MEDCouplingTimeDiscretization *other) const throw(INTERP_KERNEL::Exception);
180     MEDCOUPLING_EXPORT void substractEqual(const MEDCouplingTimeDiscretization *other) throw(INTERP_KERNEL::Exception);
181     MEDCOUPLING_EXPORT MEDCouplingTimeDiscretization *multiply(const MEDCouplingTimeDiscretization *other) const throw(INTERP_KERNEL::Exception);
182     MEDCOUPLING_EXPORT void multiplyEqual(const MEDCouplingTimeDiscretization *other) throw(INTERP_KERNEL::Exception);
183     MEDCOUPLING_EXPORT MEDCouplingTimeDiscretization *divide(const MEDCouplingTimeDiscretization *other) const throw(INTERP_KERNEL::Exception);
184     MEDCOUPLING_EXPORT void divideEqual(const MEDCouplingTimeDiscretization *other) throw(INTERP_KERNEL::Exception);
185     MEDCOUPLING_EXPORT MEDCouplingTimeDiscretization *pow(const MEDCouplingTimeDiscretization *other) const throw(INTERP_KERNEL::Exception);
186     MEDCOUPLING_EXPORT void powEqual(const MEDCouplingTimeDiscretization *other) throw(INTERP_KERNEL::Exception);
187     MEDCOUPLING_EXPORT bool isEqualIfNotWhy(const MEDCouplingTimeDiscretization *other, double prec, std::string& reason) const throw(INTERP_KERNEL::Exception);
188     MEDCOUPLING_EXPORT bool isEqualWithoutConsideringStr(const MEDCouplingTimeDiscretization *other, double prec) const throw(INTERP_KERNEL::Exception);
189     MEDCOUPLING_EXPORT bool areCompatible(const MEDCouplingTimeDiscretization *other) const throw(INTERP_KERNEL::Exception);
190     MEDCOUPLING_EXPORT bool areStrictlyCompatible(const MEDCouplingTimeDiscretization *other, std::string& reason) const throw(INTERP_KERNEL::Exception);
191     MEDCOUPLING_EXPORT bool areStrictlyCompatibleForMul(const MEDCouplingTimeDiscretization *other) const throw(INTERP_KERNEL::Exception);
192     MEDCOUPLING_EXPORT bool areStrictlyCompatibleForDiv(const MEDCouplingTimeDiscretization *other) const throw(INTERP_KERNEL::Exception);
193     MEDCOUPLING_EXPORT bool areCompatibleForMeld(const MEDCouplingTimeDiscretization *other) const throw(INTERP_KERNEL::Exception);
194     MEDCOUPLING_EXPORT MEDCouplingTimeDiscretization *performCpy(bool deepCpy) const throw(INTERP_KERNEL::Exception);
195     MEDCOUPLING_EXPORT void checkNoTimePresence() const throw(INTERP_KERNEL::Exception) { }
196     MEDCOUPLING_EXPORT void checkTimePresence(double time) const throw(INTERP_KERNEL::Exception);
197     MEDCOUPLING_EXPORT std::vector< const DataArrayDouble *> getArraysForTime(double time) const throw(INTERP_KERNEL::Exception);
198     MEDCOUPLING_EXPORT void getValueForTime(double time, const std::vector<double>& vals, double *res) const throw(INTERP_KERNEL::Exception);
199     MEDCOUPLING_EXPORT bool isBefore(const MEDCouplingTimeDiscretization *other) const throw(INTERP_KERNEL::Exception);
200     MEDCOUPLING_EXPORT bool isStrictlyBefore(const MEDCouplingTimeDiscretization *other) const throw(INTERP_KERNEL::Exception);
201     MEDCOUPLING_EXPORT double getStartTime(int& iteration, int& order) const throw(INTERP_KERNEL::Exception);
202     MEDCOUPLING_EXPORT double getEndTime(int& iteration, int& order) const throw(INTERP_KERNEL::Exception);
203     MEDCOUPLING_EXPORT void setStartIteration(int it) throw(INTERP_KERNEL::Exception);
204     MEDCOUPLING_EXPORT void setEndIteration(int it) throw(INTERP_KERNEL::Exception);
205     MEDCOUPLING_EXPORT void setStartOrder(int order) throw(INTERP_KERNEL::Exception);
206     MEDCOUPLING_EXPORT void setEndOrder(int order) throw(INTERP_KERNEL::Exception);
207     MEDCOUPLING_EXPORT void setStartTimeValue(double time) throw(INTERP_KERNEL::Exception);
208     MEDCOUPLING_EXPORT void setEndTimeValue(double time) throw(INTERP_KERNEL::Exception);
209     MEDCOUPLING_EXPORT void setStartTime(double time, int iteration, int order) throw(INTERP_KERNEL::Exception);
210     MEDCOUPLING_EXPORT void setEndTime(double time, int iteration, int order) throw(INTERP_KERNEL::Exception);
211     MEDCOUPLING_EXPORT void getValueOnTime(int eltId, double time, double *value) const throw(INTERP_KERNEL::Exception);
212     MEDCOUPLING_EXPORT void getValueOnDiscTime(int eltId, int iteration, int order, double *value) const throw(INTERP_KERNEL::Exception);
213     MEDCOUPLING_EXPORT void getTinySerializationIntInformation2(std::vector<int>& tinyInfo) const throw(INTERP_KERNEL::Exception);
214     MEDCOUPLING_EXPORT void getTinySerializationDbleInformation2(std::vector<double>& tinyInfo) const throw(INTERP_KERNEL::Exception);
215     MEDCOUPLING_EXPORT void finishUnserialization2(const std::vector<int>& tinyInfoI, const std::vector<double>& tinyInfoD) throw(INTERP_KERNEL::Exception);
216   public:
217     static const TypeOfTimeDiscretization DISCRETIZATION=NO_TIME;
218     MEDCOUPLING_EXPORT static const char REPR[];
219   private:
220     static const char EXCEPTION_MSG[];
221   };
222
223   class MEDCouplingWithTimeStep : public MEDCouplingTimeDiscretization
224   {
225   protected:
226     MEDCOUPLING_EXPORT MEDCouplingWithTimeStep(const MEDCouplingWithTimeStep& other, bool deepCpy);
227   public:
228     MEDCOUPLING_EXPORT MEDCouplingWithTimeStep();
229     MEDCOUPLING_EXPORT std::string getStringRepr() const throw(INTERP_KERNEL::Exception);
230     MEDCOUPLING_EXPORT void copyTinyAttrFrom(const MEDCouplingTimeDiscretization& other) throw(INTERP_KERNEL::Exception);
231     MEDCOUPLING_EXPORT TypeOfTimeDiscretization getEnum() const throw(INTERP_KERNEL::Exception) { return DISCRETIZATION; }
232     MEDCOUPLING_EXPORT void synchronizeTimeWith(const MEDCouplingMesh *mesh) throw(INTERP_KERNEL::Exception);
233     MEDCOUPLING_EXPORT MEDCouplingTimeDiscretization *aggregate(const MEDCouplingTimeDiscretization *other) const throw(INTERP_KERNEL::Exception);
234     MEDCOUPLING_EXPORT MEDCouplingTimeDiscretization *aggregate(const std::vector<const MEDCouplingTimeDiscretization *>& other) const throw(INTERP_KERNEL::Exception);
235     MEDCOUPLING_EXPORT MEDCouplingTimeDiscretization *meld(const MEDCouplingTimeDiscretization *other) const throw(INTERP_KERNEL::Exception);
236     MEDCOUPLING_EXPORT MEDCouplingTimeDiscretization *dot(const MEDCouplingTimeDiscretization *other) const throw(INTERP_KERNEL::Exception);
237     MEDCOUPLING_EXPORT MEDCouplingTimeDiscretization *crossProduct(const MEDCouplingTimeDiscretization *other) const throw(INTERP_KERNEL::Exception);
238     MEDCOUPLING_EXPORT MEDCouplingTimeDiscretization *max(const MEDCouplingTimeDiscretization *other) const throw(INTERP_KERNEL::Exception);
239     MEDCOUPLING_EXPORT MEDCouplingTimeDiscretization *min(const MEDCouplingTimeDiscretization *other) const throw(INTERP_KERNEL::Exception);
240     MEDCOUPLING_EXPORT MEDCouplingTimeDiscretization *add(const MEDCouplingTimeDiscretization *other) const throw(INTERP_KERNEL::Exception);
241     MEDCOUPLING_EXPORT void addEqual(const MEDCouplingTimeDiscretization *other) throw(INTERP_KERNEL::Exception);
242     MEDCOUPLING_EXPORT MEDCouplingTimeDiscretization *substract(const MEDCouplingTimeDiscretization *other) const throw(INTERP_KERNEL::Exception);
243     MEDCOUPLING_EXPORT void substractEqual(const MEDCouplingTimeDiscretization *other) throw(INTERP_KERNEL::Exception);
244     MEDCOUPLING_EXPORT MEDCouplingTimeDiscretization *multiply(const MEDCouplingTimeDiscretization *other) const throw(INTERP_KERNEL::Exception);
245     MEDCOUPLING_EXPORT void multiplyEqual(const MEDCouplingTimeDiscretization *other) throw(INTERP_KERNEL::Exception);
246     MEDCOUPLING_EXPORT MEDCouplingTimeDiscretization *divide(const MEDCouplingTimeDiscretization *other) const throw(INTERP_KERNEL::Exception);
247     MEDCOUPLING_EXPORT void divideEqual(const MEDCouplingTimeDiscretization *other) throw(INTERP_KERNEL::Exception);
248     MEDCOUPLING_EXPORT MEDCouplingTimeDiscretization *pow(const MEDCouplingTimeDiscretization *other) const throw(INTERP_KERNEL::Exception);
249     MEDCOUPLING_EXPORT void powEqual(const MEDCouplingTimeDiscretization *other) throw(INTERP_KERNEL::Exception);
250     MEDCOUPLING_EXPORT bool isEqualIfNotWhy(const MEDCouplingTimeDiscretization *other, double prec, std::string& reason) const throw(INTERP_KERNEL::Exception);
251     MEDCOUPLING_EXPORT bool isEqualWithoutConsideringStr(const MEDCouplingTimeDiscretization *other, double prec) const throw(INTERP_KERNEL::Exception);
252     MEDCOUPLING_EXPORT bool areCompatible(const MEDCouplingTimeDiscretization *other) const throw(INTERP_KERNEL::Exception);
253     MEDCOUPLING_EXPORT bool areStrictlyCompatible(const MEDCouplingTimeDiscretization *other, std::string& reason) const throw(INTERP_KERNEL::Exception);
254     MEDCOUPLING_EXPORT bool areStrictlyCompatibleForMul(const MEDCouplingTimeDiscretization *other) const throw(INTERP_KERNEL::Exception);
255     MEDCOUPLING_EXPORT bool areStrictlyCompatibleForDiv(const MEDCouplingTimeDiscretization *other) const throw(INTERP_KERNEL::Exception);
256     MEDCOUPLING_EXPORT bool areCompatibleForMeld(const MEDCouplingTimeDiscretization *other) const throw(INTERP_KERNEL::Exception);
257     MEDCOUPLING_EXPORT void getTinySerializationIntInformation(std::vector<int>& tinyInfo) const throw(INTERP_KERNEL::Exception);
258     MEDCOUPLING_EXPORT void getTinySerializationDbleInformation(std::vector<double>& tinyInfo) const throw(INTERP_KERNEL::Exception);
259     MEDCOUPLING_EXPORT void finishUnserialization(const std::vector<int>& tinyInfoI, const std::vector<double>& tinyInfoD, const std::vector<std::string>& tinyInfoS) throw(INTERP_KERNEL::Exception);
260     MEDCOUPLING_EXPORT void getTinySerializationIntInformation2(std::vector<int>& tinyInfo) const throw(INTERP_KERNEL::Exception);
261     MEDCOUPLING_EXPORT void getTinySerializationDbleInformation2(std::vector<double>& tinyInfo) const throw(INTERP_KERNEL::Exception);
262     MEDCOUPLING_EXPORT void finishUnserialization2(const std::vector<int>& tinyInfoI, const std::vector<double>& tinyInfoD) throw(INTERP_KERNEL::Exception);
263     MEDCOUPLING_EXPORT MEDCouplingTimeDiscretization *performCpy(bool deepCpy) const throw(INTERP_KERNEL::Exception);
264     MEDCOUPLING_EXPORT void checkNoTimePresence() const throw(INTERP_KERNEL::Exception);
265     MEDCOUPLING_EXPORT void checkTimePresence(double time) const throw(INTERP_KERNEL::Exception);
266     MEDCOUPLING_EXPORT void setStartTime(double time, int iteration, int order) throw(INTERP_KERNEL::Exception) { _time=time; _iteration=iteration; _order=order; }
267     MEDCOUPLING_EXPORT void setEndTime(double time, int iteration, int order) throw(INTERP_KERNEL::Exception) { _time=time; _iteration=iteration; _order=order; }
268     MEDCOUPLING_EXPORT double getStartTime(int& iteration, int& order) const throw(INTERP_KERNEL::Exception) { iteration=_iteration; order=_order; return _time; }
269     MEDCOUPLING_EXPORT double getEndTime(int& iteration, int& order) const throw(INTERP_KERNEL::Exception) { iteration=_iteration; order=_order; return _time; }
270     MEDCOUPLING_EXPORT void setStartIteration(int it) throw(INTERP_KERNEL::Exception) { _iteration=it; }
271     MEDCOUPLING_EXPORT void setEndIteration(int it) throw(INTERP_KERNEL::Exception) { _iteration=it; }
272     MEDCOUPLING_EXPORT void setStartOrder(int order) throw(INTERP_KERNEL::Exception) { _order=order; }
273     MEDCOUPLING_EXPORT void setEndOrder(int order) throw(INTERP_KERNEL::Exception) { _order=order; }
274     MEDCOUPLING_EXPORT void setStartTimeValue(double time) throw(INTERP_KERNEL::Exception) { _time=time; }
275     MEDCOUPLING_EXPORT void setEndTimeValue(double time) throw(INTERP_KERNEL::Exception) { _time=time; }
276     MEDCOUPLING_EXPORT std::vector< const DataArrayDouble *> getArraysForTime(double time) const throw(INTERP_KERNEL::Exception);
277     MEDCOUPLING_EXPORT void getValueForTime(double time, const std::vector<double>& vals, double *res) const throw(INTERP_KERNEL::Exception);
278     MEDCOUPLING_EXPORT void getValueOnTime(int eltId, double time, double *value) const throw(INTERP_KERNEL::Exception);
279     MEDCOUPLING_EXPORT void getValueOnDiscTime(int eltId, int iteration, int order, double *value) const throw(INTERP_KERNEL::Exception);
280   public:
281     static const TypeOfTimeDiscretization DISCRETIZATION=ONE_TIME;
282     MEDCOUPLING_EXPORT static const char REPR[];
283   private:
284     static const char EXCEPTION_MSG[];
285   protected:
286     double _time;
287     int _iteration;
288     int _order;
289   };
290
291   class MEDCouplingConstOnTimeInterval : public MEDCouplingTimeDiscretization
292   {
293   protected:
294     MEDCOUPLING_EXPORT MEDCouplingConstOnTimeInterval(const MEDCouplingConstOnTimeInterval& other, bool deepCpy);
295   public:
296     MEDCOUPLING_EXPORT MEDCouplingConstOnTimeInterval();
297     MEDCOUPLING_EXPORT void copyTinyAttrFrom(const MEDCouplingTimeDiscretization& other) throw(INTERP_KERNEL::Exception);
298     MEDCOUPLING_EXPORT void getTinySerializationIntInformation(std::vector<int>& tinyInfo) const throw(INTERP_KERNEL::Exception);
299     MEDCOUPLING_EXPORT void getTinySerializationDbleInformation(std::vector<double>& tinyInfo) const throw(INTERP_KERNEL::Exception);
300     MEDCOUPLING_EXPORT void finishUnserialization(const std::vector<int>& tinyInfoI, const std::vector<double>& tinyInfoD, const std::vector<std::string>& tinyInfoS) throw(INTERP_KERNEL::Exception);
301     MEDCOUPLING_EXPORT void getTinySerializationIntInformation2(std::vector<int>& tinyInfo) const throw(INTERP_KERNEL::Exception);
302     MEDCOUPLING_EXPORT void getTinySerializationDbleInformation2(std::vector<double>& tinyInfo) const throw(INTERP_KERNEL::Exception);
303     MEDCOUPLING_EXPORT void finishUnserialization2(const std::vector<int>& tinyInfoI, const std::vector<double>& tinyInfoD) throw(INTERP_KERNEL::Exception);
304     MEDCOUPLING_EXPORT MEDCouplingTimeDiscretization *performCpy(bool deepCpy) const throw(INTERP_KERNEL::Exception);
305     MEDCOUPLING_EXPORT bool areCompatible(const MEDCouplingTimeDiscretization *other) const throw(INTERP_KERNEL::Exception);
306     MEDCOUPLING_EXPORT bool areStrictlyCompatible(const MEDCouplingTimeDiscretization *other, std::string& reason) const throw(INTERP_KERNEL::Exception);
307     MEDCOUPLING_EXPORT bool areStrictlyCompatibleForMul(const MEDCouplingTimeDiscretization *other) const throw(INTERP_KERNEL::Exception);
308     MEDCOUPLING_EXPORT bool areStrictlyCompatibleForDiv(const MEDCouplingTimeDiscretization *other) const throw(INTERP_KERNEL::Exception);
309     MEDCOUPLING_EXPORT bool areCompatibleForMeld(const MEDCouplingTimeDiscretization *other) const throw(INTERP_KERNEL::Exception);
310     MEDCOUPLING_EXPORT bool isEqualIfNotWhy(const MEDCouplingTimeDiscretization *other, double prec, std::string& reason) const throw(INTERP_KERNEL::Exception);
311     MEDCOUPLING_EXPORT bool isEqualWithoutConsideringStr(const MEDCouplingTimeDiscretization *other, double prec) const throw(INTERP_KERNEL::Exception);
312     MEDCOUPLING_EXPORT std::vector< const DataArrayDouble *> getArraysForTime(double time) const throw(INTERP_KERNEL::Exception);
313     MEDCOUPLING_EXPORT void getValueForTime(double time, const std::vector<double>& vals, double *res) const throw(INTERP_KERNEL::Exception);
314     MEDCOUPLING_EXPORT void getValueOnTime(int eltId, double time, double *value) const throw(INTERP_KERNEL::Exception);
315     MEDCOUPLING_EXPORT void getValueOnDiscTime(int eltId, int iteration, int order, double *value) const throw(INTERP_KERNEL::Exception);
316     MEDCOUPLING_EXPORT TypeOfTimeDiscretization getEnum() const throw(INTERP_KERNEL::Exception) { return DISCRETIZATION; }
317     MEDCOUPLING_EXPORT void synchronizeTimeWith(const MEDCouplingMesh *mesh) throw(INTERP_KERNEL::Exception);
318     MEDCOUPLING_EXPORT std::string getStringRepr() const throw(INTERP_KERNEL::Exception);
319     MEDCOUPLING_EXPORT MEDCouplingTimeDiscretization *aggregate(const MEDCouplingTimeDiscretization *other) const throw(INTERP_KERNEL::Exception);
320     MEDCOUPLING_EXPORT MEDCouplingTimeDiscretization *aggregate(const std::vector<const MEDCouplingTimeDiscretization *>& other) const throw(INTERP_KERNEL::Exception);
321     MEDCOUPLING_EXPORT MEDCouplingTimeDiscretization *meld(const MEDCouplingTimeDiscretization *other) const throw(INTERP_KERNEL::Exception);
322     MEDCOUPLING_EXPORT MEDCouplingTimeDiscretization *dot(const MEDCouplingTimeDiscretization *other) const throw(INTERP_KERNEL::Exception);
323     MEDCOUPLING_EXPORT MEDCouplingTimeDiscretization *crossProduct(const MEDCouplingTimeDiscretization *other) const throw(INTERP_KERNEL::Exception);
324     MEDCOUPLING_EXPORT MEDCouplingTimeDiscretization *max(const MEDCouplingTimeDiscretization *other) const throw(INTERP_KERNEL::Exception);
325     MEDCOUPLING_EXPORT MEDCouplingTimeDiscretization *min(const MEDCouplingTimeDiscretization *other) const throw(INTERP_KERNEL::Exception);
326     MEDCOUPLING_EXPORT MEDCouplingTimeDiscretization *add(const MEDCouplingTimeDiscretization *other) const throw(INTERP_KERNEL::Exception);
327     MEDCOUPLING_EXPORT void addEqual(const MEDCouplingTimeDiscretization *other) throw(INTERP_KERNEL::Exception);
328     MEDCOUPLING_EXPORT MEDCouplingTimeDiscretization *substract(const MEDCouplingTimeDiscretization *other) const throw(INTERP_KERNEL::Exception);
329     MEDCOUPLING_EXPORT void substractEqual(const MEDCouplingTimeDiscretization *other) throw(INTERP_KERNEL::Exception);
330     MEDCOUPLING_EXPORT MEDCouplingTimeDiscretization *multiply(const MEDCouplingTimeDiscretization *other) const throw(INTERP_KERNEL::Exception);
331     MEDCOUPLING_EXPORT void multiplyEqual(const MEDCouplingTimeDiscretization *other) throw(INTERP_KERNEL::Exception);
332     MEDCOUPLING_EXPORT MEDCouplingTimeDiscretization *divide(const MEDCouplingTimeDiscretization *other) const throw(INTERP_KERNEL::Exception);
333     MEDCOUPLING_EXPORT void divideEqual(const MEDCouplingTimeDiscretization *other) throw(INTERP_KERNEL::Exception);
334     MEDCouplingTimeDiscretization *pow(const MEDCouplingTimeDiscretization *other) const throw(INTERP_KERNEL::Exception);
335     MEDCOUPLING_EXPORT void powEqual(const MEDCouplingTimeDiscretization *other) throw(INTERP_KERNEL::Exception);
336     MEDCOUPLING_EXPORT void setStartTime(double time, int iteration, int order) throw(INTERP_KERNEL::Exception) { _start_time=time; _start_iteration=iteration; _start_order=order; }
337     MEDCOUPLING_EXPORT void setEndTime(double time, int iteration, int order) throw(INTERP_KERNEL::Exception) { _end_time=time; _end_iteration=iteration; _end_order=order; }
338     MEDCOUPLING_EXPORT double getStartTime(int& iteration, int& order) const throw(INTERP_KERNEL::Exception) { iteration=_start_iteration; order=_start_order; return _start_time; }
339     MEDCOUPLING_EXPORT double getEndTime(int& iteration, int& order) const throw(INTERP_KERNEL::Exception) { iteration=_end_iteration; order=_end_order; return _end_time; }
340     MEDCOUPLING_EXPORT void setStartIteration(int it) throw(INTERP_KERNEL::Exception) { _start_iteration=it; }
341     MEDCOUPLING_EXPORT void setEndIteration(int it) throw(INTERP_KERNEL::Exception) { _end_iteration=it; }
342     MEDCOUPLING_EXPORT void setStartOrder(int order) throw(INTERP_KERNEL::Exception) { _start_order=order; }
343     MEDCOUPLING_EXPORT void setEndOrder(int order) throw(INTERP_KERNEL::Exception) { _end_order=order; }
344     MEDCOUPLING_EXPORT void setStartTimeValue(double time) throw(INTERP_KERNEL::Exception) { _start_time=time; }
345     MEDCOUPLING_EXPORT void setEndTimeValue(double time) throw(INTERP_KERNEL::Exception) { _end_time=time; }
346     MEDCOUPLING_EXPORT void checkNoTimePresence() const throw(INTERP_KERNEL::Exception);
347     MEDCOUPLING_EXPORT void checkTimePresence(double time) const throw(INTERP_KERNEL::Exception);
348   public:
349     static const TypeOfTimeDiscretization DISCRETIZATION=CONST_ON_TIME_INTERVAL;
350     MEDCOUPLING_EXPORT static const char REPR[];
351   private:
352     static const char EXCEPTION_MSG[];
353   protected:
354     double _start_time;
355     double _end_time;
356     int _start_iteration;
357     int _end_iteration;
358     int _start_order;
359     int _end_order;
360   };
361
362   class MEDCouplingTwoTimeSteps : public MEDCouplingTimeDiscretization
363   {
364   protected:
365     MEDCOUPLING_EXPORT MEDCouplingTwoTimeSteps(const MEDCouplingTwoTimeSteps& other, bool deepCpy);
366     MEDCOUPLING_EXPORT MEDCouplingTwoTimeSteps();
367     MEDCOUPLING_EXPORT ~MEDCouplingTwoTimeSteps();
368   public:
369     MEDCOUPLING_EXPORT void updateTime() const;
370     MEDCOUPLING_EXPORT void synchronizeTimeWith(const MEDCouplingMesh *mesh) throw(INTERP_KERNEL::Exception);
371     MEDCOUPLING_EXPORT std::size_t getHeapMemorySizeWithoutChildren() const;
372     MEDCOUPLING_EXPORT std::vector<const BigMemoryObject *> getDirectChildren() const;
373     MEDCOUPLING_EXPORT void copyTinyAttrFrom(const MEDCouplingTimeDiscretization& other) throw(INTERP_KERNEL::Exception);
374     MEDCOUPLING_EXPORT void copyTinyStringsFrom(const MEDCouplingTimeDiscretization& other) throw(INTERP_KERNEL::Exception);
375     MEDCOUPLING_EXPORT const DataArrayDouble *getEndArray() const throw(INTERP_KERNEL::Exception);
376     MEDCOUPLING_EXPORT DataArrayDouble *getEndArray() throw(INTERP_KERNEL::Exception);
377     MEDCOUPLING_EXPORT void checkCoherency() const throw(INTERP_KERNEL::Exception);
378     MEDCOUPLING_EXPORT bool isEqualIfNotWhy(const MEDCouplingTimeDiscretization *other, double prec, std::string& reason) const throw(INTERP_KERNEL::Exception);
379     MEDCOUPLING_EXPORT bool isEqualWithoutConsideringStr(const MEDCouplingTimeDiscretization *other, double prec) const throw(INTERP_KERNEL::Exception);
380     MEDCOUPLING_EXPORT void checkNoTimePresence() const throw(INTERP_KERNEL::Exception);
381     MEDCOUPLING_EXPORT void checkTimePresence(double time) const throw(INTERP_KERNEL::Exception);
382     MEDCOUPLING_EXPORT void getArrays(std::vector<DataArrayDouble *>& arrays) const throw(INTERP_KERNEL::Exception);
383     MEDCOUPLING_EXPORT void setEndArray(DataArrayDouble *array, TimeLabel *owner) throw(INTERP_KERNEL::Exception);
384     MEDCOUPLING_EXPORT void setStartTime(double time, int iteration, int order) throw(INTERP_KERNEL::Exception) { _start_time=time; _start_iteration=iteration; _start_order=order; }
385     MEDCOUPLING_EXPORT void setEndTime(double time, int iteration, int order) throw(INTERP_KERNEL::Exception) { _end_time=time; _end_iteration=iteration; _end_order=order; }
386     MEDCOUPLING_EXPORT double getStartTime(int& iteration, int& order) const throw(INTERP_KERNEL::Exception) { iteration=_start_iteration; order=_start_order; return _start_time; }
387     MEDCOUPLING_EXPORT double getEndTime(int& iteration, int& order) const throw(INTERP_KERNEL::Exception) { iteration=_end_iteration; order=_end_order; return _end_time; }
388     MEDCOUPLING_EXPORT void setStartIteration(int it) throw(INTERP_KERNEL::Exception) { _start_iteration=it; }
389     MEDCOUPLING_EXPORT void setEndIteration(int it) throw(INTERP_KERNEL::Exception) { _end_iteration=it; }
390     MEDCOUPLING_EXPORT void setStartOrder(int order) throw(INTERP_KERNEL::Exception) { _start_order=order; }
391     MEDCOUPLING_EXPORT void setEndOrder(int order) throw(INTERP_KERNEL::Exception) { _end_order=order; }
392     MEDCOUPLING_EXPORT void setStartTimeValue(double time) throw(INTERP_KERNEL::Exception) { _start_time=time; }
393     MEDCOUPLING_EXPORT void setEndTimeValue(double time) throw(INTERP_KERNEL::Exception) { _end_time=time; }
394     MEDCOUPLING_EXPORT void getTinySerializationIntInformation(std::vector<int>& tinyInfo) const throw(INTERP_KERNEL::Exception);
395     MEDCOUPLING_EXPORT void getTinySerializationDbleInformation(std::vector<double>& tinyInfo) const throw(INTERP_KERNEL::Exception);
396     MEDCOUPLING_EXPORT void getTinySerializationStrInformation(std::vector<std::string>& tinyInfo) const throw(INTERP_KERNEL::Exception);
397     MEDCOUPLING_EXPORT void resizeForUnserialization(const std::vector<int>& tinyInfoI, std::vector<DataArrayDouble *>& arrays) throw(INTERP_KERNEL::Exception);
398     MEDCOUPLING_EXPORT void finishUnserialization(const std::vector<int>& tinyInfoI, const std::vector<double>& tinyInfoD, const std::vector<std::string>& tinyInfoS) throw(INTERP_KERNEL::Exception);
399     MEDCOUPLING_EXPORT void getTinySerializationIntInformation2(std::vector<int>& tinyInfo) const throw(INTERP_KERNEL::Exception);
400     MEDCOUPLING_EXPORT void getTinySerializationDbleInformation2(std::vector<double>& tinyInfo) const throw(INTERP_KERNEL::Exception);
401     MEDCOUPLING_EXPORT void finishUnserialization2(const std::vector<int>& tinyInfoI, const std::vector<double>& tinyInfoD) throw(INTERP_KERNEL::Exception);
402     MEDCOUPLING_EXPORT std::vector< const DataArrayDouble *> getArraysForTime(double time) const throw(INTERP_KERNEL::Exception);
403     MEDCOUPLING_EXPORT void setArrays(const std::vector<DataArrayDouble *>& arrays, TimeLabel *owner) throw(INTERP_KERNEL::Exception);
404   protected:
405     static const char EXCEPTION_MSG[];
406   protected:
407     double _start_time;
408     double _end_time;
409     int _start_iteration;
410     int _end_iteration;
411     int _start_order;
412     int _end_order;
413     DataArrayDouble *_end_array;
414   };
415
416   class MEDCouplingLinearTime : public MEDCouplingTwoTimeSteps
417   {
418   protected:
419     MEDCOUPLING_EXPORT MEDCouplingLinearTime(const MEDCouplingLinearTime& other, bool deepCpy);
420   public:
421     MEDCOUPLING_EXPORT MEDCouplingLinearTime();
422     MEDCOUPLING_EXPORT std::string getStringRepr() const throw(INTERP_KERNEL::Exception);
423     MEDCOUPLING_EXPORT TypeOfTimeDiscretization getEnum() const throw(INTERP_KERNEL::Exception) { return DISCRETIZATION; }
424     MEDCOUPLING_EXPORT void checkCoherency() const throw(INTERP_KERNEL::Exception);
425     MEDCOUPLING_EXPORT MEDCouplingTimeDiscretization *performCpy(bool deepCpy) const throw(INTERP_KERNEL::Exception);
426     MEDCOUPLING_EXPORT bool areCompatible(const MEDCouplingTimeDiscretization *other) const throw(INTERP_KERNEL::Exception);
427     MEDCOUPLING_EXPORT bool areStrictlyCompatible(const MEDCouplingTimeDiscretization *other, std::string& reason) const throw(INTERP_KERNEL::Exception);
428     MEDCOUPLING_EXPORT bool areStrictlyCompatibleForMul(const MEDCouplingTimeDiscretization *other) const throw(INTERP_KERNEL::Exception);
429     MEDCOUPLING_EXPORT bool areStrictlyCompatibleForDiv(const MEDCouplingTimeDiscretization *other) const throw(INTERP_KERNEL::Exception);
430     MEDCOUPLING_EXPORT bool areCompatibleForMeld(const MEDCouplingTimeDiscretization *other) const throw(INTERP_KERNEL::Exception);
431     MEDCOUPLING_EXPORT void getValueForTime(double time, const std::vector<double>& vals, double *res) const throw(INTERP_KERNEL::Exception);
432     MEDCOUPLING_EXPORT void getValueOnTime(int eltId, double time, double *value) const throw(INTERP_KERNEL::Exception);
433     MEDCOUPLING_EXPORT void getValueOnDiscTime(int eltId, int iteration, int order, double *value) const throw(INTERP_KERNEL::Exception);
434     MEDCOUPLING_EXPORT MEDCouplingTimeDiscretization *aggregate(const MEDCouplingTimeDiscretization *other) const throw(INTERP_KERNEL::Exception);
435     MEDCOUPLING_EXPORT MEDCouplingTimeDiscretization *aggregate(const std::vector<const MEDCouplingTimeDiscretization *>& other) const throw(INTERP_KERNEL::Exception);
436     MEDCOUPLING_EXPORT MEDCouplingTimeDiscretization *meld(const MEDCouplingTimeDiscretization *other) const throw(INTERP_KERNEL::Exception);
437     MEDCOUPLING_EXPORT MEDCouplingTimeDiscretization *dot(const MEDCouplingTimeDiscretization *other) const throw(INTERP_KERNEL::Exception);
438     MEDCOUPLING_EXPORT MEDCouplingTimeDiscretization *crossProduct(const MEDCouplingTimeDiscretization *other) const throw(INTERP_KERNEL::Exception);
439     MEDCOUPLING_EXPORT MEDCouplingTimeDiscretization *max(const MEDCouplingTimeDiscretization *other) const throw(INTERP_KERNEL::Exception);
440     MEDCOUPLING_EXPORT MEDCouplingTimeDiscretization *min(const MEDCouplingTimeDiscretization *other) const throw(INTERP_KERNEL::Exception);
441     MEDCOUPLING_EXPORT MEDCouplingTimeDiscretization *add(const MEDCouplingTimeDiscretization *other) const throw(INTERP_KERNEL::Exception);
442     MEDCOUPLING_EXPORT void addEqual(const MEDCouplingTimeDiscretization *other) throw(INTERP_KERNEL::Exception);
443     MEDCOUPLING_EXPORT MEDCouplingTimeDiscretization *substract(const MEDCouplingTimeDiscretization *other) const throw(INTERP_KERNEL::Exception);
444     MEDCOUPLING_EXPORT void substractEqual(const MEDCouplingTimeDiscretization *other) throw(INTERP_KERNEL::Exception);
445     MEDCOUPLING_EXPORT MEDCouplingTimeDiscretization *multiply(const MEDCouplingTimeDiscretization *other) const throw(INTERP_KERNEL::Exception);
446     MEDCOUPLING_EXPORT void multiplyEqual(const MEDCouplingTimeDiscretization *other) throw(INTERP_KERNEL::Exception);
447     MEDCOUPLING_EXPORT MEDCouplingTimeDiscretization *divide(const MEDCouplingTimeDiscretization *other) const throw(INTERP_KERNEL::Exception);
448     MEDCOUPLING_EXPORT void divideEqual(const MEDCouplingTimeDiscretization *other) throw(INTERP_KERNEL::Exception);
449     MEDCOUPLING_EXPORT MEDCouplingTimeDiscretization *pow(const MEDCouplingTimeDiscretization *other) const throw(INTERP_KERNEL::Exception);
450     MEDCOUPLING_EXPORT void powEqual(const MEDCouplingTimeDiscretization *other) throw(INTERP_KERNEL::Exception);
451   public:
452     static const TypeOfTimeDiscretization DISCRETIZATION=LINEAR_TIME;
453     MEDCOUPLING_EXPORT static const char REPR[];
454   };
455 }
456
457 #endif