]> https://gitweb.dealii.org/ - dealii.git/commitdiff
Implement PreconditionMG::get_multigrid() 12733/head
authorPeter Munch <peterrmuench@gmail.com>
Wed, 1 Sep 2021 20:56:23 +0000 (22:56 +0200)
committerPeter Munch <peterrmuench@gmail.com>
Thu, 2 Sep 2021 06:39:07 +0000 (08:39 +0200)
include/deal.II/multigrid/multigrid.h

index 2d7cdba9a37fbbf45ac02502d7d4439ba9b57020..b1d262443ebc40fe1b3abb2c7b81d358e4ebfbf4 100644 (file)
@@ -589,6 +589,18 @@ public:
   boost::signals2::connection
   connect_transfer_to_global(const std::function<void(bool)> &slot);
 
+  /**
+   * Return the Multigrid object passed to the constructor.
+   */
+  Multigrid<VectorType> &
+  get_multigrid();
+
+  /**
+   * Return the Multigrid object passed to the constructor.
+   */
+  const Multigrid<VectorType> &
+  get_multigrid() const;
+
 private:
   /**
    * Associated @p DoFHandler.
@@ -963,6 +975,22 @@ PreconditionMG<dim, VectorType, TRANSFER>::Tvmult_add(
   Assert(false, ExcNotImplemented());
 }
 
+
+template <int dim, typename VectorType, class TRANSFER>
+Multigrid<VectorType> &
+PreconditionMG<dim, VectorType, TRANSFER>::get_multigrid()
+{
+  return *this->multigrid;
+}
+
+
+template <int dim, typename VectorType, class TRANSFER>
+const Multigrid<VectorType> &
+PreconditionMG<dim, VectorType, TRANSFER>::get_multigrid() const
+{
+  return *this->multigrid;
+}
+
 #endif // DOXYGEN
 
 DEAL_II_NAMESPACE_CLOSE

In the beginning the Universe was created. This has made a lot of people very angry and has been widely regarded as a bad move.

Douglas Adams


Typeset in Trocchi and Trocchi Bold Sans Serif.