Salome HOME
Cleanup swigging.
[tools/medcoupling.git] / src / MEDCoupling_Swig / MEDCouplingFieldDiscretization.i
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 %newobject ParaMEDMEM::MEDCouplingFieldDiscretization::New;
22 %newobject ParaMEDMEM::MEDCouplingFieldDiscretization::deepCpy;
23 %newobject ParaMEDMEM::MEDCouplingFieldDiscretization::clone;
24 %newobject ParaMEDMEM::MEDCouplingFieldDiscretization::clonePartRange;
25 %newobject ParaMEDMEM::MEDCouplingFieldDiscretization::getOffsetArr;
26 %newobject ParaMEDMEM::MEDCouplingFieldDiscretization::getLocalizationOfDiscValues;
27 %newobject ParaMEDMEM::MEDCouplingFieldDiscretization::getMeasureField;
28 %newobject ParaMEDMEM::MEDCouplingFieldDiscretization::clonePart;
29 %newobject ParaMEDMEM::MEDCouplingFieldDiscretization::getValueOnMulti;
30 %newobject ParaMEDMEM::MEDCouplingFieldDiscretization::computeTupleIdsToSelectFromCellIds;
31
32 namespace ParaMEDMEM
33 {
34   class MEDCouplingFieldDiscretization : public RefCountObject, public TimeLabel
35   {
36   public:
37     static MEDCouplingFieldDiscretization *New(TypeOfField type) throw(INTERP_KERNEL::Exception);
38     double getPrecision() const throw(INTERP_KERNEL::Exception);
39     void setPrecision(double val) throw(INTERP_KERNEL::Exception);
40     static TypeOfField GetTypeOfFieldFromStringRepr(const char *repr) throw(INTERP_KERNEL::Exception);
41     virtual TypeOfField getEnum() const throw(INTERP_KERNEL::Exception);
42     virtual bool isEqual(const MEDCouplingFieldDiscretization *other, double eps) const throw(INTERP_KERNEL::Exception);
43     virtual bool isEqualIfNotWhy(const MEDCouplingFieldDiscretization *other, double eps, std::string& reason) const throw(INTERP_KERNEL::Exception);
44     virtual bool isEqualWithoutConsideringStr(const MEDCouplingFieldDiscretization *other, double eps) const throw(INTERP_KERNEL::Exception);
45     virtual MEDCouplingFieldDiscretization *deepCpy() const throw(INTERP_KERNEL::Exception);
46     virtual MEDCouplingFieldDiscretization *clone() const throw(INTERP_KERNEL::Exception);
47     virtual MEDCouplingFieldDiscretization *clonePartRange(int beginCellIds, int endCellIds, int stepCellIds) const throw(INTERP_KERNEL::Exception);
48     virtual std::string getStringRepr() const throw(INTERP_KERNEL::Exception);
49     virtual const char *getRepr() const throw(INTERP_KERNEL::Exception);
50     virtual int getNumberOfTuples(const MEDCouplingMesh *mesh) const throw(INTERP_KERNEL::Exception);
51     virtual int getNumberOfMeshPlaces(const MEDCouplingMesh *mesh) const throw(INTERP_KERNEL::Exception);
52     virtual DataArrayInt *getOffsetArr(const MEDCouplingMesh *mesh) const throw(INTERP_KERNEL::Exception);
53     virtual DataArrayDouble *getLocalizationOfDiscValues(const MEDCouplingMesh *mesh) const throw(INTERP_KERNEL::Exception);
54     virtual void checkCompatibilityWithNature(NatureOfField nat) const throw(INTERP_KERNEL::Exception);
55     virtual double getIJK(const MEDCouplingMesh *mesh, const DataArrayDouble *da, int cellId, int nodeIdInCell, int compoId) const throw(INTERP_KERNEL::Exception);
56     virtual void checkCoherencyBetween(const MEDCouplingMesh *mesh, const DataArray *da) const throw(INTERP_KERNEL::Exception);
57     virtual MEDCouplingFieldDouble *getMeasureField(const MEDCouplingMesh *mesh, bool isAbs) const throw(INTERP_KERNEL::Exception);
58     virtual void setGaussLocalizationOnType(const MEDCouplingMesh *m, INTERP_KERNEL::NormalizedCellType type, const std::vector<double>& refCoo,
59                                             const std::vector<double>& gsCoo, const std::vector<double>& wg) throw(INTERP_KERNEL::Exception);
60     virtual void clearGaussLocalizations() throw(INTERP_KERNEL::Exception);
61     virtual MEDCouplingGaussLocalization& getGaussLocalization(int locId) throw(INTERP_KERNEL::Exception);
62     virtual int getNbOfGaussLocalization() const throw(INTERP_KERNEL::Exception);
63     virtual int getGaussLocalizationIdOfOneCell(int cellId) const throw(INTERP_KERNEL::Exception);
64     virtual int getGaussLocalizationIdOfOneType(INTERP_KERNEL::NormalizedCellType type) const throw(INTERP_KERNEL::Exception);
65     %extend
66     {
67       virtual MEDCouplingFieldDiscretization *clonePart(PyObject *li)
68       {
69         int sz=0,sw=-1,val1=-1;
70         std::vector<int> val2;
71         const int *inp=convertObjToPossibleCpp1_Safe(li,sw,sz,val1,val2);
72         return self->clonePart(inp,inp+sz);
73       }
74       
75       virtual PyObject *buildSubMeshDataRange(const MEDCouplingMesh *mesh, int beginCellIds, int endCellIds, int stepCellIds, int& beginOut, int& endOut, int& stepOut, DataArrayInt *&di) const throw(INTERP_KERNEL::Exception)
76       {
77         DataArrayInt *ret1=0;
78         int bb,ee,ss;
79         MEDCouplingMesh *ret0=self->buildSubMeshDataRange(mesh,beginCellIds,endCellIds,stepCellIds,bb,ee,ss,ret1);
80         PyObject *res=PyTuple_New(2);
81         PyTuple_SetItem(res,0,convertMesh(ret0, SWIG_POINTER_OWN | 0 ));
82         if(ret1)
83           PyTuple_SetItem(res,1,SWIG_NewPointerObj((void*)ret1,SWIGTYPE_p_ParaMEDMEM__DataArrayInt,SWIG_POINTER_OWN | 0));
84         else
85           {
86             PyObject *res1=PySlice_New(PyInt_FromLong(bb),PyInt_FromLong(ee),PyInt_FromLong(ss));
87             PyTuple_SetItem(res,1,res1);
88           }
89         return res;
90       }
91
92       virtual int getNumberOfTuplesExpectedRegardingCode(const MEDCouplingMesh *mesh, PyObject *code, PyObject *idsPerType) const throw(INTERP_KERNEL::Exception)
93       {
94         std::vector<int> inp0;
95         convertPyToNewIntArr4(code,1,3,inp0);
96         std::vector<const DataArrayInt *> inp1;
97         convertFromPyObjVectorOfObj<const ParaMEDMEM::DataArrayInt *>(idsPerType,SWIGTYPE_p_ParaMEDMEM__DataArrayInt,"DataArrayInt",inp1);
98         return self->getNumberOfTuplesExpectedRegardingCode(mesh,inp0,inp1);
99       }
100
101       virtual PyObject *computeMeshRestrictionFromTupleIds(const MEDCouplingMesh *mesh, PyObject *tupleIds) const throw(INTERP_KERNEL::Exception)
102       {
103         std::vector<int> vVal; int iVal=-1;
104         int sz=-1,sw=0;
105         const int *tupleIdsBg=convertObjToPossibleCpp1_Safe(tupleIds,sw,sz,iVal,vVal);
106         if(sw==0)
107           throw INTERP_KERNEL::Exception("MEDCouplingFieldDiscretization::computeMeshRestrictionFromTupleIds : none parameter in input !");
108         DataArrayInt *ret0=0,*ret1=0;
109         self->computeMeshRestrictionFromTupleIds(mesh,tupleIdsBg,tupleIdsBg+sz,ret0,ret1);
110         PyObject *pyRet=PyTuple_New(2);
111         PyTuple_SetItem(pyRet,0,SWIG_NewPointerObj(SWIG_as_voidptr(ret0),SWIGTYPE_p_ParaMEDMEM__DataArrayInt, SWIG_POINTER_OWN | 0 ));
112         PyTuple_SetItem(pyRet,1,SWIG_NewPointerObj(SWIG_as_voidptr(ret1),SWIGTYPE_p_ParaMEDMEM__DataArrayInt, SWIG_POINTER_OWN | 0 ));
113         return pyRet;
114       }
115
116       virtual PyObject *normL1(const MEDCouplingMesh *mesh, const DataArrayDouble *arr) const throw(INTERP_KERNEL::Exception)
117       {
118         if(!arr)
119           throw INTERP_KERNEL::Exception("wrap of MEDCouplingFieldDiscretization::normL1 : input array is null !");
120         int sz(arr->getNumberOfComponents());
121         INTERP_KERNEL::AutoPtr<double> tmp=new double[sz];
122         self->normL1(mesh,arr,tmp);
123         return convertDblArrToPyList(tmp,sz);
124       }
125
126       virtual PyObject *normL2(const MEDCouplingMesh *mesh, const DataArrayDouble *arr) const throw(INTERP_KERNEL::Exception)
127       {
128         if(!arr)
129           throw INTERP_KERNEL::Exception("wrap of MEDCouplingFieldDiscretization::normL2 : input array is null !");
130         int sz(arr->getNumberOfComponents());
131         INTERP_KERNEL::AutoPtr<double> tmp=new double[sz];
132         self->normL2(mesh,arr,tmp);
133         return convertDblArrToPyList(tmp,sz);
134       }
135
136       virtual PyObject *integral(const MEDCouplingMesh *mesh, const DataArrayDouble *arr, bool isWAbs) const throw(INTERP_KERNEL::Exception)
137       {
138         if(!arr)
139           throw INTERP_KERNEL::Exception("wrap of MEDCouplingFieldDiscretization::integral : input array is null !");
140         int sz(arr->getNumberOfComponents());
141         INTERP_KERNEL::AutoPtr<double> tmp=new double[sz];
142         self->integral(mesh,arr,isWAbs,tmp);
143         return convertDblArrToPyList(tmp,sz);
144       }
145
146       virtual PyObject *getCellIdsHavingGaussLocalization(int locId) const throw(INTERP_KERNEL::Exception)
147       {
148         std::vector<int> tmp;
149         self->getCellIdsHavingGaussLocalization(locId,tmp);
150         DataArrayInt *ret=DataArrayInt::New();
151         ret->alloc((int)tmp.size(),1);
152         std::copy(tmp.begin(),tmp.end(),ret->getPointer());
153         return SWIG_NewPointerObj(SWIG_as_voidptr(ret),SWIGTYPE_p_ParaMEDMEM__DataArrayInt, SWIG_POINTER_OWN | 0 );
154       }
155
156       virtual void setGaussLocalizationOnCells(const MEDCouplingMesh *m, PyObject *li, const std::vector<double>& refCoo,
157                                                const std::vector<double>& gsCoo, const std::vector<double>& wg) throw(INTERP_KERNEL::Exception)
158       {
159         void *da=0;
160         int res1=SWIG_ConvertPtr(li,&da,SWIGTYPE_p_ParaMEDMEM__DataArrayInt, 0 |  0 );
161         if (!SWIG_IsOK(res1))
162           {
163             int size;
164             INTERP_KERNEL::AutoPtr<int> tmp=convertPyToNewIntArr2(li,&size);
165             self->setGaussLocalizationOnCells(m,tmp,((int *)tmp)+size,refCoo,gsCoo,wg);
166           }
167         else
168           {
169             DataArrayInt *da2=reinterpret_cast< DataArrayInt * >(da);
170             if(!da2)
171               throw INTERP_KERNEL::Exception("Not null DataArrayInt instance expected !");
172             da2->checkAllocated();
173             self->setGaussLocalizationOnCells(m,da2->getConstPointer(),da2->getConstPointer()+da2->getNbOfElems(),refCoo,gsCoo,wg);
174           }
175       }
176
177       virtual PyObject *getGaussLocalizationIdsOfOneType(INTERP_KERNEL::NormalizedCellType type) const throw(INTERP_KERNEL::Exception)
178       {
179         std::set<int> ret=self->getGaussLocalizationIdsOfOneType(type);
180         return convertIntArrToPyList3(ret);
181       }
182
183       virtual PyObject *getValueOn(const DataArrayDouble *arr, const MEDCouplingMesh *mesh, PyObject *sl) const throw(INTERP_KERNEL::Exception)
184       {
185         double val;
186         DataArrayDouble *a;
187         DataArrayDoubleTuple *aa;
188         std::vector<double> bb;
189         int sw;
190         if(!mesh)
191           throw INTERP_KERNEL::Exception("Python wrap of MEDCouplingFieldDiscretization::getValueOn : no underlying mesh !");
192         int spaceDim=mesh->getSpaceDimension();
193         const char msg[]="Python wrap of MEDCouplingFieldDiscretization::getValueOn : ";
194         const double *spaceLoc=convertObjToPossibleCpp5_Safe(sl,sw,val,a,aa,bb,msg,1,spaceDim,true);
195         //
196         INTERP_KERNEL::AutoPtr<double> res(new double[spaceDim]);
197         self->getValueOn(arr,mesh,spaceLoc,res);
198         return convertDblArrToPyList(res,spaceDim);
199       }
200
201       virtual PyObject *getValueOnPos(const DataArrayDouble *arr, const MEDCouplingMesh *mesh, int i, int j, int k) const throw(INTERP_KERNEL::Exception)
202       {
203         if(!arr)
204           throw INTERP_KERNEL::Exception("wrap of MEDCouplingFieldDiscretization::getValueOnPos : input array is null !");
205         int sz(arr->getNumberOfComponents());
206          INTERP_KERNEL::AutoPtr<double> res=new double[sz];
207          self->getValueOnPos(arr,mesh,i,j,k,res);
208          return convertDblArrToPyList(res,sz);
209        }
210       
211       virtual DataArrayDouble *getValueOnMulti(const DataArrayDouble *arr, const MEDCouplingMesh *mesh, PyObject *loc) const throw(INTERP_KERNEL::Exception)
212       {
213         if(!mesh)
214           throw INTERP_KERNEL::Exception("Python wrap MEDCouplingFieldDiscretization::getValueOnMulti : null input mesh !");
215         //
216         int sw,nbPts;
217         double v0; ParaMEDMEM::DataArrayDouble *v1(0); ParaMEDMEM::DataArrayDoubleTuple *v2(0); std::vector<double> v3;
218         const double *inp=convertObjToPossibleCpp5_Safe2(loc,sw,v0,v1,v2,v3,"wrap of MEDCouplingFieldDouble::getValueOnMulti",
219                                                          mesh->getSpaceDimension(),true,nbPts);
220         return self->getValueOnMulti(arr,mesh,inp,nbPts);
221       }
222
223       virtual void renumberCells(PyObject *li, bool check=true) throw(INTERP_KERNEL::Exception)
224       {
225         int sw,sz(-1);
226         int v0; std::vector<int> v1;
227         const int *ids(convertObjToPossibleCpp1_Safe(li,sw,sz,v0,v1));
228         self->renumberCells(ids,check);
229       }
230
231       virtual void renumberArraysForCell(const MEDCouplingMesh *mesh, PyObject *arrays,
232                                          PyObject *old2New, bool check) throw(INTERP_KERNEL::Exception)
233       {
234         std::vector<DataArray *> input1;
235         convertFromPyObjVectorOfObj<ParaMEDMEM::DataArray *>(arrays,SWIGTYPE_p_ParaMEDMEM__DataArray,"DataArray",input1);
236         //
237         int sw,sz(-1);
238         int v0; std::vector<int> v1;
239         const int *old2NewBg(convertObjToPossibleCpp1_Safe(old2New,sw,sz,v0,v1));
240         //
241         self->renumberArraysForCell(mesh,input1,old2NewBg,check);
242       }
243       
244       virtual DataArrayInt *computeTupleIdsToSelectFromCellIds(const MEDCouplingMesh *mesh, PyObject *cellIds) const throw(INTERP_KERNEL::Exception)
245       {
246         int sw,sz(-1);
247         int v0; std::vector<int> v1;
248         const int *cellIdsBg(convertObjToPossibleCpp1_Safe(cellIds,sw,sz,v0,v1));
249         return self->computeTupleIdsToSelectFromCellIds(mesh,cellIdsBg,cellIdsBg+sz);
250       }
251
252       virtual PyObject *buildSubMeshData(const MEDCouplingMesh *mesh, PyObject *ids) const throw(INTERP_KERNEL::Exception)
253       {
254         int sw,sz(-1);
255         int v0; std::vector<int> v1;
256         const int *idsBg(convertObjToPossibleCpp1_Safe(ids,sw,sz,v0,v1));
257         DataArrayInt *di(0);
258         MEDCouplingMesh *ret0=self->buildSubMeshData(mesh,idsBg,idsBg+sz,di);
259         PyObject *ret=PyTuple_New(2);
260         PyTuple_SetItem(ret,0,convertMesh(ret0, SWIG_POINTER_OWN | 0 ));
261         PyTuple_SetItem(ret,1,SWIG_NewPointerObj(SWIG_as_voidptr(di),SWIGTYPE_p_ParaMEDMEM__DataArrayInt, SWIG_POINTER_OWN | 0 ));
262         return ret;
263       }
264
265       virtual void renumberValuesOnNodes(double epsOnVals, PyObject *old2New, int newNbOfNodes, DataArrayDouble *arr) const throw(INTERP_KERNEL::Exception)
266       {
267         int sw,sz(-1);
268         int v0; std::vector<int> v1;
269         const int *old2NewBg(convertObjToPossibleCpp1_Safe(old2New,sw,sz,v0,v1));
270         self->renumberValuesOnNodes(epsOnVals,old2NewBg,newNbOfNodes,arr);
271       }
272
273       virtual void renumberValuesOnCells(double epsOnVals, const MEDCouplingMesh *mesh, PyObject *old2New, int newSz, DataArrayDouble *arr) const throw(INTERP_KERNEL::Exception)
274       {
275         int sw,sz(-1);
276         int v0; std::vector<int> v1;
277         const int *old2NewBg(convertObjToPossibleCpp1_Safe(old2New,sw,sz,v0,v1));
278         self->renumberValuesOnCells(epsOnVals,mesh,old2NewBg,newSz,arr);
279       }
280
281       virtual void renumberValuesOnCellsR(const MEDCouplingMesh *mesh, PyObject *new2old, int newSz, DataArrayDouble *arr) const throw(INTERP_KERNEL::Exception)
282       {
283         int sw,sz(-1);
284         int v0; std::vector<int> v1;
285         const int *new2oldBg(convertObjToPossibleCpp1_Safe(new2old,sw,sz,v0,v1));
286         self->renumberValuesOnCellsR(mesh,new2oldBg,newSz,arr);
287       }
288     }
289   };
290
291   class MEDCouplingFieldDiscretizationP0 : public MEDCouplingFieldDiscretization
292   {
293   };
294
295   class MEDCouplingFieldDiscretizationOnNodes : public MEDCouplingFieldDiscretization
296   {
297   };
298
299   class MEDCouplingFieldDiscretizationP1 : public MEDCouplingFieldDiscretizationOnNodes
300   {
301   };
302   
303   class MEDCouplingFieldDiscretizationPerCell : public MEDCouplingFieldDiscretization
304   {
305   public:
306     void setArrayOfDiscIds(const DataArrayInt *adids) throw(INTERP_KERNEL::Exception);
307     void checkNoOrphanCells() const throw(INTERP_KERNEL::Exception);
308     %extend
309     {
310       PyObject *getArrayOfDiscIds() const
311       {
312         DataArrayInt *ret=const_cast<DataArrayInt *>(self->getArrayOfDiscIds());
313         if(ret)
314           ret->incrRef();
315         return SWIG_NewPointerObj(SWIG_as_voidptr(ret),SWIGTYPE_p_ParaMEDMEM__DataArrayInt, SWIG_POINTER_OWN | 0 );
316       }
317
318       PyObject *splitIntoSingleGaussDicrPerCellType() const throw(INTERP_KERNEL::Exception)
319       {
320         std::vector<int> ret1;
321         std::vector<DataArrayInt *> ret0=self->splitIntoSingleGaussDicrPerCellType(ret1);
322         std::size_t sz=ret0.size();
323         PyObject *pyRet=PyTuple_New(2);
324         PyObject *pyRet0=PyList_New((int)sz);
325         PyObject *pyRet1=PyList_New((int)sz);
326         for(std::size_t i=0;i<sz;i++)
327           {
328             PyList_SetItem(pyRet0,i,SWIG_NewPointerObj(SWIG_as_voidptr(ret0[i]),SWIGTYPE_p_ParaMEDMEM__DataArrayInt, SWIG_POINTER_OWN | 0 ));
329             PyList_SetItem(pyRet1,i,PyInt_FromLong(ret1[i]));
330           }
331         PyTuple_SetItem(pyRet,0,pyRet0);
332         PyTuple_SetItem(pyRet,1,pyRet1);
333         return pyRet;
334       }
335     }
336   protected:
337     ~MEDCouplingFieldDiscretizationPerCell();
338   };
339
340   class MEDCouplingFieldDiscretizationGauss : public MEDCouplingFieldDiscretizationPerCell
341   {
342   public:
343     MEDCouplingFieldDiscretizationGauss();
344   };
345
346   class MEDCouplingFieldDiscretizationGaussNE : public MEDCouplingFieldDiscretization
347   {
348   };
349
350   class MEDCouplingFieldDiscretizationKriging : public MEDCouplingFieldDiscretizationOnNodes
351   {
352   public:
353     %extend
354     {
355       PyObject *computeVectorOfCoefficients(const MEDCouplingMesh *mesh, const DataArrayDouble *arr) const throw(INTERP_KERNEL::Exception)
356       {
357         int ret1;
358         DataArrayDouble *ret0=self->computeVectorOfCoefficients(mesh,arr,ret1);
359         PyObject *ret=PyTuple_New(2);
360         PyTuple_SetItem(ret,0,SWIG_NewPointerObj(SWIG_as_voidptr(ret0),SWIGTYPE_p_ParaMEDMEM__DataArrayDouble, SWIG_POINTER_OWN | 0 ));
361         PyTuple_SetItem(ret,1,PyInt_FromLong(ret1));
362         return ret;
363       }
364       
365       PyObject *computeInverseMatrix(const MEDCouplingMesh *mesh) const throw(INTERP_KERNEL::Exception)
366       {
367         int ret1(-1),ret2(-1);
368         DataArrayDouble *ret0=self->computeInverseMatrix(mesh,ret1,ret2);
369         PyObject *ret=PyTuple_New(3);
370         PyTuple_SetItem(ret,0,SWIG_NewPointerObj(SWIG_as_voidptr(ret0),SWIGTYPE_p_ParaMEDMEM__DataArrayDouble, SWIG_POINTER_OWN | 0 ));
371         PyTuple_SetItem(ret,1,PyInt_FromLong(ret1));
372         PyTuple_SetItem(ret,2,PyInt_FromLong(ret2));
373         return ret;
374       }
375       
376       PyObject *computeEvaluationMatrixOnGivenPts(const MEDCouplingMesh *mesh, PyObject *locs) const throw(INTERP_KERNEL::Exception)
377       {
378         if(!mesh)
379           throw INTERP_KERNEL::Exception("wrap of MEDCouplingFieldDiscretizationKriging::computeEvaluationMatrixOnGivenPts : input mesh is empty !");
380         int sw,nbPts;
381         double v0; ParaMEDMEM::DataArrayDouble *v1(0); ParaMEDMEM::DataArrayDoubleTuple *v2(0); std::vector<double> v3;
382         const double *inp=convertObjToPossibleCpp5_Safe2(locs,sw,v0,v1,v2,v3,"wrap of MEDCouplingFieldDiscretizationKriging::computeEvaluationMatrixOnGivenPts",
383                                                          mesh->getSpaceDimension(),true,nbPts);
384         //
385         int ret1(-1);
386         DataArrayDouble *ret0=self->computeEvaluationMatrixOnGivenPts(mesh,inp,nbPts,ret1);
387         PyObject *ret=PyTuple_New(2);
388         PyTuple_SetItem(ret,0,SWIG_NewPointerObj(SWIG_as_voidptr(ret0),SWIGTYPE_p_ParaMEDMEM__DataArrayDouble, SWIG_POINTER_OWN | 0 ));
389         PyTuple_SetItem(ret,1,PyInt_FromLong(ret1));
390         return ret;
391       }
392     }
393   };
394 }