X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=src%2FMEDPartitioner%2FMEDPARTITIONER_MEDPartitioner.cxx;h=6ea40a0e6a931d31e57ba4008dbe8fae12c3b138;hb=14f30db13a9749dd4a47f5c14944c7331e7390d1;hp=4ecca4e64a2126cfd74fb4306a25e552f124d4c7;hpb=1ca2b215a1ae474745fabc87dd9c5c98e9af6354;p=tools%2Fmedcoupling.git diff --git a/src/MEDPartitioner/MEDPARTITIONER_MEDPartitioner.cxx b/src/MEDPartitioner/MEDPARTITIONER_MEDPartitioner.cxx index 4ecca4e64..6ea40a0e6 100644 --- a/src/MEDPartitioner/MEDPARTITIONER_MEDPartitioner.cxx +++ b/src/MEDPartitioner/MEDPARTITIONER_MEDPartitioner.cxx @@ -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 @@ -24,10 +24,16 @@ #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 #include "MEDPARTITIONER_MeshCollectionDriver.hxx" + #include "MEDCouplingUMesh.hxx" +#include "MEDCouplingSkyLineArray.hxx" #include #include @@ -53,7 +59,7 @@ MEDPARTITIONER::MEDPartitioner::MEDPartitioner(const std::string& filename, int parallelizer.evaluateMemory(); } -MEDPARTITIONER::MEDPartitioner::MEDPartitioner(const ParaMEDMEM::MEDFileData* filedata, int ndomains, const std::string& library,bool creates_boundary_faces, bool create_joints, bool mesure_memory): +MEDPARTITIONER::MEDPartitioner::MEDPartitioner(const MEDCoupling::MEDFileData* filedata, int ndomains, const std::string& library,bool creates_boundary_faces, bool create_joints, bool mesure_memory): _input_collection( 0 ), _output_collection( 0 ), _new_topology( 0 ) { MyGlobals::_World_Size = 1; @@ -75,7 +81,7 @@ MEDPARTITIONER::MEDPartitioner::MEDPartitioner(const ParaMEDMEM::MEDFileData* fi parallelizer.evaluateMemory(); } -MEDPARTITIONER::MEDPartitioner::MEDPartitioner(const ParaMEDMEM::MEDFileData* filedata, MEDPARTITIONER ::Graph* graph, bool creates_boundary_faces, bool create_joints, bool mesure_memory): +MEDPARTITIONER::MEDPartitioner::MEDPartitioner(const MEDCoupling::MEDFileData* filedata, MEDPARTITIONER ::Graph* graph, bool creates_boundary_faces, bool create_joints, bool mesure_memory): _input_collection( 0 ), _output_collection( 0 ), _new_topology( 0 ) { MyGlobals::_World_Size = 1; @@ -126,15 +132,16 @@ void MEDPARTITIONER::MEDPartitioner::write(const std::string& filename) parallelizer.evaluateMemory(); } -ParaMEDMEM::MEDFileData* MEDPARTITIONER::MEDPartitioner::getMEDFileData() +MEDCoupling::MEDFileData* MEDPARTITIONER::MEDPartitioner::getMEDFileData() { return _output_collection->retrieveDriver()->getMEDFileData(); } -MEDPARTITIONER::Graph* MEDPARTITIONER::MEDPartitioner::Graph(ParaMEDMEM::MEDCouplingSkyLineArray* graph, Graph::splitter_type split, int* edgeweight) +MEDPARTITIONER::Graph* MEDPARTITIONER::MEDPartitioner::Graph(MEDCoupling::MEDCouplingSkyLineArray* graph, Graph::splitter_type split, int* edgeweight) { MEDPARTITIONER::Graph* cellGraph=0; - ParaMEDMEM::MEDCouplingSkyLineArray* arr = new ParaMEDMEM::MEDCouplingSkyLineArray(graph->getIndexArray(), graph->getValueArray()); + // will be destroyed by XXXGraph class: + MEDCoupling::MEDCouplingSkyLineArray* arr = MEDCoupling::MEDCouplingSkyLineArray::New(graph->getIndexArray(), graph->getValuesArray()); switch (split) { case Graph::METIS: