]> SALOME platform Git repositories - tools/medcoupling.git/commitdiff
Salome HOME
MEDMEM suppression
authorageay <ageay>
Fri, 5 Apr 2013 08:25:45 +0000 (08:25 +0000)
committerageay <ageay>
Fri, 5 Apr 2013 08:25:45 +0000 (08:25 +0000)
src/RENUMBER/RENUMBER_BOOSTRenumbering.cxx
src/RENUMBER/renumbering.cxx

index 4b447364b850ce4ccfaec9c1fef80d143dec7962..60d5eec3d8dd83030849905759133f89c98b5e07 100644 (file)
@@ -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;
-    }
 }
index d429b2cffd310e030c4234fa1b2967c01bbcd330..c9670f191c2c6e1279edae12f9f112e7357f538a 100644 (file)
@@ -81,6 +81,7 @@ int main(int argc, char** argv)
   Renumbering *renumb=RenumberingFactory(type_renum);
   renumb->renumber(graph,graph_index,workMesh->getNumberOfCells(),iperm,perm);
   delete renumb;
+  iperm.clear();//erase new2old, we are using only old 2 new
   t_compute_graph=clock();
   cout << " : " << (t_compute_graph-t_read_st)/(double) CLOCKS_PER_SEC << "s" << endl;
   cout.flush();