From 0add469016fa678e4554523b7b2df77fbd6e44d9 Mon Sep 17 00:00:00 2001 From: Marco Feder Date: Mon, 31 Jul 2023 15:25:15 +0000 Subject: [PATCH] Add constrained DoFs to locally relevant DoFs in non-nested MG --- .../mg_transfer_global_coarsening.templates.h | 21 +++++++++++++------ 1 file changed, 15 insertions(+), 6 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 4b67862f64..6e78493f1e 100644 --- a/include/deal.II/multigrid/mg_transfer_global_coarsening.templates.h +++ b/include/deal.II/multigrid/mg_transfer_global_coarsening.templates.h @@ -2224,6 +2224,18 @@ namespace internal compress_weights(transfer); } } + + + template + friend void + MGTwoLevelTransferNonNested>:: + reinit(const DoFHandler & dof_handler_fine, + const DoFHandler & dof_handler_coarse, + const Mapping & mapping_fine, + const Mapping & mapping_coarse, + const AffineConstraints &constraint_fine, + const AffineConstraints &constraint_coarse); }; @@ -3839,12 +3851,9 @@ MGTwoLevelTransferNonNested>:: // create partitioners and internal vectors { - IndexSet locally_active_dofs = - DoFTools::extract_locally_active_dofs(dof_handler_coarse); - this->partitioner_coarse.reset( - new Utilities::MPI::Partitioner(dof_handler_coarse.locally_owned_dofs(), - locally_active_dofs, - dof_handler_coarse.get_communicator())); + this->partitioner_coarse = + internal::MGTwoLevelTransferImplementation::create_coarse_partitioner( + dof_handler_coarse, constraint_coarse, numbers::invalid_unsigned_int); this->vec_coarse.reinit(this->partitioner_coarse); } -- 2.39.5