Salome HOME
1) Add CMake files to the dist rules (make dist)
[tools/medcoupling.git] / src / MEDCoupling / MEDCouplingFieldDiscretization.hxx
1 // Copyright (C) 2007-2012  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_MEDCOUPLINGFIELDDISCRETIZATION_HXX__
22 #define __PARAMEDMEM_MEDCOUPLINGFIELDDISCRETIZATION_HXX__
23
24 #include "MEDCoupling.hxx"
25 #include "MEDCouplingRefCountObject.hxx"
26 #include "InterpKernelException.hxx"
27 #include "MEDCouplingTimeLabel.hxx"
28 #include "MEDCouplingNatureOfField.hxx"
29 #include "MEDCouplingGaussLocalization.hxx"
30 #include "MEDCouplingAutoRefCountObjectPtr.hxx"
31
32 #include <vector>
33
34 namespace ParaMEDMEM
35 {
36   class DataArrayInt;
37   class MEDCouplingMesh;
38   class DataArrayDouble;
39   class MEDCouplingFieldDouble;
40
41   class MEDCOUPLING_EXPORT MEDCouplingFieldDiscretization : public RefCountObject, public TimeLabel
42   {
43   public:
44     static MEDCouplingFieldDiscretization *New(TypeOfField type);
45     double getPrecision() const { return _precision; }
46     void setPrecision(double val) { _precision=val; }
47     void updateTime() const;
48     static TypeOfField getTypeOfFieldFromStringRepr(const char *repr) throw(INTERP_KERNEL::Exception);
49     virtual TypeOfField getEnum() const = 0;
50     virtual bool isEqual(const MEDCouplingFieldDiscretization *other, double eps) const;
51     virtual bool isEqualIfNotWhy(const MEDCouplingFieldDiscretization *other, double eps, std::string& reason) const = 0;
52     virtual bool isEqualWithoutConsideringStr(const MEDCouplingFieldDiscretization *other, double eps) const;
53     virtual MEDCouplingFieldDiscretization *clone() const = 0;
54     virtual std::string getStringRepr() const = 0;
55     virtual const char *getRepr() const = 0;
56     virtual int getNumberOfTuples(const MEDCouplingMesh *mesh) const = 0;
57     virtual int getNumberOfMeshPlaces(const MEDCouplingMesh *mesh) const = 0;
58     virtual DataArrayInt *getOffsetArr(const MEDCouplingMesh *mesh) const = 0;
59     virtual void normL1(const MEDCouplingMesh *mesh, const DataArrayDouble *arr, double *res) const throw(INTERP_KERNEL::Exception);
60     virtual void normL2(const MEDCouplingMesh *mesh, const DataArrayDouble *arr, double *res) const throw(INTERP_KERNEL::Exception);
61     virtual void integral(const MEDCouplingMesh *mesh, const DataArrayDouble *arr, bool isWAbs, double *res) const throw(INTERP_KERNEL::Exception);
62     virtual DataArrayDouble *getLocalizationOfDiscValues(const MEDCouplingMesh *mesh) const = 0;
63     virtual void computeMeshRestrictionFromTupleIds(const MEDCouplingMesh *mesh, const int *partBg, const int *partEnd,
64                                                     DataArrayInt *&cellRest) = 0;
65     virtual void checkCompatibilityWithNature(NatureOfField nat) const throw(INTERP_KERNEL::Exception) = 0;
66     virtual void renumberCells(const int *old2NewBg, bool check=true) throw(INTERP_KERNEL::Exception);
67     virtual void renumberArraysForCell(const MEDCouplingMesh *mesh, const std::vector<DataArrayDouble *>& arrays,
68                                        const int *old2NewBg, bool check) throw(INTERP_KERNEL::Exception) = 0;
69     virtual double getIJK(const MEDCouplingMesh *mesh, const DataArrayDouble *da, int cellId, int nodeIdInCell, int compoId) const throw(INTERP_KERNEL::Exception);
70     virtual void checkCoherencyBetween(const MEDCouplingMesh *mesh, const DataArrayDouble *da) const throw(INTERP_KERNEL::Exception) = 0;
71     virtual MEDCouplingFieldDouble *getMeasureField(const MEDCouplingMesh *mesh, bool isAbs) const = 0;
72     virtual void getValueOn(const DataArrayDouble *arr, const MEDCouplingMesh *mesh, const double *loc, double *res) const = 0;
73     virtual void getValueOnPos(const DataArrayDouble *arr, const MEDCouplingMesh *mesh, int i, int j, int k, double *res) const = 0;
74     virtual DataArrayDouble *getValueOnMulti(const DataArrayDouble *arr, const MEDCouplingMesh *mesh, const double *loc, int nbOfPoints) const = 0;
75     virtual DataArrayInt *computeTupleIdsToSelectFromCellIds(const MEDCouplingMesh *mesh, const int *startCellIds, const int *endCellIds) const = 0;
76     virtual MEDCouplingMesh *buildSubMeshData(const MEDCouplingMesh *mesh, const int *start, const int *end, DataArrayInt *&di) const = 0;
77     virtual void renumberValuesOnNodes(double epsOnVals, const int *old2New, DataArrayDouble *arr) const = 0;
78     virtual void renumberValuesOnCells(double epsOnVals, const MEDCouplingMesh *mesh, const int *old2New, DataArrayDouble *arr) const = 0;
79     virtual void renumberValuesOnCellsR(const MEDCouplingMesh *mesh, const int *new2old, int newSz, DataArrayDouble *arr) const = 0;
80     virtual void getSerializationIntArray(DataArrayInt *& arr) const;
81     virtual void getTinySerializationIntInformation(std::vector<int>& tinyInfo) const;
82     virtual void getTinySerializationDbleInformation(std::vector<double>& tinyInfo) const;
83     virtual void finishUnserialization(const std::vector<double>& tinyInfo);
84     virtual void resizeForUnserialization(const std::vector<int>& tinyInfo, DataArrayInt *& arr);
85     virtual void setGaussLocalizationOnType(const MEDCouplingMesh *m, INTERP_KERNEL::NormalizedCellType type, const std::vector<double>& refCoo,
86                                             const std::vector<double>& gsCoo, const std::vector<double>& wg) throw(INTERP_KERNEL::Exception);
87     virtual void setGaussLocalizationOnCells(const MEDCouplingMesh *m, const int *begin, const int *end, const std::vector<double>& refCoo,
88                                              const std::vector<double>& gsCoo, const std::vector<double>& wg) throw(INTERP_KERNEL::Exception);
89     virtual void clearGaussLocalizations() throw(INTERP_KERNEL::Exception);
90     virtual MEDCouplingGaussLocalization& getGaussLocalization(int locId) throw(INTERP_KERNEL::Exception);
91     virtual int getNbOfGaussLocalization() const throw(INTERP_KERNEL::Exception);
92     virtual int getGaussLocalizationIdOfOneCell(int cellId) const throw(INTERP_KERNEL::Exception);
93     virtual int getGaussLocalizationIdOfOneType(INTERP_KERNEL::NormalizedCellType type) const throw(INTERP_KERNEL::Exception);
94     virtual void getCellIdsHavingGaussLocalization(int locId, std::vector<int>& cellIds) const throw(INTERP_KERNEL::Exception);
95     virtual const MEDCouplingGaussLocalization& getGaussLocalization(int locId) const throw(INTERP_KERNEL::Exception);
96     virtual ~MEDCouplingFieldDiscretization();
97   protected:
98     MEDCouplingFieldDiscretization();
99     static void renumberEntitiesFromO2NArr(double epsOnVals, const int *old2NewPtr, DataArrayDouble *arr, const char *msg);
100     static void renumberEntitiesFromN2OArr(const int *new2OldPtr, int new2OldSz, DataArrayDouble *arr, const char *msg);
101   protected:
102     double _precision;
103     static const double DFLT_PRECISION;
104   };
105
106   class MEDCOUPLING_EXPORT MEDCouplingFieldDiscretizationP0 : public MEDCouplingFieldDiscretization
107   {
108   public:
109     TypeOfField getEnum() const;
110     MEDCouplingFieldDiscretization *clone() const;
111     std::string getStringRepr() const;
112     const char *getRepr() const;
113     bool isEqualIfNotWhy(const MEDCouplingFieldDiscretization *other, double eps, std::string& reason) const;
114     int getNumberOfTuples(const MEDCouplingMesh *mesh) const;
115     int getNumberOfMeshPlaces(const MEDCouplingMesh *mesh) const;
116     DataArrayInt *getOffsetArr(const MEDCouplingMesh *mesh) const;
117     void renumberArraysForCell(const MEDCouplingMesh *mesh, const std::vector<DataArrayDouble *>& arrays,
118                                const int *old2NewBg, bool check) throw(INTERP_KERNEL::Exception);
119     DataArrayDouble *getLocalizationOfDiscValues(const MEDCouplingMesh *mesh) const;
120     void checkCompatibilityWithNature(NatureOfField nat) const throw(INTERP_KERNEL::Exception);
121     void computeMeshRestrictionFromTupleIds(const MEDCouplingMesh *mesh, const int *partBg, const int *partEnd,
122                                             DataArrayInt *&cellRest);
123     void checkCoherencyBetween(const MEDCouplingMesh *mesh, const DataArrayDouble *da) const throw(INTERP_KERNEL::Exception);
124     MEDCouplingFieldDouble *getMeasureField(const MEDCouplingMesh *mesh, bool isAbs) const;
125     void getValueOn(const DataArrayDouble *arr, const MEDCouplingMesh *mesh, const double *loc, double *res) const;
126     void getValueOnPos(const DataArrayDouble *arr, const MEDCouplingMesh *mesh, int i, int j, int k, double *res) const;
127     DataArrayDouble *getValueOnMulti(const DataArrayDouble *arr, const MEDCouplingMesh *mesh, const double *loc, int nbOfPoints) const;
128     void renumberValuesOnNodes(double epsOnVals, const int *old2New, DataArrayDouble *arr) const;
129     void renumberValuesOnCells(double epsOnVals, const MEDCouplingMesh *mesh, const int *old2New, DataArrayDouble *arr) const;
130     void renumberValuesOnCellsR(const MEDCouplingMesh *mesh, const int *new2old, int newSz, DataArrayDouble *arr) const;
131     MEDCouplingMesh *buildSubMeshData(const MEDCouplingMesh *mesh, const int *start, const int *end, DataArrayInt *&di) const;
132     DataArrayInt *computeTupleIdsToSelectFromCellIds(const MEDCouplingMesh *mesh, const int *startCellIds, const int *endCellIds) const;
133   public:
134     static const char REPR[];
135     static const TypeOfField TYPE;
136   };
137
138   class MEDCOUPLING_EXPORT MEDCouplingFieldDiscretizationOnNodes : public MEDCouplingFieldDiscretization
139   {
140   public:
141     int getNumberOfTuples(const MEDCouplingMesh *mesh) const;
142     int getNumberOfMeshPlaces(const MEDCouplingMesh *mesh) const;
143     DataArrayInt *getOffsetArr(const MEDCouplingMesh *mesh) const;
144     void renumberArraysForCell(const MEDCouplingMesh *mesh, const std::vector<DataArrayDouble *>& arrays,
145                                const int *old2NewBg, bool check) throw(INTERP_KERNEL::Exception);
146     DataArrayDouble *getLocalizationOfDiscValues(const MEDCouplingMesh *mesh) const;
147     void computeMeshRestrictionFromTupleIds(const MEDCouplingMesh *mesh, const int *partBg, const int *partEnd,
148                                             DataArrayInt *&cellRest);
149     void checkCoherencyBetween(const MEDCouplingMesh *mesh, const DataArrayDouble *da) const throw(INTERP_KERNEL::Exception);
150     MEDCouplingMesh *buildSubMeshData(const MEDCouplingMesh *mesh, const int *start, const int *end, DataArrayInt *&di) const;
151     DataArrayInt *computeTupleIdsToSelectFromCellIds(const MEDCouplingMesh *mesh, const int *startCellIds, const int *endCellIds) const;
152     void renumberValuesOnNodes(double epsOnVals, const int *old2New, DataArrayDouble *arr) const;
153     void renumberValuesOnCells(double epsOnVals, const MEDCouplingMesh *mesh, const int *old2New, DataArrayDouble *arr) const;
154     void renumberValuesOnCellsR(const MEDCouplingMesh *mesh, const int *new2old, int newSz, DataArrayDouble *arr) const;
155   public:
156     void getValueOnPos(const DataArrayDouble *arr, const MEDCouplingMesh *mesh, int i, int j, int k, double *res) const;
157   };
158
159   class MEDCOUPLING_EXPORT MEDCouplingFieldDiscretizationP1 : public MEDCouplingFieldDiscretizationOnNodes
160   {
161   public:
162     TypeOfField getEnum() const;
163     MEDCouplingFieldDiscretization *clone() const;
164     std::string getStringRepr() const;
165     const char *getRepr() const;
166     void checkCompatibilityWithNature(NatureOfField nat) const throw(INTERP_KERNEL::Exception);
167     bool isEqualIfNotWhy(const MEDCouplingFieldDiscretization *other, double eps, std::string& reason) const;
168     MEDCouplingFieldDouble *getMeasureField(const MEDCouplingMesh *mesh, bool isAbs) const;
169     void getValueOn(const DataArrayDouble *arr, const MEDCouplingMesh *mesh, const double *loc, double *res) const;
170     DataArrayDouble *getValueOnMulti(const DataArrayDouble *arr, const MEDCouplingMesh *mesh, const double *loc, int nbOfPoints) const;
171   public:
172     static const char REPR[];
173     static const TypeOfField TYPE;
174   protected:
175     void getValueInCell(const MEDCouplingMesh *mesh, int cellId, const DataArrayDouble *arr, const double *loc, double *res) const;
176   };
177
178   /*!
179    * This class abstracts MEDCouplingFieldDiscretization that needs an information on each cell to perform their job.
180    * All classes that inherits from this are more linked to mesh.
181    */
182   class MEDCOUPLING_EXPORT MEDCouplingFieldDiscretizationPerCell : public MEDCouplingFieldDiscretization
183   {
184   public:
185     const DataArrayInt *getArrayOfDiscIds() const;
186   protected:
187     MEDCouplingFieldDiscretizationPerCell();
188     MEDCouplingFieldDiscretizationPerCell(const MEDCouplingFieldDiscretizationPerCell& other);
189     ~MEDCouplingFieldDiscretizationPerCell();
190     void updateTime() const;
191     void checkCoherencyBetween(const MEDCouplingMesh *mesh, const DataArrayDouble *da) const throw(INTERP_KERNEL::Exception);
192     bool isEqualIfNotWhy(const MEDCouplingFieldDiscretization *other, double eps, std::string& reason) const;
193     bool isEqualWithoutConsideringStr(const MEDCouplingFieldDiscretization *other, double eps) const;
194     void renumberCells(const int *old2NewBg, bool check) throw(INTERP_KERNEL::Exception);
195     void checkNoOrphanCells() const throw(INTERP_KERNEL::Exception);
196   protected:
197     void buildDiscrPerCellIfNecessary(const MEDCouplingMesh *m);
198   protected:
199     DataArrayInt *_discr_per_cell;
200     static const int DFT_INVALID_LOCID_VALUE;
201   };
202
203   class MEDCOUPLING_EXPORT MEDCouplingFieldDiscretizationGauss : public MEDCouplingFieldDiscretizationPerCell
204   {
205   public:
206     MEDCouplingFieldDiscretizationGauss();
207     TypeOfField getEnum() const;
208     bool isEqualIfNotWhy(const MEDCouplingFieldDiscretization *other, double eps, std::string& reason) const;
209     bool isEqualWithoutConsideringStr(const MEDCouplingFieldDiscretization *other, double eps) const;
210     MEDCouplingFieldDiscretization *clone() const;
211     std::string getStringRepr() const;
212     const char *getRepr() const;
213     int getNumberOfTuples(const MEDCouplingMesh *mesh) const;
214     int getNumberOfMeshPlaces(const MEDCouplingMesh *mesh) const;
215     DataArrayInt *getOffsetArr(const MEDCouplingMesh *mesh) const;
216     void renumberArraysForCell(const MEDCouplingMesh *mesh, const std::vector<DataArrayDouble *>& arrays,
217                                const int *old2NewBg, bool check) throw(INTERP_KERNEL::Exception);
218     DataArrayDouble *getLocalizationOfDiscValues(const MEDCouplingMesh *mesh) const;
219     void computeMeshRestrictionFromTupleIds(const MEDCouplingMesh *mesh, const int *partBg, const int *partEnd,
220                                             DataArrayInt *&cellRest);
221     void checkCompatibilityWithNature(NatureOfField nat) const throw(INTERP_KERNEL::Exception);
222     void getTinySerializationIntInformation(std::vector<int>& tinyInfo) const;
223     void getTinySerializationDbleInformation(std::vector<double>& tinyInfo) const;
224     void finishUnserialization(const std::vector<double>& tinyInfo);
225     void getSerializationIntArray(DataArrayInt *& arr) const;
226     void resizeForUnserialization(const std::vector<int>& tinyInfo, DataArrayInt *& arr);
227     double getIJK(const MEDCouplingMesh *mesh, const DataArrayDouble *da, int cellId, int nodeIdInCell, int compoId) const throw(INTERP_KERNEL::Exception);
228     void checkCoherencyBetween(const MEDCouplingMesh *mesh, const DataArrayDouble *da) const throw(INTERP_KERNEL::Exception);
229     MEDCouplingFieldDouble *getMeasureField(const MEDCouplingMesh *mesh, bool isAbs) const;
230     void getValueOn(const DataArrayDouble *arr, const MEDCouplingMesh *mesh, const double *loc, double *res) const;
231     void getValueOnPos(const DataArrayDouble *arr, const MEDCouplingMesh *mesh, int i, int j, int k, double *res) const;
232     DataArrayDouble *getValueOnMulti(const DataArrayDouble *arr, const MEDCouplingMesh *mesh, const double *loc, int nbOfPoints) const;
233     MEDCouplingMesh *buildSubMeshData(const MEDCouplingMesh *mesh, const int *start, const int *end, DataArrayInt *&di) const;
234     DataArrayInt *computeTupleIdsToSelectFromCellIds(const MEDCouplingMesh *mesh, const int *startCellIds, const int *endCellIds) const;
235     void renumberValuesOnNodes(double epsOnVals, const int *old2New, DataArrayDouble *arr) const;
236     void renumberValuesOnCells(double epsOnVals, const MEDCouplingMesh *mesh, const int *old2New, DataArrayDouble *arr) const;
237     void renumberValuesOnCellsR(const MEDCouplingMesh *mesh, const int *new2old, int newSz, DataArrayDouble *arr) const;
238     void setGaussLocalizationOnType(const MEDCouplingMesh *m, INTERP_KERNEL::NormalizedCellType type, const std::vector<double>& refCoo,
239                                     const std::vector<double>& gsCoo, const std::vector<double>& wg) throw(INTERP_KERNEL::Exception);
240     void setGaussLocalizationOnCells(const MEDCouplingMesh *m, const int *begin, const int *end, const std::vector<double>& refCoo,
241                                      const std::vector<double>& gsCoo, const std::vector<double>& wg) throw(INTERP_KERNEL::Exception);
242     void clearGaussLocalizations() throw(INTERP_KERNEL::Exception);
243     MEDCouplingGaussLocalization& getGaussLocalization(int locId) throw(INTERP_KERNEL::Exception);
244     int getNbOfGaussLocalization() const throw(INTERP_KERNEL::Exception);
245     int getGaussLocalizationIdOfOneCell(int cellId) const throw(INTERP_KERNEL::Exception);
246     int getGaussLocalizationIdOfOneType(INTERP_KERNEL::NormalizedCellType type) const throw(INTERP_KERNEL::Exception);
247     void getCellIdsHavingGaussLocalization(int locId, std::vector<int>& cellIds) const throw(INTERP_KERNEL::Exception);
248     const MEDCouplingGaussLocalization& getGaussLocalization(int locId) const throw(INTERP_KERNEL::Exception);
249     std::vector<DataArrayInt *> splitIntoSingleGaussDicrPerCellType(std::vector< std::vector<int> >& locIds) const throw(INTERP_KERNEL::Exception);
250     DataArrayInt *buildNbOfGaussPointPerCellField() const throw(INTERP_KERNEL::Exception);
251   protected:
252     MEDCouplingFieldDiscretizationGauss(const MEDCouplingFieldDiscretizationGauss& other);
253     void zipGaussLocalizations();
254     int getOffsetOfCell(int cellId) const throw(INTERP_KERNEL::Exception);
255     void checkLocalizationId(int locId) const throw(INTERP_KERNEL::Exception);
256   public:
257     static const char REPR[];
258     static const TypeOfField TYPE;
259   private:
260     std::vector<MEDCouplingGaussLocalization> _loc;
261   };
262
263   /*!
264    * Gauss with points of values located on nodes of element. This is a specialization of MEDCouplingFieldDiscretizationGauss.
265    */
266   class MEDCOUPLING_EXPORT MEDCouplingFieldDiscretizationGaussNE : public MEDCouplingFieldDiscretization
267   {
268   public:
269     MEDCouplingFieldDiscretizationGaussNE();
270     TypeOfField getEnum() const;
271     MEDCouplingFieldDiscretization *clone() const;
272     std::string getStringRepr() const;
273     const char *getRepr() const;
274     bool isEqualIfNotWhy(const MEDCouplingFieldDiscretization *other, double eps, std::string& reason) const;
275     int getNumberOfTuples(const MEDCouplingMesh *mesh) const;
276     int getNumberOfMeshPlaces(const MEDCouplingMesh *mesh) const;
277     DataArrayInt *getOffsetArr(const MEDCouplingMesh *mesh) const;
278     void renumberArraysForCell(const MEDCouplingMesh *mesh, const std::vector<DataArrayDouble *>& arrays,
279                                const int *old2NewBg, bool check) throw(INTERP_KERNEL::Exception);
280     DataArrayDouble *getLocalizationOfDiscValues(const MEDCouplingMesh *mesh) const;
281     void computeMeshRestrictionFromTupleIds(const MEDCouplingMesh *mesh, const int *partBg, const int *partEnd,
282                                             DataArrayInt *&cellRest);
283     void checkCompatibilityWithNature(NatureOfField nat) const throw(INTERP_KERNEL::Exception);
284     double getIJK(const MEDCouplingMesh *mesh, const DataArrayDouble *da, int cellId, int nodeIdInCell, int compoId) const throw(INTERP_KERNEL::Exception);
285     void checkCoherencyBetween(const MEDCouplingMesh *mesh, const DataArrayDouble *da) const throw(INTERP_KERNEL::Exception);
286     MEDCouplingFieldDouble *getMeasureField(const MEDCouplingMesh *mesh, bool isAbs) const;
287     void getValueOn(const DataArrayDouble *arr, const MEDCouplingMesh *mesh, const double *loc, double *res) const;
288     void getValueOnPos(const DataArrayDouble *arr, const MEDCouplingMesh *mesh, int i, int j, int k, double *res) const;
289     DataArrayDouble *getValueOnMulti(const DataArrayDouble *arr, const MEDCouplingMesh *mesh, const double *loc, int nbOfPoints) const;
290     MEDCouplingMesh *buildSubMeshData(const MEDCouplingMesh *mesh, const int *start, const int *end, DataArrayInt *&di) const;
291     DataArrayInt *computeTupleIdsToSelectFromCellIds(const MEDCouplingMesh *mesh, const int *startCellIds, const int *endCellIds) const;
292     void renumberValuesOnNodes(double epsOnVals, const int *old2New, DataArrayDouble *arr) const;
293     void renumberValuesOnCells(double epsOnVals, const MEDCouplingMesh *mesh, const int *old2New, DataArrayDouble *arr) const;
294     void renumberValuesOnCellsR(const MEDCouplingMesh *mesh, const int *new2old, int newSz, DataArrayDouble *arr) const;
295   protected:
296     MEDCouplingFieldDiscretizationGaussNE(const MEDCouplingFieldDiscretizationGaussNE& other);
297   public:
298     static const char REPR[];
299     static const TypeOfField TYPE;
300   };
301
302   class MEDCOUPLING_EXPORT MEDCouplingFieldDiscretizationKriging : public MEDCouplingFieldDiscretizationOnNodes
303   {
304   public:
305     TypeOfField getEnum() const;
306     const char *getRepr() const;
307     MEDCouplingFieldDiscretization *clone() const;
308     std::string getStringRepr() const;
309     void checkCompatibilityWithNature(NatureOfField nat) const throw(INTERP_KERNEL::Exception);
310     bool isEqualIfNotWhy(const MEDCouplingFieldDiscretization *other, double eps, std::string& reason) const;
311     MEDCouplingFieldDouble *getMeasureField(const MEDCouplingMesh *mesh, bool isAbs) const;
312     void getValueOn(const DataArrayDouble *arr, const MEDCouplingMesh *mesh, const double *loc, double *res) const;
313     DataArrayDouble *getValueOnMulti(const DataArrayDouble *arr, const MEDCouplingMesh *mesh, const double *loc, int nbOfPoints) const;
314   public://specific part
315     DataArrayDouble *computeVectorOfCoefficients(const MEDCouplingMesh *mesh, const DataArrayDouble *arr, int& isDrift) const;
316   protected:
317     void operateOnDenseMatrix(int spaceDimension, int nbOfElems, double *matrixPtr) const;
318     DataArrayDouble *performDrift(const DataArrayDouble *matr, const DataArrayDouble *arr, int& delta) const;
319   public:
320     static const char REPR[];
321     static const TypeOfField TYPE;
322   };
323 }
324
325 #endif