Salome HOME
MED file mesh loading on demand.
[modules/med.git] / src / RENUMBER / RENUMBER_BOOSTRenumbering.cxx
index 17bb550f65f7b389e455bf6fb422114f58cf3ff7..60d5eec3d8dd83030849905759133f89c98b5e07 100644 (file)
@@ -1,4 +1,4 @@
-// Copyright (C) 2007-2012  CEA/DEN, EDF R&D
+// Copyright (C) 2007-2013  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
@@ -37,17 +37,12 @@ void BOOSTRenumbering::renumber(const int* graph,const int* index_graph,int nb_c
   typedef boost::graph_traits<Graph>::vertices_size_type size_type;
   Graph G(nb_cell);
   for (int i=0;i<nb_cell;++i)
-    for (int j=index_graph[i]-1;j<index_graph[i+1]-1;++j)
-      add_edge(i,graph[j]-1,G);
+    for (int j=index_graph[i];j<index_graph[i+1];++j)
+      add_edge(i,graph[j],G);
   boost::property_map<Graph, boost::vertex_index_t>::type
     index_map = boost::get(boost::vertex_index, G);
   boost::cuthill_mckee_ordering(G, iperm.rbegin(), boost::get(boost::vertex_color, G),
                            boost::make_degree_map(G));
   for (size_type c = 0; c != iperm.size(); ++c)
     perm[index_map[iperm[c]]] = c;
-  for(int i=0;i<nb_cell;++i)
-    {
-      perm[i]+=1;
-      iperm[i]+=1;
-    }
 }