]> https://gitweb.dealii.org/ - dealii.git/commitdiff
Replace a double loop over cells and indices by a single loop and the use of cell...
authorWolfgang Bangerth <bangerth@math.tamu.edu>
Tue, 14 Apr 2015 21:46:54 +0000 (16:46 -0500)
committerWolfgang Bangerth <bangerth@math.tamu.edu>
Wed, 15 Apr 2015 12:46:53 +0000 (07:46 -0500)
source/dofs/dof_tools.cc

index 0f845024e92a35bba3af75f35bb3e33107ef790a..1185eccf8d569591902414a850cc0699bfd2e274 100644 (file)
@@ -1069,8 +1069,8 @@ namespace DoFTools
     typename DH::active_cell_iterator
     cell = dof_handler.begin_active(),
     endc = dof_handler.end();
-    for (unsigned int index=0; cell!=endc; ++cell, ++index)
-      active_fe_indices[index] = cell->active_fe_index();
+    for (; cell!=endc; ++cell)
+      active_fe_indices[cell->active_cell_index()] = cell->active_fe_index();
   }
 
 

In the beginning the Universe was created. This has made a lot of people very angry and has been widely regarded as a bad move.

Douglas Adams


Typeset in Trocchi and Trocchi Bold Sans Serif.