From: Peter Munch Date: Thu, 21 Oct 2021 17:33:46 +0000 (+0200) Subject: Add MGTransferGlobalCoarsening::interpolate_to_mg() that does not take DoFHandler X-Git-Tag: v9.4.0-rc1~910^2 X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=713aa9e183b46d3bf61e5f4dc10938109782ec3e;p=dealii.git Add MGTransferGlobalCoarsening::interpolate_to_mg() that does not take DoFHandler --- diff --git a/include/deal.II/multigrid/mg_transfer_global_coarsening.h b/include/deal.II/multigrid/mg_transfer_global_coarsening.h index 11ec8da08b..a9bdbfc5c8 100644 --- a/include/deal.II/multigrid/mg_transfer_global_coarsening.h +++ b/include/deal.II/multigrid/mg_transfer_global_coarsening.h @@ -525,8 +525,16 @@ public: * * If an inner vector of @p dst is empty or has incorrect locally owned size, * it will be resized to locally relevant degrees of freedom on each level. - * - * @note DoFHandler is not needed here, but is required by the interface. + */ + template + void + interpolate_to_mg(MGLevelObject &dst, const InVector &src) const; + + /** + * Like the above function but with a user-provided DoFHandler as + * additional argument. However, this DoFHandler is not used internally, but + * is required to be able to use MGTransferGlobalCoarsening and + * MGTransferMatrixFree as template argument. */ template void @@ -661,12 +669,9 @@ template template void MGTransferGlobalCoarsening::interpolate_to_mg( - const DoFHandler &dof_handler, - MGLevelObject & dst, - const InVector & src) const + MGLevelObject &dst, + const InVector & src) const { - (void)dof_handler; - Assert( initialize_dof_vector, ExcMessage( @@ -691,6 +696,21 @@ MGTransferGlobalCoarsening::interpolate_to_mg( +template +template +void +MGTransferGlobalCoarsening::interpolate_to_mg( + const DoFHandler &dof_handler, + MGLevelObject & dst, + const InVector & src) const +{ + (void)dof_handler; + + this->interpolate_to_mg(dst, src); +} + + + template std::size_t MGTransferGlobalCoarsening::memory_consumption() const