Salome HOME
Consequense of py wrap rationalization
[tools/medcoupling.git] / src / ParaMEDMEM_Swig / ParaMEDMEM.i
1 // Copyright (C) 2007-2016  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, or (at your option) any later version.
7 //
8 // This library is distributed in the hope that it will be useful,
9 // but WITHOUT ANY WARRANTY; without even the implied warranty of
10 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
11 // Lesser General Public License for more details.
12 //
13 // You should have received a copy of the GNU Lesser General Public
14 // License along with this library; if not, write to the Free Software
15 // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
16 //
17 // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
18 //
19
20 %module ParaMEDMEM
21
22 #define MEDCOUPLING_EXPORT
23 #define INTERPKERNEL_EXPORT
24
25 %include "MEDCouplingCommon.i"
26
27 %include std_set.i
28 %include std_string.i
29
30 %template() std::set<int>;
31
32 %{
33 #include "CommInterface.hxx"
34 #include "ProcessorGroup.hxx"
35 #include "Topology.hxx"
36 #include "MPIProcessorGroup.hxx"
37 #include "DEC.hxx"
38 #include "InterpKernelDEC.hxx"
39 #include "NonCoincidentDEC.hxx"
40 #include "StructuredCoincidentDEC.hxx"
41 #include "ParaMESH.hxx"
42 #include "ParaFIELD.hxx"
43 #include "ICoCoMEDField.hxx"
44 #include "ComponentTopology.hxx"
45
46 using namespace INTERP_KERNEL;
47 using namespace MEDCoupling;
48 using namespace ICoCo;
49 %}
50
51 %include "InterpolationOptions.hxx"
52 %include "CommInterface.hxx"
53 %include "ProcessorGroup.hxx"
54 %include "DECOptions.hxx"
55 %include "ParaMESH.hxx"
56 %include "ParaFIELD.hxx"
57 %include "MPIProcessorGroup.hxx"
58 %include "ComponentTopology.hxx"
59 %include "DEC.hxx"
60 %include "DisjointDEC.hxx"
61 %include "InterpKernelDEC.hxx"
62 %include "StructuredCoincidentDEC.hxx"
63
64 %include "ICoCoField.hxx"
65 %rename(ICoCoMEDField) ICoCo::MEDField;
66 %include "ICoCoMEDField.hxx"
67
68 %nodefaultctor;
69
70 /* This object can be used only if MED_ENABLE_FVM is defined*/
71 #ifdef MED_ENABLE_FVM
72 class NonCoincidentDEC : public DEC
73 {
74 public:
75   NonCoincidentDEC(ProcessorGroup& source, ProcessorGroup& target);
76 };
77 #endif
78
79 %extend MEDCoupling::ParaMESH
80 {
81   PyObject *getGlobalNumberingCell2() const
82   {
83     const int *tmp=self->getGlobalNumberingCell();
84     int size=self->getCellMesh()->getNumberOfCells();
85     PyObject *ret=PyList_New(size);
86     for(int i=0;i<size;i++)
87       PyList_SetItem(ret,i,PyInt_FromLong(tmp[i])); 
88     return ret;
89   }
90
91   PyObject *getGlobalNumberingFace2() const
92   {
93     const int *tmp=self->getGlobalNumberingFace();
94     int size=self->getFaceMesh()->getNumberOfCells();
95     PyObject *ret=PyList_New(size);
96     for(int i=0;i<size;i++)
97       PyList_SetItem(ret,i,PyInt_FromLong(tmp[i])); 
98     return ret;
99   }
100
101   PyObject *getGlobalNumberingNode2() const
102   {
103     const int *tmp=self->getGlobalNumberingNode();
104     int size=self->getCellMesh()->getNumberOfNodes();
105     PyObject *ret=PyList_New(size);
106     for(int i=0;i<size;i++)
107       PyList_SetItem(ret,i,PyInt_FromLong(tmp[i])); 
108     return ret;
109   }
110 }
111
112 %pythoncode %{
113 def MEDCouplingDataArrayDoubleIadd(self,*args):
114     import _ParaMEDMEM
115     return _ParaMEDMEM.DataArrayDouble____iadd___(self, self, *args)
116 def MEDCouplingDataArrayDoubleIsub(self,*args):
117     import _ParaMEDMEM
118     return _ParaMEDMEM.DataArrayDouble____isub___(self, self, *args)
119 def MEDCouplingDataArrayDoubleImul(self,*args):
120     import _ParaMEDMEM
121     return _ParaMEDMEM.DataArrayDouble____imul___(self, self, *args)
122 def MEDCouplingDataArrayDoubleIdiv(self,*args):
123     import _ParaMEDMEM
124     return _ParaMEDMEM.DataArrayDouble____idiv___(self, self, *args)
125 def MEDCouplingDataArrayDoubleIpow(self,*args):
126     import _ParaMEDMEM
127     return _ParaMEDMEM.DataArrayDouble____ipow___(self, self, *args)
128 def MEDCouplingFieldDoubleIadd(self,*args):
129     import _ParaMEDMEM
130     return _ParaMEDMEM.MEDCouplingFieldDouble____iadd___(self, self, *args)
131 def MEDCouplingFieldDoubleIsub(self,*args):
132     import _ParaMEDMEM
133     return _ParaMEDMEM.MEDCouplingFieldDouble____isub___(self, self, *args)
134 def MEDCouplingFieldDoubleImul(self,*args):
135     import _ParaMEDMEM
136     return _ParaMEDMEM.MEDCouplingFieldDouble____imul___(self, self, *args)
137 def MEDCouplingFieldDoubleIdiv(self,*args):
138     import _ParaMEDMEM
139     return _ParaMEDMEM.MEDCouplingFieldDouble____idiv___(self, self, *args)
140 def MEDCouplingFieldDoubleIpow(self,*args):
141     import _ParaMEDMEM
142     return _ParaMEDMEM.MEDCouplingFieldDouble____ipow___(self, self, *args)
143 def MEDCouplingDataArrayIntIadd(self,*args):
144     import _ParaMEDMEM
145     return _ParaMEDMEM.DataArrayInt____iadd___(self, self, *args)
146 def MEDCouplingDataArrayIntIsub(self,*args):
147     import _ParaMEDMEM
148     return _ParaMEDMEM.DataArrayInt____isub___(self, self, *args)
149 def MEDCouplingDataArrayIntImul(self,*args):
150     import _ParaMEDMEM
151     return _ParaMEDMEM.DataArrayInt____imul___(self, self, *args)
152 def MEDCouplingDataArrayIntIdiv(self,*args):
153     import _ParaMEDMEM
154     return _ParaMEDMEM.DataArrayInt____idiv___(self, self, *args)
155 def MEDCouplingDataArrayIntImod(self,*args):
156     import _ParaMEDMEM
157     return _ParaMEDMEM.DataArrayInt____imod___(self, self, *args)
158 def MEDCouplingDataArrayIntIpow(self,*args):
159     import _ParaMEDMEM
160     return _ParaMEDMEM.DataArrayInt____ipow___(self, self, *args)
161 def MEDCouplingDataArrayFloatIadd(self,*args):
162     import _ParaMEDMEM
163     return _ParaMEDMEM.DataArrayFloat____iadd___(self, self, *args)
164 def MEDCouplingDataArrayFloatIsub(self,*args):
165     import _ParaMEDMEM
166     return _ParaMEDMEM.DataArrayFloat____isub___(self, self, *args)
167 def MEDCouplingDataArrayFloatImul(self,*args):
168     import _ParaMEDMEM
169     return _ParaMEDMEM.DataArrayFloat____imul___(self, self, *args)
170 def MEDCouplingDataArrayFloatIdiv(self,*args):
171     import _ParaMEDMEM
172     return _ParaMEDMEM.DataArrayFloat____idiv___(self, self, *args)
173 def MEDCouplingDataArrayDoubleTupleIadd(self,*args):
174     import _ParaMEDMEM
175     return _ParaMEDMEM.DataArrayDoubleTuple____iadd___(self, self, *args)
176 def MEDCouplingDataArrayDoubleTupleIsub(self,*args):
177     import _ParaMEDMEM
178     return _ParaMEDMEM.DataArrayDoubleTuple____isub___(self, self, *args)
179 def MEDCouplingDataArrayDoubleTupleImul(self,*args):
180     import _ParaMEDMEM
181     return _ParaMEDMEM.DataArrayDoubleTuple____imul___(self, self, *args)
182 def MEDCouplingDataArrayDoubleTupleIdiv(self,*args):
183     import _ParaMEDMEM
184     return _ParaMEDMEM.DataArrayDoubleTuple____idiv___(self, self, *args)
185 def MEDCouplingDataArrayIntTupleIadd(self,*args):
186     import _ParaMEDMEM
187     return _ParaMEDMEM.DataArrayIntTuple____iadd___(self, self, *args)
188 def MEDCouplingDataArrayIntTupleIsub(self,*args):
189     import _ParaMEDMEM
190     return _ParaMEDMEM.DataArrayIntTuple____isub___(self, self, *args)
191 def MEDCouplingDataArrayIntTupleImul(self,*args):
192     import _ParaMEDMEM
193     return _ParaMEDMEM.DataArrayIntTuple____imul___(self, self, *args)
194 def MEDCouplingDataArrayIntTupleIdiv(self,*args):
195     import _ParaMEDMEM
196     return _ParaMEDMEM.DataArrayIntTuple____idiv___(self, self, *args)
197 def MEDCouplingDataArrayIntTupleImod(self,*args):
198     import _ParaMEDMEM
199     return _ParaMEDMEM.DataArrayIntTuple____imod___(self, self, *args)
200 def MEDCouplingDenseMatrixIadd(self,*args):
201     import _ParaMEDMEM
202     return _ParaMEDMEM.DenseMatrix____iadd___(self, self, *args)
203 def MEDCouplingDenseMatrixIsub(self,*args):
204     import _ParaMEDMEM
205     return _ParaMEDMEM.DenseMatrix____isub___(self, self, *args)
206 %}
207
208 %include "MEDCouplingFinalize.i"