From 84b0aaa9880ceac408e4fc771394911e4e0bf8b9 Mon Sep 17 00:00:00 2001
From: Uli Sack <usack@math.fu-berlin.de>
Date: Mon, 23 Jul 2012 13:58:15 +0000
Subject: [PATCH] introduce method setRhs, in order to be able to solve a
 second problem with the same matrix without recomputing the grid hierarchy

[[Imported from SVN: r6543]]
---
 dune/solvers/iterationsteps/multigridstep.hh | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/dune/solvers/iterationsteps/multigridstep.hh b/dune/solvers/iterationsteps/multigridstep.hh
index cdb74c39..71ccd26f 100644
--- a/dune/solvers/iterationsteps/multigridstep.hh
+++ b/dune/solvers/iterationsteps/multigridstep.hh
@@ -137,6 +137,11 @@
             preprocessCalled = false;
         }
 
+        void setRhs(const VectorType& rhs)
+        {
+            rhs_[numLevels_-1] = rhs;
+        }
+
         template <class DerivedTransferHierarchy>
         void setTransferOperators(const DerivedTransferHierarchy& transfer)
         {
-- 
GitLab