1 // Copyright (C) 2007-2019 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
21 #include "MEDPARTITIONER_MEDPartitioner.hxx"
22 #include "MEDPARTITIONER.hxx"
23 #include "MEDPARTITIONER_Graph.hxx"
25 using namespace MEDPARTITIONER;
30 %newobject MEDPARTITIONER::MEDPartitioner::New;
31 %newobject MEDPARTITIONER::MEDPartitioner::Graph;
32 %newobject MEDPARTITIONER::MEDPartitioner::Graph::getGraph;
33 %newobject MEDPARTITIONER::MEDPartitioner::Graph::getPartition;
34 %newobject MEDPARTITIONER::MEDPartitioner::getMEDFileData;
36 namespace MEDPARTITIONER
41 typedef enum {METIS,SCOTCH,PTSCOTCH} splitter_type;
43 virtual void partGraph(int ndomain, const std::string& options_string="", ParaDomainSelector *sel=0) throw(INTERP_KERNEL::Exception);
44 MEDCoupling::MEDCouplingSkyLineArray *getGraph() const
46 const MEDCoupling::MEDCouplingSkyLineArray *ret(self->getGraph());
49 return const_cast<MEDCoupling::MEDCouplingSkyLineArray *>(ret);
51 const MEDCoupling::MEDCouplingSkyLineArray *getPartition() const
53 const MEDCoupling::MEDCouplingSkyLineArray *ret(self->getPartition());
56 return const_cast<MEDCoupling::MEDCouplingSkyLineArray *>(ret);
58 int nbVertices() const;
64 MEDPartitioner(const std::string& filename, int ndomains=1, const std::string& library="metis",bool create_boundary_faces=false, bool create_joints=false, bool mesure_memory=false) throw(INTERP_KERNEL::Exception);
65 MEDPartitioner(const MEDCoupling::MEDFileData* fileData, int ndomains=1, const std::string& library="metis",bool create_boundary_faces=false, bool create_joints=false, bool mesure_memory=false) throw(INTERP_KERNEL::Exception);
66 MEDPartitioner(const MEDCoupling::MEDFileData* fileData, Graph* graph, bool create_boundary_faces=false, bool create_joints=false, bool mesure_memory=false) throw(INTERP_KERNEL::Exception);
67 static MEDPARTITIONER::Graph* Graph(MEDCoupling::MEDCouplingSkyLineArray* graph, Graph::splitter_type split=Graph::METIS, int* edgeweight=0, MEDCoupling::DataArrayInt* vlbloctab=0) throw(INTERP_KERNEL::Exception);
68 static std::vector<std::string> AvailableAlgorithms();
69 static std::vector<std::string> AllAlgorithms();
70 MEDCoupling::MEDFileData* getMEDFileData() throw(INTERP_KERNEL::Exception);
71 void write(const std::string& filename) throw(INTERP_KERNEL::Exception);