From: Marco Feder Date: Mon, 31 Jul 2023 15:25:15 +0000 (+0000) Subject: Add constrained DoFs to locally relevant DoFs in non-nested MG X-Git-Tag: relicensing~633^2~2 X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=0add469016fa678e4554523b7b2df77fbd6e44d9;p=dealii.git Add constrained DoFs to locally relevant DoFs in non-nested MG --- 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); }