Salome HOME
50% of work performed of porting tests.
[tools/medcoupling.git] / src / MEDPartitioner / MEDPARTITIONER_MetisGraph.cxx
index 5f89b9573ba69d1f07ab7803c48f3f26efbd4d4a..2c33ad1d3ccd15f4572ae83a9e8decbf5a2261b8 100644 (file)
@@ -1,9 +1,9 @@
-// Copyright (C) 2007-2012  CEA/DEN, EDF R&D
+// Copyright (C) 2007-2014  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
 // License as published by the Free Software Foundation; either
-// version 2.1 of the License.
+// version 2.1 of the License, or (at your option) any later version.
 //
 // This library is distributed in the hope that it will be useful,
 // but WITHOUT ANY WARRANTY; without even the implied warranty of
 
 #include <iostream>
 
-#ifdef MED_ENABLE_METIS
 extern "C"
 {
-#include "metis.h"
+#include "MEDPARTITIONER_metis.h"
 }
-#endif
 
 using namespace MEDPARTITIONER;
 
@@ -77,7 +75,7 @@ void METISGraph::partGraph(int ndomain,
     #define PMV3_OPTION_PSR 3
     seems no changes int options[4]={1,0,33,0}; //test for a random seed of 33
   */
-  int options[4]={0,0,0,0};
+  int options[20]={0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0};
 #if !defined(MED_ENABLE_METIS)
   throw INTERP_KERNEL::Exception("METISGraph::partGraph : METIS is not available. Check your products, please.");
 #else
@@ -90,11 +88,11 @@ void METISGraph::partGraph(int ndomain,
       if (MyGlobals::_Verbose>10) 
         std::cout << "METISGraph::partGraph METIS_PartGraph METIS_PartGraph(RecursiveOrKway)" << std::endl;
       if (options_string != "k")
-        METIS_PartGraphRecursive(&n, xadj, adjncy, vwgt, adjwgt, &wgtflag,
-                                  &base, &nparts, options, &edgecut, partition);
+        MEDPARTITIONER_METIS_PartGraphRecursive(&n, xadj, adjncy, vwgt, adjwgt, &wgtflag,
+                                                &base, &nparts, options, &edgecut, partition);
       else
-        METIS_PartGraphKway(&n, xadj, adjncy, vwgt, adjwgt, &wgtflag,
-                            &base, &nparts, options, &edgecut, partition);
+        MEDPARTITIONER_METIS_PartGraphKway(&n, xadj, adjncy, vwgt, adjwgt, &wgtflag,
+                                           &base, &nparts, options, &edgecut, partition);
     }
   else  //force this case because METIS send all 1 in value
     {