X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=src%2FMEDPartitioner%2FMEDPARTITIONER_ParMetisGraph.cxx;h=4ced8513eb8e899b3c8e53466cb2d10d16c066f4;hb=b219559763498c4bd10c730cd3d2c62b1eed45db;hp=7b9b456b02faa1e95b419dc8e414cfe01d330066;hpb=bd238ae917aa20ba3fe2f7569883d619b7e4f7a9;p=tools%2Fmedcoupling.git diff --git a/src/MEDPartitioner/MEDPARTITIONER_ParMetisGraph.cxx b/src/MEDPartitioner/MEDPARTITIONER_ParMetisGraph.cxx index 7b9b456b0..4ced8513e 100644 --- a/src/MEDPartitioner/MEDPARTITIONER_ParMetisGraph.cxx +++ b/src/MEDPartitioner/MEDPARTITIONER_ParMetisGraph.cxx @@ -1,4 +1,4 @@ -// Copyright (C) 2007-2015 CEA/DEN, EDF R&D +// Copyright (C) 2007-2019 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 @@ -59,10 +59,17 @@ void ParMETISGraph::partGraph(int ndomain, std::cout << "proc " << MyGlobals::_Rank << " : ParMETISGraph::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 //constraints int * vwgt=_cell_weight; int * adjwgt=_edge_weight; @@ -110,8 +117,8 @@ void ParMETISGraph::partGraph(int ndomain, MPI_Comm *comm); */ - vector index(n+1); - vector value(n); + vector index(n+1); + vector value(n); index[0]=0; if (ran.size()>0 && MyGlobals::_Atomize==0) //there is randomize { @@ -120,7 +127,7 @@ void ParMETISGraph::partGraph(int ndomain, for (int i=0; i