]> SALOME platform Git repositories - tools/medcoupling.git/blob - src/PyWrapping/medcoupling.i
Salome HOME
ParaMEDMEM is in medcoupling
[tools/medcoupling.git] / src / PyWrapping / medcoupling.i
1 // Copyright (C) 2017  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 // Author : Anthony Geay (EDF R&D)
21
22 %module medcoupling
23
24 #define MEDCOUPLINGREMAPPER_EXPORT
25 #define INTERPKERNEL_EXPORT
26 #define MEDCOUPLING_EXPORT
27 #define MEDLOADER_EXPORT
28
29 %include "MEDCouplingCommon.i"
30
31 %include "MEDCouplingRemapperCommon.i"
32
33 #ifdef WITH_MED_FILE
34 %include "MEDLoaderCommon.i"
35 #endif
36
37 #ifdef WITH_RENUMBER
38 %include "MEDRenumberImpl.i"
39 #endif
40
41 #ifdef WITH_PARTITIONER
42 %include "MEDPartitionerCommon.i"
43 #endif
44
45 #ifdef WITH_PARALLEL_INTERPOLATOR
46 %include "ParaMEDMEMCommon.i"
47 #endif
48
49 %{
50   static const char SEQ_INTERPOL_EXT[]="Sequential interpolator";
51   static const char MEDFILEIO_EXT[]="MED file I/O";
52   static const char RENUM_EXT[]="Renumberer";
53   static const char PART_EXT[]="Partitioner";
54   static const char PAR_INTERPOL_EXT[]="Parallel interpolator (SPMD paradigm)";
55   
56   static const char *EXTENSIONS[]={SEQ_INTERPOL_EXT,MEDFILEIO_EXT,RENUM_EXT,PART_EXT,PAR_INTERPOL_EXT};
57   static const int NB_OF_EXTENSIONS=sizeof(EXTENSIONS)/sizeof(const char *);
58 %}
59
60 %inline
61 {
62   std::vector<std::string> AllPossibleExtensions()
63   {
64     std::vector<std::string> ret(EXTENSIONS,EXTENSIONS+NB_OF_EXTENSIONS);
65     return ret;
66   }
67   
68   std::vector<std::string> ActiveExtensions()
69   {
70     std::vector<std::string> ret;
71     ret.push_back(std::string(SEQ_INTERPOL_EXT));
72 #ifdef WITH_MED_FILE
73     ret.push_back(std::string(MEDFILEIO_EXT));
74 #endif
75 #ifdef WITH_RENUMBER
76     ret.push_back(std::string(RENUM_EXT));
77 #endif
78 #ifdef WITH_PARTITIONER
79     ret.push_back(std::string(PART_EXT));
80 #endif
81 #ifdef WITH_PARALLEL_INTERPOLATOR
82     ret.push_back(std::string(PAR_INTERPOL_EXT));
83 #endif
84     return ret;
85   }
86 }
87
88 %pythoncode %{
89 def MEDCouplingDataArrayDoubleIadd(self,*args):
90     import _medcoupling
91     return _medcoupling.DataArrayDouble____iadd___(self, self, *args)
92 def MEDCouplingDataArrayDoubleIsub(self,*args):
93     import _medcoupling
94     return _medcoupling.DataArrayDouble____isub___(self, self, *args)
95 def MEDCouplingDataArrayDoubleImul(self,*args):
96     import _medcoupling
97     return _medcoupling.DataArrayDouble____imul___(self, self, *args)
98 def MEDCouplingDataArrayDoubleIdiv(self,*args):
99     import _medcoupling
100     return _medcoupling.DataArrayDouble____idiv___(self, self, *args)
101 def MEDCouplingDataArrayDoubleIpow(self,*args):
102     import _medcoupling
103     return _medcoupling.DataArrayDouble____ipow___(self, self, *args)
104 def MEDCouplingFieldDoubleIadd(self,*args):
105     import _medcoupling
106     return _medcoupling.MEDCouplingFieldDouble____iadd___(self, self, *args)
107 def MEDCouplingFieldDoubleIsub(self,*args):
108     import _medcoupling
109     return _medcoupling.MEDCouplingFieldDouble____isub___(self, self, *args)
110 def MEDCouplingFieldDoubleImul(self,*args):
111     import _medcoupling
112     return _medcoupling.MEDCouplingFieldDouble____imul___(self, self, *args)
113 def MEDCouplingFieldDoubleIdiv(self,*args):
114     import _medcoupling
115     return _medcoupling.MEDCouplingFieldDouble____idiv___(self, self, *args)
116 def MEDCouplingFieldDoubleIpow(self,*args):
117     import _medcoupling
118     return _medcoupling.MEDCouplingFieldDouble____ipow___(self, self, *args)
119 def MEDCouplingDataArrayIntIadd(self,*args):
120     import _medcoupling
121     return _medcoupling.DataArrayInt____iadd___(self, self, *args)
122 def MEDCouplingDataArrayIntIsub(self,*args):
123     import _medcoupling
124     return _medcoupling.DataArrayInt____isub___(self, self, *args)
125 def MEDCouplingDataArrayIntImul(self,*args):
126     import _medcoupling
127     return _medcoupling.DataArrayInt____imul___(self, self, *args)
128 def MEDCouplingDataArrayIntIdiv(self,*args):
129     import _medcoupling
130     return _medcoupling.DataArrayInt____idiv___(self, self, *args)
131 def MEDCouplingDataArrayIntImod(self,*args):
132     import _medcoupling
133     return _medcoupling.DataArrayInt____imod___(self, self, *args)
134 def MEDCouplingDataArrayIntIpow(self,*args):
135     import _medcoupling
136     return _medcoupling.DataArrayInt____ipow___(self, self, *args)
137 def MEDCouplingDataArrayFloatIadd(self,*args):
138     import _medcoupling
139     return _medcoupling.DataArrayFloat____iadd___(self, self, *args)
140 def MEDCouplingDataArrayFloatIsub(self,*args):
141     import _medcoupling
142     return _medcoupling.DataArrayFloat____isub___(self, self, *args)
143 def MEDCouplingDataArrayFloatImul(self,*args):
144     import _medcoupling
145     return _medcoupling.DataArrayFloat____imul___(self, self, *args)
146 def MEDCouplingDataArrayFloatIdiv(self,*args):
147     import _medcoupling
148     return _medcoupling.DataArrayFloat____idiv___(self, self, *args)
149 def MEDCouplingDataArrayDoubleTupleIadd(self,*args):
150     import _medcoupling
151     return _medcoupling.DataArrayDoubleTuple____iadd___(self, self, *args)
152 def MEDCouplingDataArrayDoubleTupleIsub(self,*args):
153     import _medcoupling
154     return _medcoupling.DataArrayDoubleTuple____isub___(self, self, *args)
155 def MEDCouplingDataArrayDoubleTupleImul(self,*args):
156     import _medcoupling
157     return _medcoupling.DataArrayDoubleTuple____imul___(self, self, *args)
158 def MEDCouplingDataArrayDoubleTupleIdiv(self,*args):
159     import _medcoupling
160     return _medcoupling.DataArrayDoubleTuple____idiv___(self, self, *args)
161 def MEDCouplingDataArrayIntTupleIadd(self,*args):
162     import _medcoupling
163     return _medcoupling.DataArrayIntTuple____iadd___(self, self, *args)
164 def MEDCouplingDataArrayIntTupleIsub(self,*args):
165     import _medcoupling
166     return _medcoupling.DataArrayIntTuple____isub___(self, self, *args)
167 def MEDCouplingDataArrayIntTupleImul(self,*args):
168     import _medcoupling
169     return _medcoupling.DataArrayIntTuple____imul___(self, self, *args)
170 def MEDCouplingDataArrayIntTupleIdiv(self,*args):
171     import _medcoupling
172     return _medcoupling.DataArrayIntTuple____idiv___(self, self, *args)
173 def MEDCouplingDataArrayIntTupleImod(self,*args):
174     import _medcoupling
175     return _medcoupling.DataArrayIntTuple____imod___(self, self, *args)
176 def MEDCouplingDenseMatrixIadd(self,*args):
177     import _medcoupling
178     return _medcoupling.DenseMatrix____iadd___(self, self, *args)
179 def MEDCouplingDenseMatrixIsub(self,*args):
180     import _medcoupling
181     return _medcoupling.DenseMatrix____isub___(self, self, *args)
182 %}
183
184 %include "MEDCouplingFinalize.i"
185
186 #ifdef WITH_MED_FILE
187 %include "MEDLoaderFinalize.i"
188 #endif
189
190 %include "medcoupling_pycode"
191