1 // Copyright (C) 2007-2023 CEA, EDF
3 // This library is free software; you can redistribute it and/or
4 // modify it under the terms of the GNU Lesser General Public
5 // License as published by the Free Software Foundation; either
6 // version 2.1 of the License, or (at your option) any later version.
8 // This library is distributed in the hope that it will be useful,
9 // but WITHOUT ANY WARRANTY; without even the implied warranty of
10 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
11 // Lesser General Public License for more details.
13 // You should have received a copy of the GNU Lesser General Public
14 // License along with this library; if not, write to the Free Software
15 // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
17 // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
19 // Author : Anthony Geay (CEA/DEN)
21 %newobject MEDCoupling::MEDCouplingFieldDiscretization::New;
22 %newobject MEDCoupling::MEDCouplingFieldDiscretization::deepCopy;
23 %newobject MEDCoupling::MEDCouplingFieldDiscretization::clone;
24 %newobject MEDCoupling::MEDCouplingFieldDiscretization::clonePartRange;
25 %newobject MEDCoupling::MEDCouplingFieldDiscretization::getOffsetArr;
26 %newobject MEDCoupling::MEDCouplingFieldDiscretization::getLocalizationOfDiscValues;
27 %newobject MEDCoupling::MEDCouplingFieldDiscretization::getMeasureField;
28 %newobject MEDCoupling::MEDCouplingFieldDiscretization::clonePart;
29 %newobject MEDCoupling::MEDCouplingFieldDiscretization::getValueOnMulti;
30 %newobject MEDCoupling::MEDCouplingFieldDiscretization::computeTupleIdsToSelectFromCellIds;
31 %newobject MEDCoupling::MEDCouplingFieldDiscretizationKriging::PerformDriftOfVec;
35 class MEDCouplingFieldDiscretization : public RefCountObject, public TimeLabel
38 static MEDCouplingFieldDiscretization *New(TypeOfField type);
39 double getPrecision() const;
40 void setPrecision(double val);
41 static TypeOfField GetTypeOfFieldFromStringRepr(const std::string& repr);
42 virtual TypeOfField getEnum() const;
43 virtual bool isEqual(const MEDCouplingFieldDiscretization *other, double eps) const;
44 virtual bool isEqualIfNotWhy(const MEDCouplingFieldDiscretization *other, double eps, std::string& reason) const;
45 virtual bool isEqualWithoutConsideringStr(const MEDCouplingFieldDiscretization *other, double eps) const;
46 virtual MEDCouplingFieldDiscretization *deepCopy() const;
47 virtual MEDCouplingFieldDiscretization *clone() const;
48 virtual MEDCouplingFieldDiscretization *clonePartRange(int beginCellIds, int endCellIds, int stepCellIds) const;
49 virtual std::string getStringRepr() const;
50 virtual const char *getRepr() const;
51 virtual int getNumberOfTuples(const MEDCouplingMesh *mesh) const;
52 virtual int getNumberOfMeshPlaces(const MEDCouplingMesh *mesh) const;
53 virtual DataArrayIdType *getOffsetArr(const MEDCouplingMesh *mesh) const;
54 virtual DataArrayDouble *getLocalizationOfDiscValues(const MEDCouplingMesh *mesh) const;
55 virtual void checkCompatibilityWithNature(NatureOfField nat) const;
56 virtual double getIJK(const MEDCouplingMesh *mesh, const DataArrayDouble *da, int cellId, int nodeIdInCell, int compoId) const;
57 virtual void checkCoherencyBetween(const MEDCouplingMesh *mesh, const DataArray *da) const;
58 virtual MEDCouplingFieldDouble *getMeasureField(const MEDCouplingMesh *mesh, bool isAbs) const;
59 virtual void setGaussLocalizationOnType(const MEDCouplingMesh *m, INTERP_KERNEL::NormalizedCellType type, const std::vector<double>& refCoo,
60 const std::vector<double>& gsCoo, const std::vector<double>& wg);
61 virtual void clearGaussLocalizations();
62 virtual MEDCouplingGaussLocalization& getGaussLocalization(int locId);
63 virtual int getNbOfGaussLocalization() const;
64 virtual int getGaussLocalizationIdOfOneCell(int cellId) const;
65 virtual int getGaussLocalizationIdOfOneType(INTERP_KERNEL::NormalizedCellType type) const;
68 virtual MEDCouplingFieldDiscretization *clonePart(PyObject *li)
70 mcIdType sz=0,sw=-1,val1=-1;
71 std::vector<mcIdType> val2;
72 const mcIdType *inp=convertIntStarLikePyObjToCppIntStar(li,sw,sz,val1,val2);
73 return self->clonePart(inp,inp+sz);
76 virtual PyObject *buildSubMeshDataRange(const MEDCouplingMesh *mesh, mcIdType beginCellIds, mcIdType endCellIds, mcIdType stepCellIds, mcIdType& beginOut, mcIdType& endOut, mcIdType& stepOut, DataArrayIdType *&di) const
78 DataArrayIdType *ret1=0;
80 MEDCouplingMesh *ret0=self->buildSubMeshDataRange(mesh,beginCellIds,endCellIds,stepCellIds,bb,ee,ss,ret1);
81 PyObject *res=PyTuple_New(2);
82 PyTuple_SetItem(res,0,convertMesh(ret0, SWIG_POINTER_OWN | 0 ));
84 PyTuple_SetItem(res,1,SWIG_NewPointerObj((void*)ret1,SWIGTITraits<mcIdType>::TI,SWIG_POINTER_OWN | 0));
87 PyObject *res1=PySlice_New(PyInt_FromLong(bb),PyInt_FromLong(ee),PyInt_FromLong(ss));
88 PyTuple_SetItem(res,1,res1);
93 virtual mcIdType getNumberOfTuplesExpectedRegardingCode(PyObject *code, PyObject *idsPerType) const
95 std::vector<mcIdType> inp0;
96 convertPyToNewIntArr4(code,1,3,inp0);
97 std::vector<const DataArrayIdType *> inp1;
98 convertFromPyObjVectorOfObj<const MEDCoupling::DataArrayIdType *>(idsPerType,SWIGTITraits<mcIdType>::TI,"DataArrayIdType",inp1);
99 return self->getNumberOfTuplesExpectedRegardingCode(inp0,inp1);
102 virtual PyObject *computeMeshRestrictionFromTupleIds(const MEDCouplingMesh *mesh, PyObject *tupleIds) const
104 std::vector<mcIdType> vVal; mcIdType iVal=-1;
106 const mcIdType *tupleIdsBg=convertIntStarLikePyObjToCppIntStar(tupleIds,sw,sz,iVal,vVal);
108 throw INTERP_KERNEL::Exception("MEDCouplingFieldDiscretization::computeMeshRestrictionFromTupleIds : none parameter in input !");
109 DataArrayIdType *ret0=0,*ret1=0;
110 self->computeMeshRestrictionFromTupleIds(mesh,tupleIdsBg,tupleIdsBg+sz,ret0,ret1);
111 PyObject *pyRet=PyTuple_New(2);
112 PyTuple_SetItem(pyRet,0,SWIG_NewPointerObj(SWIG_as_voidptr(ret0),SWIGTITraits<mcIdType>::TI, SWIG_POINTER_OWN | 0 ));
113 PyTuple_SetItem(pyRet,1,SWIG_NewPointerObj(SWIG_as_voidptr(ret1),SWIGTITraits<mcIdType>::TI, SWIG_POINTER_OWN | 0 ));
117 virtual PyObject *normL1(const MEDCouplingMesh *mesh, const DataArrayDouble *arr) const
120 throw INTERP_KERNEL::Exception("wrap of MEDCouplingFieldDiscretization::normL1 : input array is null !");
121 std::size_t sz(arr->getNumberOfComponents());
122 INTERP_KERNEL::AutoPtr<double> tmp=new double[sz];
123 self->normL1(mesh,arr,tmp);
124 return convertDblArrToPyList<double>(tmp,sz);
127 virtual PyObject *normL2(const MEDCouplingMesh *mesh, const DataArrayDouble *arr) const
130 throw INTERP_KERNEL::Exception("wrap of MEDCouplingFieldDiscretization::normL2 : input array is null !");
131 std::size_t sz(arr->getNumberOfComponents());
132 INTERP_KERNEL::AutoPtr<double> tmp=new double[sz];
133 self->normL2(mesh,arr,tmp);
134 return convertDblArrToPyList<double>(tmp,sz);
137 virtual PyObject *integral(const MEDCouplingMesh *mesh, const DataArrayDouble *arr, bool isWAbs) const
140 throw INTERP_KERNEL::Exception("wrap of MEDCouplingFieldDiscretization::integral : input array is null !");
141 std::size_t sz(arr->getNumberOfComponents());
142 INTERP_KERNEL::AutoPtr<double> tmp=new double[sz];
143 self->integral(mesh,arr,isWAbs,tmp);
144 return convertDblArrToPyList<double>(tmp,sz);
147 virtual PyObject *getCellIdsHavingGaussLocalization(mcIdType locId) const
149 std::vector<mcIdType> tmp;
150 self->getCellIdsHavingGaussLocalization(locId,tmp);
151 DataArrayIdType *ret=DataArrayIdType::New();
152 ret->alloc(tmp.size(),1);
153 std::copy(tmp.begin(),tmp.end(),ret->getPointer());
154 return SWIG_NewPointerObj(SWIG_as_voidptr(ret),SWIGTITraits<mcIdType>::TI, SWIG_POINTER_OWN | 0 );
157 virtual void setGaussLocalizationOnCells(const MEDCouplingMesh *m, PyObject *li, const std::vector<double>& refCoo,
158 const std::vector<double>& gsCoo, const std::vector<double>& wg)
161 int res1=SWIG_ConvertPtr(li,&da,SWIGTITraits<mcIdType>::TI, 0 | 0 );
162 if (!SWIG_IsOK(res1))
165 INTERP_KERNEL::AutoPtr<mcIdType> tmp=convertPyToNewIntArr2(li,&size);
166 self->setGaussLocalizationOnCells(m,tmp,((mcIdType *)tmp)+size,refCoo,gsCoo,wg);
170 DataArrayIdType *da2=reinterpret_cast< DataArrayIdType * >(da);
172 throw INTERP_KERNEL::Exception("Not null DataArrayIdType instance expected !");
173 da2->checkAllocated();
174 self->setGaussLocalizationOnCells(m,da2->getConstPointer(),da2->getConstPointer()+da2->getNbOfElems(),refCoo,gsCoo,wg);
178 virtual PyObject *getGaussLocalizationIdsOfOneType(INTERP_KERNEL::NormalizedCellType type) const
180 std::set<mcIdType> ret=self->getGaussLocalizationIdsOfOneType(type);
181 return convertIntArrToPyList3(ret);
184 virtual PyObject *getValueOn(const DataArrayDouble *arr, const MEDCouplingMesh *mesh, PyObject *sl) const
188 DataArrayDoubleTuple *aa;
189 std::vector<double> bb;
192 throw INTERP_KERNEL::Exception("Python wrap of MEDCouplingFieldDiscretization::getValueOn : no underlying mesh !");
193 int spaceDim=mesh->getSpaceDimension();
194 const char msg[]="Python wrap of MEDCouplingFieldDiscretization::getValueOn : ";
195 const double *spaceLoc=convertObjToPossibleCpp5_Safe(sl,sw,val,a,aa,bb,msg,1,spaceDim,true);
197 INTERP_KERNEL::AutoPtr<double> res(new double[spaceDim]);
198 self->getValueOn(arr,mesh,spaceLoc,res);
199 return convertDblArrToPyList<double>(res,spaceDim);
202 virtual PyObject *getValueOnPos(const DataArrayDouble *arr, const MEDCouplingMesh *mesh, mcIdType i, mcIdType j, mcIdType k) const
205 throw INTERP_KERNEL::Exception("wrap of MEDCouplingFieldDiscretization::getValueOnPos : input array is null !");
206 std::size_t sz(arr->getNumberOfComponents());
207 INTERP_KERNEL::AutoPtr<double> res=new double[sz];
208 self->getValueOnPos(arr,mesh,i,j,k,res);
209 return convertDblArrToPyList<double>(res,sz);
212 virtual DataArrayDouble *getValueOnMulti(const DataArrayDouble *arr, const MEDCouplingMesh *mesh, PyObject *loc) const
215 throw INTERP_KERNEL::Exception("Python wrap MEDCouplingFieldDiscretization::getValueOnMulti : null input mesh !");
218 double v0; MEDCoupling::DataArrayDouble *v1(0); MEDCoupling::DataArrayDoubleTuple *v2(0); std::vector<double> v3;
219 const double *inp=convertObjToPossibleCpp5_Safe2(loc,sw,v0,v1,v2,v3,"wrap of MEDCouplingFieldDouble::getValueOnMulti",
220 mesh->getSpaceDimension(),true,nbPts);
221 return self->getValueOnMulti(arr,mesh,inp,nbPts);
224 virtual void renumberCells(PyObject *li, bool check=true)
227 mcIdType v0; std::vector<mcIdType> v1;
228 const mcIdType *ids(convertIntStarLikePyObjToCppIntStar(li,sw,sz,v0,v1));
229 self->renumberCells(ids,check);
232 virtual void renumberArraysForCell(const MEDCouplingMesh *mesh, PyObject *arrays,
233 PyObject *old2New, bool check)
235 std::vector<DataArray *> input1;
236 convertFromPyObjVectorOfObj<MEDCoupling::DataArray *>(arrays,SWIGTYPE_p_MEDCoupling__DataArray,"DataArray",input1);
239 mcIdType v0; std::vector<mcIdType> v1;
240 const mcIdType *old2NewBg(convertIntStarLikePyObjToCppIntStar(old2New,sw,sz,v0,v1));
242 self->renumberArraysForCell(mesh,input1,old2NewBg,check);
245 virtual DataArrayIdType *computeTupleIdsToSelectFromCellIds(const MEDCouplingMesh *mesh, PyObject *cellIds) const
248 mcIdType v0; std::vector<mcIdType> v1;
249 const mcIdType *cellIdsBg(convertIntStarLikePyObjToCppIntStar(cellIds,sw,sz,v0,v1));
250 return self->computeTupleIdsToSelectFromCellIds(mesh,cellIdsBg,cellIdsBg+sz);
253 virtual PyObject *buildSubMeshData(const MEDCouplingMesh *mesh, PyObject *ids)
256 mcIdType v0; std::vector<mcIdType> v1;
257 const mcIdType *idsBg(convertIntStarLikePyObjToCppIntStar(ids,sw,sz,v0,v1));
258 DataArrayIdType *di(0);
259 MEDCouplingMesh *ret0=self->buildSubMeshData(mesh,idsBg,idsBg+sz,di);
260 PyObject *ret=PyTuple_New(2);
261 PyTuple_SetItem(ret,0,convertMesh(ret0, SWIG_POINTER_OWN | 0 ));
262 PyTuple_SetItem(ret,1,SWIG_NewPointerObj(SWIG_as_voidptr(di),SWIGTITraits<mcIdType>::TI, SWIG_POINTER_OWN | 0 ));
266 virtual void renumberValuesOnNodes(double epsOnVals, PyObject *old2New, mcIdType newNbOfNodes, DataArrayDouble *arr) const
269 mcIdType v0; std::vector<mcIdType> v1;
270 const mcIdType *old2NewBg(convertIntStarLikePyObjToCppIntStar(old2New,sw,sz,v0,v1));
271 self->renumberValuesOnNodes(epsOnVals,old2NewBg,newNbOfNodes,arr);
274 virtual void renumberValuesOnCells(double epsOnVals, const MEDCouplingMesh *mesh, PyObject *old2New, mcIdType newSz, DataArrayDouble *arr) const
277 mcIdType v0; std::vector<mcIdType> v1;
278 const mcIdType *old2NewBg(convertIntStarLikePyObjToCppIntStar(old2New,sw,sz,v0,v1));
279 self->renumberValuesOnCells(epsOnVals,mesh,old2NewBg,newSz,arr);
282 virtual void renumberValuesOnCellsR(const MEDCouplingMesh *mesh, PyObject *new2old, mcIdType newSz, DataArrayDouble *arr) const
285 mcIdType v0; std::vector<mcIdType> v1;
286 const mcIdType *new2oldBg(convertIntStarLikePyObjToCppIntStar(new2old,sw,sz,v0,v1));
287 self->renumberValuesOnCellsR(mesh,new2oldBg,newSz,arr);
292 class MEDCouplingFieldDiscretizationP0 : public MEDCouplingFieldDiscretization
296 class MEDCouplingFieldDiscretizationOnNodes : public MEDCouplingFieldDiscretization
300 class MEDCouplingFieldDiscretizationP1 : public MEDCouplingFieldDiscretizationOnNodes
304 class MEDCouplingFieldDiscretizationPerCell : public MEDCouplingFieldDiscretization
307 void setArrayOfDiscIds(const DataArrayIdType *adids);
308 void checkNoOrphanCells() const;
311 PyObject *getArrayOfDiscIds() const
313 DataArrayIdType *ret=const_cast<DataArrayIdType *>(self->getArrayOfDiscIds());
316 return SWIG_NewPointerObj(SWIG_as_voidptr(ret),SWIGTITraits<mcIdType>::TI, SWIG_POINTER_OWN | 0 );
319 PyObject *splitIntoSingleGaussDicrPerCellType() const
321 std::vector<mcIdType> ret1;
322 std::vector<DataArrayIdType *> ret0=self->splitIntoSingleGaussDicrPerCellType(ret1);
323 std::size_t sz=ret0.size();
324 PyObject *pyRet=PyTuple_New(2);
325 PyObject *pyRet0=PyList_New((mcIdType)sz);
326 PyObject *pyRet1=PyList_New((mcIdType)sz);
327 for(std::size_t i=0;i<sz;i++)
329 PyList_SetItem(pyRet0,i,SWIG_NewPointerObj(SWIG_as_voidptr(ret0[i]),SWIGTITraits<mcIdType>::TI, SWIG_POINTER_OWN | 0 ));
330 PyList_SetItem(pyRet1,i,PyInt_FromLong(ret1[i]));
332 PyTuple_SetItem(pyRet,0,pyRet0);
333 PyTuple_SetItem(pyRet,1,pyRet1);
338 ~MEDCouplingFieldDiscretizationPerCell();
341 class MEDCouplingFieldDiscretizationGauss : public MEDCouplingFieldDiscretizationPerCell
344 MEDCouplingFieldDiscretizationGauss();
347 class MEDCouplingFieldDiscretizationGaussNE : public MEDCouplingFieldDiscretization
352 static PyObject *GetWeightArrayFromGeometricType(INTERP_KERNEL::NormalizedCellType geoType)
355 const double *ret(MEDCouplingFieldDiscretizationGaussNE::GetWeightArrayFromGeometricType(geoType,sz));
356 return convertDblArrToPyList<double>(ret,ToIdType(sz));
359 static PyObject *GetRefCoordsFromGeometricType(INTERP_KERNEL::NormalizedCellType geoType)
362 const double *ret(MEDCouplingFieldDiscretizationGaussNE::GetRefCoordsFromGeometricType(geoType,sz));
363 return convertDblArrToPyList<double>(ret,ToIdType(sz));
366 static PyObject *GetLocsFromGeometricType(INTERP_KERNEL::NormalizedCellType geoType)
369 const double *ret(MEDCouplingFieldDiscretizationGaussNE::GetLocsFromGeometricType(geoType,sz));
370 return convertDblArrToPyList<double>(ret,ToIdType(sz));
375 class MEDCouplingFieldDiscretizationKriging : public MEDCouplingFieldDiscretizationOnNodes
378 static DataArrayDouble *PerformDriftOfVec(const DataArrayDouble *arr, mcIdType isDrift);
381 PyObject *computeVectorOfCoefficients(const MEDCouplingMesh *mesh, const DataArrayDouble *arr) const
384 DataArrayDouble *ret0=self->computeVectorOfCoefficients(mesh,arr,ret1);
385 PyObject *ret=PyTuple_New(2);
386 PyTuple_SetItem(ret,0,SWIG_NewPointerObj(SWIG_as_voidptr(ret0),SWIGTYPE_p_MEDCoupling__DataArrayDouble, SWIG_POINTER_OWN | 0 ));
387 PyTuple_SetItem(ret,1,PyInt_FromLong(ret1));
391 PyObject *computeInverseMatrix(const MEDCouplingMesh *mesh) const
393 mcIdType ret1(-1),ret2(-1);
394 DataArrayDouble *ret0=self->computeInverseMatrix(mesh,ret1,ret2);
395 PyObject *ret=PyTuple_New(3);
396 PyTuple_SetItem(ret,0,SWIG_NewPointerObj(SWIG_as_voidptr(ret0),SWIGTYPE_p_MEDCoupling__DataArrayDouble, SWIG_POINTER_OWN | 0 ));
397 PyTuple_SetItem(ret,1,PyInt_FromLong(ret1));
398 PyTuple_SetItem(ret,2,PyInt_FromLong(ret2));
402 PyObject *computeMatrix(const MEDCouplingMesh *mesh) const
404 mcIdType ret1(-1),ret2(-1);
405 DataArrayDouble *ret0=self->computeMatrix(mesh,ret1,ret2);
406 PyObject *ret=PyTuple_New(3);
407 PyTuple_SetItem(ret,0,SWIG_NewPointerObj(SWIG_as_voidptr(ret0),SWIGTYPE_p_MEDCoupling__DataArrayDouble, SWIG_POINTER_OWN | 0 ));
408 PyTuple_SetItem(ret,1,PyInt_FromLong(ret1));
409 PyTuple_SetItem(ret,2,PyInt_FromLong(ret2));
413 PyObject *computeEvaluationMatrixOnGivenPts(const MEDCouplingMesh *mesh, PyObject *locs) const
416 throw INTERP_KERNEL::Exception("wrap of MEDCouplingFieldDiscretizationKriging::computeEvaluationMatrixOnGivenPts : input mesh is empty !");
418 double v0; MEDCoupling::DataArrayDouble *v1(0); MEDCoupling::DataArrayDoubleTuple *v2(0); std::vector<double> v3;
419 const double *inp=convertObjToPossibleCpp5_Safe2(locs,sw,v0,v1,v2,v3,"wrap of MEDCouplingFieldDiscretizationKriging::computeEvaluationMatrixOnGivenPts",
420 mesh->getSpaceDimension(),true,nbPts);
423 DataArrayDouble *ret0=self->computeEvaluationMatrixOnGivenPts(mesh,inp,nbPts,ret1);
424 PyObject *ret=PyTuple_New(2);
425 PyTuple_SetItem(ret,0,SWIG_NewPointerObj(SWIG_as_voidptr(ret0),SWIGTYPE_p_MEDCoupling__DataArrayDouble, SWIG_POINTER_OWN | 0 ));
426 PyTuple_SetItem(ret,1,PyInt_FromLong(ret1));
430 void operateOnDenseMatrix(int spaceDimension, DataArrayDouble *myMatrix) const
432 if(!myMatrix || !myMatrix->isAllocated() || myMatrix->getNumberOfComponents()!=1)
433 throw INTERP_KERNEL::Exception("Wrap of MEDCouplingFieldDiscretizationKriging::operateOnDenseMatrix : invalid input matrix as DataArrayDouble ! Must be allocated with one component !");
434 self->operateOnDenseMatrix(spaceDimension,myMatrix->getNumberOfTuples(),myMatrix->getPointer());
437 PyObject *performDrift(const DataArrayDouble *matr, const DataArrayDouble *arr) const
440 DataArrayDouble *ret0(self->performDrift(matr,arr,ret1));
441 PyObject *res(PyTuple_New(2));
442 PyTuple_SetItem(res,0,SWIG_NewPointerObj((void*)ret0,SWIGTYPE_p_MEDCoupling__DataArrayDouble,SWIG_POINTER_OWN | 0));
443 PyTuple_SetItem(res,1,PyInt_FromLong(ret1));
447 static PyObject *PerformDriftRect(const DataArrayDouble *matr, const DataArrayDouble *arr)
450 DataArrayDouble *ret0(MEDCouplingFieldDiscretizationKriging::PerformDriftRect(matr,arr,ret1));
451 PyObject *res(PyTuple_New(2));
452 PyTuple_SetItem(res,0,SWIG_NewPointerObj((void*)ret0,SWIGTYPE_p_MEDCoupling__DataArrayDouble,SWIG_POINTER_OWN | 0));
453 PyTuple_SetItem(res,1,PyInt_FromLong(ret1));
457 static void OperateOnDenseMatrixH3(DataArrayDouble *myMatrix)
459 if(!myMatrix || !myMatrix->isAllocated() || myMatrix->getNumberOfComponents()!=1)
460 throw INTERP_KERNEL::Exception("Wrap of MEDCouplingFieldDiscretizationKriging::OperateOnDenseMatrixH3 : invalid input matrix as DataArrayDouble ! Must be allocated with one component !");
461 MEDCouplingFieldDiscretizationKriging::OperateOnDenseMatrixH3(myMatrix->getNumberOfTuples(),myMatrix->getPointer());
464 static void OperateOnDenseMatrixH2Ln(DataArrayDouble *myMatrix) //throw(INTERP_KERNEL::Exception)
466 if(!myMatrix || !myMatrix->isAllocated() || myMatrix->getNumberOfComponents()!=1)
467 throw INTERP_KERNEL::Exception("Wrap of MEDCouplingFieldDiscretizationKriging::OperateOnDenseMatrixH2Ln : invalid input matrix as DataArrayDouble ! Must be allocated with one component !");
468 MEDCouplingFieldDiscretizationKriging::OperateOnDenseMatrixH2Ln(myMatrix->getNumberOfTuples(),myMatrix->getPointer());
473 class MEDCouplingFieldDiscretizationOnNodesFE : public MEDCouplingFieldDiscretizationOnNodes
478 DataArrayDouble *getCooInRefElement(const MEDCouplingMesh *mesh, PyObject *locs)
481 double v0; MEDCoupling::DataArrayDouble *v1(0); MEDCoupling::DataArrayDoubleTuple *v2(0); std::vector<double> v3;
482 const double *inp=convertObjToPossibleCpp5_Safe2(locs,sw,v0,v1,v2,v3,"wrap of MEDCouplingFieldDouble::getValueOnMulti",
483 mesh->getSpaceDimension(),true,nbPts);
484 MCAuto<DataArrayDouble> ret(self->getCooInRefElement(mesh,inp,nbPts));