From: Wolfgang Bangerth Date: Sat, 8 Jul 2017 13:44:13 +0000 (-0600) Subject: Simplify the template signature of DoFRenumbering::compute_component_wise(). X-Git-Tag: v9.0.0-rc1~1438^2~1 X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=79bf8676bf757d49cc26e59c071556a4285d9de6;p=dealii.git Simplify the template signature of DoFRenumbering::compute_component_wise(). We previously had two template arguments because the types of, for example, DoFHandler::begin_active() and DoFHandler::end() are different. But this makes no sense. Just cast the end iterator to the same type as the begin iterator. --- diff --git a/include/deal.II/dofs/dof_renumbering.h b/include/deal.II/dofs/dof_renumbering.h index 094cc4e0be..9c61467a33 100644 --- a/include/deal.II/dofs/dof_renumbering.h +++ b/include/deal.II/dofs/dof_renumbering.h @@ -639,13 +639,13 @@ namespace DoFRenumbering * Does not perform the renumbering on the DoFHandler dofs but returns the * renumbering vector. */ - template + template types::global_dof_index - compute_component_wise (std::vector &new_dof_indices, - const ITERATOR &start, - const ENDITERATOR &end, - const std::vector &target_component, - bool is_level_operation); + compute_component_wise (std::vector &new_dof_indices, + const CellIterator &start, + const typename identity::type &end, + const std::vector &target_component, + const bool is_level_operation); /** * @} diff --git a/source/dofs/dof_renumbering.cc b/source/dofs/dof_renumbering.cc index fe2ac84df7..652efdf5e4 100644 --- a/source/dofs/dof_renumbering.cc +++ b/source/dofs/dof_renumbering.cc @@ -510,9 +510,7 @@ namespace DoFRenumbering end = dof_handler.end(); const types::global_dof_index result = - compute_component_wise + compute_component_wise (renumbering, start, end, component_order_arg, false); if (result == 0) return; @@ -552,8 +550,7 @@ namespace DoFRenumbering typename DoFHandlerType::level_cell_iterator end = dof_handler.end(level); const types::global_dof_index result = - compute_component_wise + compute_component_wise (renumbering, start, end, component_order_arg, true); if (result == 0) return; @@ -567,13 +564,13 @@ namespace DoFRenumbering - template + template types::global_dof_index - compute_component_wise (std::vector &new_indices, - const ITERATOR &start, - const ENDITERATOR &end, - const std::vector &component_order_arg, - bool is_level_operation) + compute_component_wise (std::vector &new_indices, + const CellIterator &start, + const typename identity::type &end, + const std::vector &component_order_arg, + const bool is_level_operation) { const hp::FECollection fe_collection (start->get_dof_handler().get_fe ()); @@ -653,7 +650,7 @@ namespace DoFRenumbering // take care of that std::vector > component_to_dof_map (fe_collection.n_components()); - for (ITERATOR cell=start; cell!=end; ++cell) + for (CellIterator cell=start; cell!=end; ++cell) { if (is_level_operation) {