X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=src%2FRENUMBER%2FRENUMBER_BOOSTRenumbering.cxx;h=b6d7f1a1a526797ee447eb21ab37e28b1978ffc5;hb=d92b7fd59b881b5e276b1c71584a5879dbd01384;hp=a46e06c4d9aec935c4f6cbee02af31a243708c0a;hpb=8763c12d01e33d6845dd53be65b001514d00bd42;p=tools%2Fmedcoupling.git diff --git a/src/RENUMBER/RENUMBER_BOOSTRenumbering.cxx b/src/RENUMBER/RENUMBER_BOOSTRenumbering.cxx index a46e06c4d..b6d7f1a1a 100644 --- a/src/RENUMBER/RENUMBER_BOOSTRenumbering.cxx +++ b/src/RENUMBER/RENUMBER_BOOSTRenumbering.cxx @@ -1,4 +1,4 @@ -// Copyright (C) 2007-2014 CEA/DEN, EDF R&D +// Copyright (C) 2007-2022 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 @@ -20,7 +20,7 @@ #include "RENUMBER_BOOSTRenumbering.hxx" #include "MEDCouplingMemArray.hxx" -#include "MEDCouplingAutoRefCountObjectPtr.hxx" +#include "MCAuto.hxx" #include #include @@ -28,27 +28,25 @@ #include #include -void BOOSTRenumbering::renumber(const int *graph, const int *index_graph, int nbCell, ParaMEDMEM::DataArrayInt *&iperm, ParaMEDMEM::DataArrayInt *&perm) +void BOOSTRenumbering::renumber(const mcIdType *graph, const mcIdType *index_graph, mcIdType nbCell, MEDCoupling::DataArrayIdType *&iperm, MEDCoupling::DataArrayIdType *&perm) { - ParaMEDMEM::MEDCouplingAutoRefCountObjectPtr out0(ParaMEDMEM::DataArrayInt::New()),out1(ParaMEDMEM::DataArrayInt::New()); + MEDCoupling::MCAuto out0(MEDCoupling::DataArrayIdType::New()),out1(MEDCoupling::DataArrayIdType::New()); out0->alloc(nbCell,1); out1->alloc(nbCell,1); out0->fillWithZero(); out1->fillWithZero(); // typedef boost::adjacency_list > > Graph; - typedef boost::graph_traits::vertex_descriptor Vertex; - typedef boost::graph_traits::vertices_size_type size_type; + boost::property > > Graph; Graph G(nbCell); - for (int i=0;i::type index_map = boost::get(boost::vertex_index, G); boost::cuthill_mckee_ordering(G, out0->getPointer(), boost::get(boost::vertex_color, G), boost::make_degree_map(G)); - int *out0Ptr(out0->getPointer()),*out1Ptr(out1->getPointer()); - for(int c=0;c!=nbCell;++c) + mcIdType *out0Ptr(out0->getPointer()),*out1Ptr(out1->getPointer()); + for(mcIdType c=0;c!=nbCell;++c) out1Ptr[index_map[out0Ptr[nbCell-c-1]]]=c; out0->reverse(); iperm=out0.retn(); perm=out1.retn();