X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=src%2FMEDPartitioner%2FMEDPARTITIONER_Graph.hxx;h=60a5595388cea50931655d27ba27e365c866f543;hb=e057263132f3cb4871fb280f8d9c963ba17567a1;hp=8a2755c37af5f575545d4d3811bc131a5386ee64;hpb=bd238ae917aa20ba3fe2f7569883d619b7e4f7a9;p=tools%2Fmedcoupling.git diff --git a/src/MEDPartitioner/MEDPARTITIONER_Graph.hxx b/src/MEDPartitioner/MEDPARTITIONER_Graph.hxx index 8a2755c37..60a559538 100644 --- a/src/MEDPartitioner/MEDPARTITIONER_Graph.hxx +++ b/src/MEDPartitioner/MEDPARTITIONER_Graph.hxx @@ -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 @@ -21,6 +21,7 @@ #define __MEDPARTITIONER_GRAPH_HXX__ #include "MEDPARTITIONER.hxx" +#include "MCAuto.hxx" #include @@ -29,17 +30,19 @@ namespace MEDCoupling class MEDCouplingSkyLineArray; } +using namespace MEDCoupling; + namespace MEDPARTITIONER { class ParaDomainSelector; class MEDPARTITIONER_EXPORT Graph { public: - typedef enum {METIS,SCOTCH} splitter_type; + typedef enum {METIS,SCOTCH,PTSCOTCH} splitter_type; - Graph(){}; - //creates a graph from a SKYLINEARRAY - Graph(MEDCoupling::MEDCouplingSkyLineArray* graph, int* edgeweight=0); + Graph(); + //creates a graph from a SKYLINEARRAY- WARNING!! Graph takes ownership of the array. + Graph(MEDCouplingSkyLineArray* graph, int* edgeweight=0); virtual ~Graph(); void setEdgesWeights(int *edgeweight) { _edge_weight=edgeweight; } @@ -57,12 +60,12 @@ namespace MEDPARTITIONER // returns nb of domains in _partition int nbDomains() const; - const MEDCoupling::MEDCouplingSkyLineArray *getGraph() const { return _graph; } - const MEDCoupling::MEDCouplingSkyLineArray *getPartition() const { return _partition; } + const MEDCouplingSkyLineArray *getGraph() const { return (const MEDCouplingSkyLineArray*)_graph; } + const MEDCouplingSkyLineArray *getPartition() const { return (const MEDCouplingSkyLineArray*)_partition; } protected: - MEDCoupling::MEDCouplingSkyLineArray* _graph; - MEDCoupling::MEDCouplingSkyLineArray* _partition; + MCAuto _graph; + MCAuto _partition; int* _edge_weight; int* _cell_weight; };