From: Wolfgang Bangerth Date: Tue, 22 Mar 2022 22:44:26 +0000 (-0600) Subject: Simplify a piece of code. X-Git-Tag: v9.4.0-rc1~346^2 X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=7e62845a64f96393c272ecfb7758e79a249fe9ac;p=dealii.git Simplify a piece of code. --- diff --git a/source/dofs/dof_renumbering.cc b/source/dofs/dof_renumbering.cc index d4c31794ff..1c31ae74f9 100644 --- a/source/dofs/dof_renumbering.cc +++ b/source/dofs/dof_renumbering.cc @@ -967,22 +967,18 @@ namespace DoFRenumbering for (unsigned int component = 0; component < fe_collection.n_components(); ++component) { - const typename std::vector::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::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; } }