X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=src%2FMEDPartitioner_Swig%2FMEDPartitionerCommon.i;h=31b0252acdbf8baf2e31b549350c0ee1059f9051;hb=b832b15337be013a56e0976170e5e235b89fcb03;hp=a9060838c1071fcc9be1dc6bcc8ce799a5596975;hpb=b029f486f2a6286c54ebba3e995c3bbc10f41d74;p=tools%2Fmedcoupling.git diff --git a/src/MEDPartitioner_Swig/MEDPartitionerCommon.i b/src/MEDPartitioner_Swig/MEDPartitionerCommon.i index a9060838c..31b0252ac 100644 --- a/src/MEDPartitioner_Swig/MEDPartitionerCommon.i +++ b/src/MEDPartitioner_Swig/MEDPartitionerCommon.i @@ -1,4 +1,4 @@ -// Copyright (C) 2007-2016 CEA/DEN, EDF R&D +// Copyright (C) 2007-2024 CEA, EDF // // This library is free software; you can redistribute it and/or // modify it under the terms of the GNU Lesser General Public @@ -17,44 +17,30 @@ // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // -%module MEDPartitioner - -%include std_string.i - %{ -#include "MEDFileData.hxx" - #include "MEDPARTITIONER_MEDPartitioner.hxx" #include "MEDPARTITIONER.hxx" #include "MEDPARTITIONER_Graph.hxx" -using namespace MEDCoupling; -using namespace INTERP_KERNEL; using namespace MEDPARTITIONER; %} -%feature("autodoc", "1"); -%feature("docstring"); + %newobject MEDPARTITIONER::MEDPartitioner::New; %newobject MEDPARTITIONER::MEDPartitioner::Graph; %newobject MEDPARTITIONER::MEDPartitioner::Graph::getGraph; %newobject MEDPARTITIONER::MEDPartitioner::Graph::getPartition; %newobject MEDPARTITIONER::MEDPartitioner::getMEDFileData; -%feature("unref") MEDCoupling::MEDFileData "$this->decrRef();" - -%nodefaultctor; - -%rename (InterpKernelException) INTERP_KERNEL::Exception; namespace MEDPARTITIONER { class Graph { public: - typedef enum {METIS,SCOTCH} splitter_type; + typedef enum {METIS,SCOTCH,PTSCOTCH} splitter_type; public: - virtual void partGraph(int ndomain, const std::string& options_string="", ParaDomainSelector *sel=0) throw(INTERP_KERNEL::Exception); + virtual void partGraph(int ndomain, const std::string& options_string="", ParaDomainSelector *sel=0); MEDCoupling::MEDCouplingSkyLineArray *getGraph() const { const MEDCoupling::MEDCouplingSkyLineArray *ret(self->getGraph()); @@ -75,12 +61,14 @@ namespace MEDPARTITIONER class MEDPartitioner { public: - 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); - 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); - MEDPartitioner(const MEDCoupling::MEDFileData* fileData, Graph* graph, bool create_boundary_faces=false, bool create_joints=false, bool mesure_memory=false) throw(INTERP_KERNEL::Exception); - static MEDPARTITIONER::Graph* Graph(MEDCoupling::MEDCouplingSkyLineArray* graph, Graph::splitter_type split=Graph::METIS, int* edgeweight=0, MEDCoupling::DataArrayInt* vlbloctab=0) throw(INTERP_KERNEL::Exception); - MEDCoupling::MEDFileData* getMEDFileData() throw(INTERP_KERNEL::Exception); - void write(const std::string& filename) throw(INTERP_KERNEL::Exception); + 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); + 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); + MEDPartitioner(const MEDCoupling::MEDFileData* fileData, Graph* graph, bool create_boundary_faces=false, bool create_joints=false, bool mesure_memory=false); + static MEDPARTITIONER::Graph* Graph(MEDCoupling::MEDCouplingSkyLineArray* graph, Graph::splitter_type split=Graph::METIS, int* edgeweight=0, MEDCoupling::DataArrayIdType* vlbloctab=0); + static std::vector AvailableAlgorithms(); + static std::vector AllAlgorithms(); + MEDCoupling::MEDFileData* getMEDFileData(); + void write(const std::string& filename); }; }