From 9760a80776ac46efed2aea7f0bdbbd4a2d17cf77 Mon Sep 17 00:00:00 2001 From: fsonner Date: Sat, 25 Apr 2015 16:24:29 +0200 Subject: [PATCH] Condense locally-owned conditions for renumbering --- include/deal.II/dofs/dof_renumbering.h | 12 +++++------- source/dofs/dof_renumbering.cc | 10 +++------- 2 files changed, 8 insertions(+), 14 deletions(-) diff --git a/include/deal.II/dofs/dof_renumbering.h b/include/deal.II/dofs/dof_renumbering.h index f95a3786e5..396f4d15e0 100644 --- a/include/deal.II/dofs/dof_renumbering.h +++ b/include/deal.II/dofs/dof_renumbering.h @@ -614,9 +614,8 @@ namespace DoFRenumbering /** * Sort the degrees of freedom by component. It does the same thing as the - * above function, only that it does this for one single level of a multi- - * level discretization. The non-multigrid part of the the DoFHandler is not - * touched. + * above function, only that it does this for one single level of a multilevel + * discretization. The non-multigrid part of the the DoFHandler is not touched. */ template void @@ -659,13 +658,12 @@ namespace DoFRenumbering /** * Sort the degrees of freedom by vector block. It does the same thing as the - * above function, only that it does this for one single level of a multi- - * level discretization. The non-multigrid part of the the DoFHandler is not - * touched. + * above function, only that it does this for one single level of a multilevel + * discretization. The non-multigrid part of the the DoFHandler is not touched. */ template void - block_wise (DoFHandler &dof_handler, unsigned int level); + block_wise (DoFHandler &dof_handler, const unsigned int level); /** * Sort the degrees of freedom by block. It does the same thing as the above diff --git a/source/dofs/dof_renumbering.cc b/source/dofs/dof_renumbering.cc index ada24eda1f..e23fc23f9d 100644 --- a/source/dofs/dof_renumbering.cc +++ b/source/dofs/dof_renumbering.cc @@ -677,9 +677,7 @@ namespace DoFRenumbering if (is_level_operation) { //we are dealing with mg dofs, skip foreign level cells: - if ((start->get_dof_handler().get_tria().locally_owned_subdomain() != numbers::invalid_subdomain_id) - && - (cell->level_subdomain_id()!=start->get_dof_handler().get_tria().locally_owned_subdomain())) + if (!cell->is_locally_owned_on_level()) continue; } else @@ -928,7 +926,7 @@ namespace DoFRenumbering compute_block_wise (std::vector &new_indices, const ITERATOR &start, const ENDITERATOR &end, - bool is_level_operation) + const bool is_level_operation) { const hp::FECollection fe_collection (start->get_dof_handler().get_fe ()); @@ -976,9 +974,7 @@ namespace DoFRenumbering if (is_level_operation) { //we are dealing with mg dofs, skip foreign level cells: - if ((start->get_dof_handler().get_tria().locally_owned_subdomain() != numbers::invalid_subdomain_id) - && (cell->level_subdomain_id() - != start->get_dof_handler().get_tria().locally_owned_subdomain())) + if (!cell->is_locally_owned_on_level()) continue; } else -- 2.39.5