X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=src%2FMEDPartitioner%2FMEDPARTITIONER_ScotchGraph.cxx;h=89dd02c32d83bb3da3ecf616495d27b81dde01ad;hb=662a2a2393a25baef77e42f74204b11b70a9646c;hp=90c0403048039109f8e809b7a437764a42c14d3e;hpb=378cb2ebe08f8f4543ef632b2bd5f77fe180f978;p=tools%2Fmedcoupling.git diff --git a/src/MEDPartitioner/MEDPARTITIONER_ScotchGraph.cxx b/src/MEDPartitioner/MEDPARTITIONER_ScotchGraph.cxx old mode 100755 new mode 100644 index 90c040304..89dd02c32 --- a/src/MEDPartitioner/MEDPARTITIONER_ScotchGraph.cxx +++ b/src/MEDPartitioner/MEDPARTITIONER_ScotchGraph.cxx @@ -1,4 +1,4 @@ -// Copyright (C) 2007-2014 CEA/DEN, EDF R&D +// Copyright (C) 2007-2023 CEA, EDF // // 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,8 @@ #include "MEDPARTITIONER_ScotchGraph.hxx" #include "MEDPARTITIONER_Utils.hxx" +#include "MEDCouplingSkyLineArray.hxx" + #include #ifdef MED_ENABLE_SCOTCH @@ -37,7 +39,7 @@ SCOTCHGraph::SCOTCHGraph():Graph() { } -SCOTCHGraph::SCOTCHGraph(MEDPARTITIONER::SkyLineArray* graph, int* edgeweight):Graph(graph,edgeweight) +SCOTCHGraph::SCOTCHGraph(MEDCoupling::MEDCouplingSkyLineArray* graph, int* edgeweight):Graph(graph,edgeweight) { } @@ -51,10 +53,17 @@ void SCOTCHGraph::partGraph(int ndomain, const std::string& options_string, Para std::cout << "proc " << MyGlobals::_Rank << " : SCOTCHGraph::partGraph" << std::endl; //number of graph vertices - int n = _graph->getNumberOf(); + int n = FromIdType(_graph->getNumberOf()); //graph +#ifdef MEDCOUPLING_USE_64BIT_IDS + std::vector indexVec( _graph->getIndex(), _graph->getIndexArray()->end() ); + std::vector valueVec( _graph->getValues(), _graph->getValuesArray()->end() ); + int * xadj=indexVec.data(); + int * adjncy=valueVec.data(); +#else int * xadj=const_cast(_graph->getIndex()); - int * adjncy=const_cast(_graph->getValue()); + int * adjncy=const_cast(_graph->getValues()); +#endif //ndomain int nparts=ndomain; @@ -97,19 +106,19 @@ void SCOTCHGraph::partGraph(int ndomain, const std::string& options_string, Para SCOTCH_stratExit(&scotch_strategy); SCOTCH_graphExit(&scotch_graph); - std::vector index(n+1); - std::vector value(n); + std::vector index(n+1); + std::vector value(n); index[0]=0; for (int i=0; i