From 7a65d0bace24f3d33962d3eeeef37d76ec0d4964 Mon Sep 17 00:00:00 2001 From: Peter Munch Date: Wed, 1 Sep 2021 22:56:23 +0200 Subject: [PATCH] Implement PreconditionMG::get_multigrid() --- include/deal.II/multigrid/multigrid.h | 28 +++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) diff --git a/include/deal.II/multigrid/multigrid.h b/include/deal.II/multigrid/multigrid.h index 2d7cdba9a3..b1d262443e 100644 --- a/include/deal.II/multigrid/multigrid.h +++ b/include/deal.II/multigrid/multigrid.h @@ -589,6 +589,18 @@ public: boost::signals2::connection connect_transfer_to_global(const std::function &slot); + /** + * Return the Multigrid object passed to the constructor. + */ + Multigrid & + get_multigrid(); + + /** + * Return the Multigrid object passed to the constructor. + */ + const Multigrid & + get_multigrid() const; + private: /** * Associated @p DoFHandler. @@ -963,6 +975,22 @@ PreconditionMG::Tvmult_add( Assert(false, ExcNotImplemented()); } + +template +Multigrid & +PreconditionMG::get_multigrid() +{ + return *this->multigrid; +} + + +template +const Multigrid & +PreconditionMG::get_multigrid() const +{ + return *this->multigrid; +} + #endif // DOXYGEN DEAL_II_NAMESPACE_CLOSE -- 2.39.5