1 // Copyright (C) 2007-2024 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)
24 %include "MEDCouplingCommon.i"
27 #include "MEDCouplingMemArray.txx"
29 #include "MEDCouplingDataArrayTypemaps.i"
31 using namespace MEDCoupling;
32 using namespace INTERP_KERNEL;
35 %template(ivec) std::vector<int>;
36 %template(dvec) std::vector<double>;
37 %template(svec) std::vector<std::string>;
40 %init %{ import_array(); %}
43 %init %{ initializeMe_renumber(); %}
45 %feature("autodoc", "1");
46 %feature("docstring");
50 %rename (InterpKernelException) INTERP_KERNEL::Exception;
52 %include "MEDCouplingRefCountObject.i"
53 %include "MEDCouplingMemArray.i"
56 void initializeMe_renumber()
57 {// AGY : here initialization of C++ traits in MEDCouplingDataArrayTypemaps.i for code factorization. Awful, I know, but no other solutions.
58 SWIGTITraits<double>::TI=SWIGTYPE_p_MEDCoupling__DataArrayDouble;
59 SWIGTITraits<float>::TI=SWIGTYPE_p_MEDCoupling__DataArrayFloat;
63 %include "MEDRenumberImpl.i"
67 __filename=os.environ.get('PYTHONSTARTUP')
68 if __filename and os.path.isfile(__filename):
69 with open(__filename) as __fp: