Salome HOME
- MEDLoader ReadField is now dealing int32, float64 and float32
[tools/medcoupling.git] / src / MEDPartitioner / MEDPARTITIONER_MEDPartitioner.hxx
index d7c31ffda700b82d7425836b823a5e9d4b1330a1..b5fc3cc29278c8753d04f70433d31df5e304f519 100644 (file)
@@ -1,4 +1,4 @@
-// Copyright (C) 2007-2015  CEA/DEN, EDF R&D
+// Copyright (C) 2007-2016  CEA/DEN, EDF R&D
 //
 // This library is free software; you can redistribute it and/or
 // modify it under the terms of the GNU Lesser General Public
 #ifndef __MEDPARTITIONER_MEDPARTITIONER_HXX__
 #define __MEDPARTITIONER_MEDPARTITIONER_HXX__
 
+#include "MEDPARTITIONER.hxx"
 #include "MEDPARTITIONER_Graph.hxx"
+#include "MCType.hxx"
 
 #include <map>
 #include <vector>
 
-namespace ParaMEDMEM
+namespace MEDCoupling
 {
-  class DataArrayInt;
   class MEDFileData;
-  class MEDCouplingSkyLineArray;
+  class DataArrayInt;
 }
 
 namespace MEDPARTITIONER
 {
   class Topology;
   class MeshCollection;
-  class ParaDomainSelector;
-  class Graph;
-  
-  class MEDPartitioner
+
+  class MEDPARTITIONER_EXPORT MEDPartitioner
   {
   public:
-    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);
-    MEDPartitioner(const ParaMEDMEM::MEDFileData* fileData, int ndomains=1, const std::string& library="metis",bool creates_boundary_faces=false, bool create_joints=false, bool mesure_memory=false);
-    MEDPartitioner(const ParaMEDMEM::MEDFileData* fileData, Graph* graph, bool creates_boundary_faces=false, bool create_joints=false, bool mesure_memory=false);
-    static MEDPARTITIONER::Graph* Graph(ParaMEDMEM::MEDCouplingSkyLineArray* graph, Graph::splitter_type split=Graph::METIS, int* edgeweight=0);
+    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, DataArrayInt* vlbloctab=0);
+    static std::vector<std::string> AvailableAlgorithms();
+    static std::vector<std::string> AllAlgorithms();
+    static bool HasMetisAlg();
+    static bool HasScotchAlg();
+    static bool HasPTScotchAlg();
     void write(const std::string& filename);
-    ParaMEDMEM::MEDFileData* getMEDFileData();
+    MEDCoupling::MEDFileData* getMEDFileData();
     ~MEDPartitioner();
 
-    ParaMEDMEM::MEDFileData *convertToMEDFileData(MeshCollection* meshcollection);
-    void createPartitionCollection(int ndomains, const std::string& library,bool creates_boundary_faces, bool create_joints, bool mesure_memory);
+    MEDCoupling::MEDFileData *convertToMEDFileData(MeshCollection* meshcollection);
+    void createPartitionCollection(int ndomains, const std::string& library,bool create_boundary_faces, bool create_joints, bool mesure_memory);
 
   private:
     MeshCollection* _input_collection;
     MeshCollection* _output_collection;
     Topology*       _new_topology;
+  public:
+    static const char METIS_PART_ALG[];
+    static const char SCOTCH_PART_ALG[];
+    static const char PTSCOTCH_PART_ALG[];
   };
 }
 #endif