From 54a27b070425967347cb7ad10888dbd7f9613d4d Mon Sep 17 00:00:00 2001
From: Oliver Sander <sander@igpm.rwth-aachen.de>
Date: Tue, 6 Oct 2009 09:14:12 +0000
Subject: [PATCH] implement method setProblem()

[[Imported from SVN: r2952]]
---
 dune-solvers/iterationsteps/amgstep.hh | 10 +++++++++-
 1 file changed, 9 insertions(+), 1 deletion(-)

diff --git a/dune-solvers/iterationsteps/amgstep.hh b/dune-solvers/iterationsteps/amgstep.hh
index b110e374..86115fe4 100644
--- a/dune-solvers/iterationsteps/amgstep.hh
+++ b/dune-solvers/iterationsteps/amgstep.hh
@@ -52,8 +52,16 @@ public:
              VectorType& rhs)
     {
         setProblem(*stiffnessMatrix, x, rhs);
+    }
 
-        fop_ = std::auto_ptr<Operator>(new Operator(*stiffnessMatrix));
+    /** \brief Initialize the iteration step but don't actually build the matrix hierarchy yet */
+    virtual void setProblem(const MatrixType& stiffnessMatrix, 
+             VectorType& x, 
+             VectorType& rhs)
+    {
+        LinearIterationStep<MatrixType, VectorType>::setProblem(stiffnessMatrix, x, rhs);
+
+        fop_ = std::auto_ptr<Operator>(new Operator(stiffnessMatrix));
     }
 
     /** \brief Sets up an algebraic hierarchy
-- 
GitLab