1 // Copyright (C) 2007-2012 CEA/DEN, EDF R&D
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.
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
20 %module libMEDSPLITTER_Swig
23 #include "MEDMEM_Mesh.hxx"
24 #include<MEDSPLITTER_Topology.hxx>
25 #include<MEDSPLITTER_MESHCollection.hxx>
27 using namespace MEDSPLITTER;
29 typedef enum {METIS,SCOTCH} splitter_type;
32 typedef enum {METIS,SCOTCH} splitter_type;
33 typedef enum{MedAscii, MedXML, Undefined} DriverType;
35 %include "my_typemap.i"
37 %typecheck(SWIG_TYPECHECK_POINTER) const int* {
38 $1 = PyList_Check($input) ? 1 : 0;
41 namespace MEDSPLITTER {
44 typedef enum {METIS,SCOTCH} splitter_type;
51 class MESHCollection {
53 MESHCollection(const MESHCollection&, MEDSPLITTER::Topology*,
54 bool family_splitting=false, bool create_empty_groups=false);
55 MESHCollection(const char* filename);
56 MESHCollection(const char* filename, char* meshname);
58 MEDSPLITTER::Topology* createPartition(int nbdomain,
59 MEDSPLITTER::Graph::splitter_type splitter_type = METIS,
60 const char* theStr=0);
61 MEDSPLITTER::Topology* createPartition(const int* partition);
63 void setDriverType(::DriverType type);
64 void setSubdomainBoundaryCreates(bool flag);
66 void write(const char* filename);
67 void castAllFields(const MESHCollection& old_collection);
68 void castFamilies(const MESHCollection& old_collection);
69 void castField(const MESHCollection& old_collection, const char* fieldname,
70 int itnumber, int ordernumber);
72 void setIndivisibleGroup(const std::string& a);