//
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
//
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
#include "MEDPARTITIONER_ParallelTopology.hxx"
#include "MEDPARTITIONER_Utils.hxx"
#include "MEDPARTITIONER_Graph.hxx"
#include "MEDPARTITIONER_ParallelTopology.hxx"
#include "MEDPARTITIONER_Utils.hxx"
#include "MEDPARTITIONER_Graph.hxx"
-#include "MEDPARTITIONER_MetisGraph.hxx"
-#include "MEDPARTITIONER_ScotchGraph.hxx"
+#ifdef MED_ENABLE_METIS
+# include "MEDPARTITIONER_MetisGraph.hxx"
+#endif
+#ifdef MED_ENABLE_SCOTCH
+# include "MEDPARTITIONER_ScotchGraph.hxx"
+#endif
MEDPARTITIONER::Graph* MEDPARTITIONER::MEDPartitioner::Graph(MEDCoupling::MEDCouplingSkyLineArray* graph, Graph::splitter_type split, int* edgeweight)
{
MEDPARTITIONER::Graph* cellGraph=0;
MEDPARTITIONER::Graph* MEDPARTITIONER::MEDPartitioner::Graph(MEDCoupling::MEDCouplingSkyLineArray* graph, Graph::splitter_type split, int* edgeweight)
{
MEDPARTITIONER::Graph* cellGraph=0;
- MEDCoupling::MEDCouplingSkyLineArray* arr = new MEDCoupling::MEDCouplingSkyLineArray(graph->getIndexArray(), graph->getValueArray());
+ // will be destroyed by XXXGraph class:
+ MEDCoupling::MEDCouplingSkyLineArray* arr = MEDCoupling::MEDCouplingSkyLineArray::New(graph->getIndexArray(), graph->getValuesArray());