1 // Copyright (C) 2007-2016 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, 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
20 %module MEDPartitioner
25 #include "MEDFileData.hxx"
27 #include "MEDPARTITIONER_MEDPartitioner.hxx"
28 #include "MEDPARTITIONER.hxx"
29 #include "MEDPARTITIONER_Graph.hxx"
31 using namespace MEDCoupling;
32 using namespace INTERP_KERNEL;
33 using namespace MEDPARTITIONER;
36 %feature("autodoc", "1");
37 %feature("docstring");
39 %newobject MEDPARTITIONER::MEDPartitioner::New;
40 %newobject MEDPARTITIONER::MEDPartitioner::Graph;
41 %newobject MEDPARTITIONER::MEDPartitioner::Graph::getGraph;
42 %newobject MEDPARTITIONER::MEDPartitioner::Graph::getPartition;
43 %newobject MEDPARTITIONER::MEDPartitioner::getMEDFileData;
44 %feature("unref") MEDCoupling::MEDFileData "$this->decrRef();"
48 %rename (InterpKernelException) INTERP_KERNEL::Exception;
50 namespace MEDPARTITIONER
55 typedef enum {METIS,SCOTCH} splitter_type;
57 virtual void partGraph(int ndomain, const std::string& options_string="", ParaDomainSelector *sel=0) throw(INTERP_KERNEL::Exception);
58 MEDCoupling::MEDCouplingSkyLineArray *getGraph() const
60 const MEDCoupling::MEDCouplingSkyLineArray *ret(self->getGraph());
63 return const_cast<MEDCoupling::MEDCouplingSkyLineArray *>(ret);
65 const MEDCoupling::MEDCouplingSkyLineArray *getPartition() const
67 const MEDCoupling::MEDCouplingSkyLineArray *ret(self->getPartition());
70 return const_cast<MEDCoupling::MEDCouplingSkyLineArray *>(ret);
72 int nbVertices() const;
78 MEDPartitioner(const std::string& filename, int ndomains=1, const std::string& library="metis",bool creates_boundary_faces=false, bool create_joints=false, bool mesure_memory=false) throw(INTERP_KERNEL::Exception);
79 MEDPartitioner(const MEDCoupling::MEDFileData* fileData, int ndomains=1, const std::string& library="metis",bool creates_boundary_faces=false, bool create_joints=false, bool mesure_memory=false) throw(INTERP_KERNEL::Exception);
80 MEDPartitioner(const MEDCoupling::MEDFileData* fileData, Graph* graph, bool creates_boundary_faces=false, bool create_joints=false, bool mesure_memory=false) throw(INTERP_KERNEL::Exception);
81 static MEDPARTITIONER::Graph* Graph(MEDCoupling::MEDCouplingSkyLineArray* graph, Graph::splitter_type split=Graph::METIS, int* edgeweight=0) throw(INTERP_KERNEL::Exception);
82 MEDCoupling::MEDFileData* getMEDFileData() throw(INTERP_KERNEL::Exception);
83 void write(const std::string& filename) throw(INTERP_KERNEL::Exception);