From e0eafa5165454c4e41e4f92caa03e0c5148d501f Mon Sep 17 00:00:00 2001 From: Peter Munch Date: Fri, 11 Mar 2022 17:09:15 +0100 Subject: [PATCH] MGTwoLevelTransfer: remove fine-vector specialization for DG --- .../mg_transfer_global_coarsening.templates.h | 30 +++---------------- 1 file changed, 4 insertions(+), 26 deletions(-) diff --git a/include/deal.II/multigrid/mg_transfer_global_coarsening.templates.h b/include/deal.II/multigrid/mg_transfer_global_coarsening.templates.h index 9f0f74af6b..41fb457810 100644 --- a/include/deal.II/multigrid/mg_transfer_global_coarsening.templates.h +++ b/include/deal.II/multigrid/mg_transfer_global_coarsening.templates.h @@ -1889,7 +1889,6 @@ namespace internal dof_handler_fine.get_fe(fe_index_pair.first.second).degree; } - const auto comm = dof_handler_coarse.get_communicator(); { transfer.partitioner_fine = std::make_shared( @@ -2012,12 +2011,6 @@ namespace internal transfer.level_dof_indices_fine.data() + n_dof_indices_fine[i]; } - bool fine_indices_touch_remote_dofs = false; - const IndexSet locally_owned_dofs = - mg_level_fine == numbers::invalid_unsigned_int ? - dof_handler_fine.locally_owned_dofs() : - dof_handler_fine.locally_owned_mg_dofs(mg_level_fine); - transfer.constraint_info.reinit( dof_handler_coarse, cell_no.back(), @@ -2044,18 +2037,10 @@ namespace internal for (unsigned int i = 0; i < transfer.schemes[fe_pair_no].n_dofs_per_cell_fine; i++) - { - level_dof_indices_fine[fe_pair_no][i] = - transfer.partitioner_fine->global_to_local( - local_dof_indices_fine - [fe_pair_no] - [lexicographic_numbering_fine[fe_pair_no][i]]); - if (!locally_owned_dofs.is_element( - local_dof_indices_fine - [fe_pair_no] - [lexicographic_numbering_fine[fe_pair_no][i]])) - fine_indices_touch_remote_dofs = true; - } + level_dof_indices_fine[fe_pair_no][i] = + transfer.partitioner_fine->global_to_local( + local_dof_indices_fine + [fe_pair_no][lexicographic_numbering_fine[fe_pair_no][i]]); } // move pointers @@ -2065,13 +2050,6 @@ namespace internal } }); - // if all access goes to the locally owned dofs on all ranks, we do - // not need the vec_fine vector - if (Utilities::MPI::max(static_cast( - fine_indices_touch_remote_dofs), - comm) == 0) - transfer.vec_fine.reinit(0); - transfer.constraint_info.finalize(); } -- 2.39.5