From: Anthony Geay Date: Tue, 19 Dec 2017 15:39:27 +0000 (+0100) Subject: On the fly X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=35b1d9de6357a1f2977fdbe40b967282fead6b8a;p=tools%2Fmedcoupling.git On the fly --- diff --git a/src/MEDPartitioner/MEDPARTITIONER_MEDPartitioner.cxx b/src/MEDPartitioner/MEDPARTITIONER_MEDPartitioner.cxx index c1782c85d..5677d56ab 100644 --- a/src/MEDPartitioner/MEDPARTITIONER_MEDPartitioner.cxx +++ b/src/MEDPartitioner/MEDPARTITIONER_MEDPartitioner.cxx @@ -190,3 +190,12 @@ std::vector MEDPARTITIONER::MEDPartitioner::AvailableAlgorithms() #endif return ret; } + +std::vector MEDPARTITIONER::MEDPartitioner::AllAlgorithms() +{ + std::vector ret; + ret.push_back(std::string(METIS_PART_ALG)); + ret.push_back(std::string(SCOTCH_PART_ALG)); + ret.push_back(std::string(PTSCOTCH_PART_ALG)); + return ret; +} diff --git a/src/MEDPartitioner/MEDPARTITIONER_MEDPartitioner.hxx b/src/MEDPartitioner/MEDPARTITIONER_MEDPartitioner.hxx index 93a90cbab..7f8b61ea5 100644 --- a/src/MEDPartitioner/MEDPARTITIONER_MEDPartitioner.hxx +++ b/src/MEDPartitioner/MEDPARTITIONER_MEDPartitioner.hxx @@ -46,6 +46,7 @@ namespace MEDPARTITIONER 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, DataArrayInt* vlbloctab=0); static std::vector AvailableAlgorithms(); + static std::vector AllAlgorithms(); void write(const std::string& filename); MEDCoupling::MEDFileData* getMEDFileData(); ~MEDPartitioner(); diff --git a/src/MEDPartitioner_Swig/MEDPartitionerCommon.i b/src/MEDPartitioner_Swig/MEDPartitionerCommon.i index 7363c4dfb..aeb343a27 100644 --- a/src/MEDPartitioner_Swig/MEDPartitionerCommon.i +++ b/src/MEDPartitioner_Swig/MEDPartitionerCommon.i @@ -66,6 +66,7 @@ namespace MEDPARTITIONER 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); static std::vector AvailableAlgorithms(); + static std::vector AllAlgorithms(); MEDCoupling::MEDFileData* getMEDFileData() throw(INTERP_KERNEL::Exception); void write(const std::string& filename) throw(INTERP_KERNEL::Exception); }; diff --git a/src/PyWrapping/medcoupling.i b/src/PyWrapping/medcoupling.i index 79395956f..300c07a95 100644 --- a/src/PyWrapping/medcoupling.i +++ b/src/PyWrapping/medcoupling.i @@ -44,9 +44,9 @@ %{ static const char SEQ_INTERPOL_EXT[]="Sequential interpolator"; static const char MEDFILEIO_EXT[]="MED file I/O"; - static const char RENUM_EXT[]="Renumbering"; + static const char RENUM_EXT[]="Renumberer"; static const char PART_EXT[]="Partitioner"; - static const char PAR_INTERPOL_EXT[]="Parallel interpolator"; + static const char PAR_INTERPOL_EXT[]="Parallel interpolator (SPMD paradigm)"; static const char *EXTENSIONS[]={SEQ_INTERPOL_EXT,MEDFILEIO_EXT,RENUM_EXT,PART_EXT,PAR_INTERPOL_EXT}; static const int NB_OF_EXTENSIONS=sizeof(EXTENSIONS)/sizeof(const char *); @@ -54,7 +54,13 @@ %inline { - std::vector Extensions() + std::vector AllPossibleExtensions() + { + std::vector ret(EXTENSIONS,EXTENSIONS+NB_OF_EXTENSIONS); + return ret; + } + + std::vector ActiveExtensions() { std::vector ret; ret.push_back(std::string(SEQ_INTERPOL_EXT)); diff --git a/src/RENUMBER/RenumberingFactory.cxx b/src/RENUMBER/RenumberingFactory.cxx index 9bef7b9ba..fd4410e90 100644 --- a/src/RENUMBER/RenumberingFactory.cxx +++ b/src/RENUMBER/RenumberingFactory.cxx @@ -80,6 +80,14 @@ namespace MED_RENUMBER #endif #endif } + + std::vector AllRenumberMethods() + { + std::vector ret; + ret.push_back(std::string(BOOST_ALG)); + ret.push_back(std::string(METIS_ALG)); + return ret; + } std::vector RenumberAvailableMethods() { diff --git a/src/RENUMBER/RenumberingFactory.hxx b/src/RENUMBER/RenumberingFactory.hxx index a54d52068..8e3b65d39 100644 --- a/src/RENUMBER/RenumberingFactory.hxx +++ b/src/RENUMBER/RenumberingFactory.hxx @@ -29,8 +29,9 @@ namespace MED_RENUMBER { RENUMBER_EXPORT Renumbering* RenumberingFactory(const std::string& s); RENUMBER_EXPORT std::vector RenumberAvailableMethods(); - const char METIS_ALG[]="METIS"; - const char BOOST_ALG[]="BOOST"; + RENUMBER_EXPORT std::vector AllRenumberMethods(); + const char METIS_ALG[]="Metis"; + const char BOOST_ALG[]="Boost"; } #endif /*RENUMBERINGFACTORY_HXX_*/ diff --git a/src/RENUMBER_Swig/MEDRenumberImpl.i b/src/RENUMBER_Swig/MEDRenumberImpl.i index 4aabc832b..489a8a3b5 100644 --- a/src/RENUMBER_Swig/MEDRenumberImpl.i +++ b/src/RENUMBER_Swig/MEDRenumberImpl.i @@ -53,4 +53,5 @@ namespace MED_RENUMBER { Renumbering *RenumberingFactory(const std::string& s) throw(INTERP_KERNEL::Exception); std::vector RenumberAvailableMethods(); + std::vector AllRenumberMethods(); }