From fad32e71402f9b6fe61b0418c4ec96271a44327b Mon Sep 17 00:00:00 2001
From: Ansgar Burchardt <Ansgar.Burchardt@tu-dresden.de>
Date: Tue, 29 May 2018 15:52:22 +0200
Subject: [PATCH] MultiGridSet: add overload to set pre- and postsmoother
 individually using `shared_ptr`

This matches the overloads to set both pre- and postsmoother to a
common smoother.
---
 dune/solvers/iterationsteps/multigridstep.hh | 9 +++++++++
 1 file changed, 9 insertions(+)

diff --git a/dune/solvers/iterationsteps/multigridstep.hh b/dune/solvers/iterationsteps/multigridstep.hh
index 1617a79a..6d88a5e0 100644
--- a/dune/solvers/iterationsteps/multigridstep.hh
+++ b/dune/solvers/iterationsteps/multigridstep.hh
@@ -178,6 +178,15 @@ namespace Dune {
                 levelWiseSmoothers_.clear();
         }
 
+        virtual void setSmoother(std::shared_ptr<LinearStepType> preSmoother,
+                                 std::shared_ptr<LinearStepType> postSmoother)
+        {
+                presmootherDefault_  = std::move(preSmoother);
+                postsmootherDefault_ = std::move(postSmoother);
+
+                levelWiseSmoothers_.clear();
+        }
+
         /** \brief Set the smoother iteration step for a particular level */
         virtual void setSmoother(LinearStepType* smoother, std::size_t level)
         {
-- 
GitLab