]> https://gitweb.dealii.org/ - dealii.git/commitdiff
Simplify a piece of code. 13563/head
authorWolfgang Bangerth <bangerth@colostate.edu>
Tue, 22 Mar 2022 22:44:26 +0000 (16:44 -0600)
committerWolfgang Bangerth <bangerth@colostate.edu>
Tue, 22 Mar 2022 22:44:26 +0000 (16:44 -0600)
source/dofs/dof_renumbering.cc

index d4c31794ff9c7e98788ec76695161bcf8180f26c..1c31ae74f94f2c6d616ccdb8462e3842b14d8941 100644 (file)
@@ -967,22 +967,18 @@ namespace DoFRenumbering
     for (unsigned int component = 0; component < fe_collection.n_components();
          ++component)
       {
-        const typename std::vector<types::global_dof_index>::const_iterator
-          begin_of_component = component_to_dof_map[component].begin(),
-          end_of_component   = component_to_dof_map[component].end();
-
         next_free_index = shifts[component];
 
-        for (typename std::vector<types::global_dof_index>::const_iterator
-               dof_index = begin_of_component;
-             dof_index != end_of_component;
-             ++dof_index)
+        for (const types::global_dof_index dof_index :
+             component_to_dof_map[component])
           {
-            Assert(locally_owned_dofs.index_within_set(*dof_index) <
+            Assert(locally_owned_dofs.index_within_set(dof_index) <
                      new_indices.size(),
                    ExcInternalError());
-            new_indices[locally_owned_dofs.index_within_set(*dof_index)] =
-              next_free_index++;
+            new_indices[locally_owned_dofs.index_within_set(dof_index)] =
+              next_free_index;
+
+            ++next_free_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.