From a7cac104f11851592e88b5469acca329b39ea553 Mon Sep 17 00:00:00 2001 From: Oliver Sander <sander@igpm.rwth-aachen.de> Date: Mon, 17 Mar 2014 17:56:37 +0000 Subject: [PATCH] Add default constructor and setProblem method These are needed to use the CGStep as an acceleration step for the TNNMG method. [[Imported from SVN: r13067]] --- dune/solvers/iterationsteps/cgstep.hh | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/dune/solvers/iterationsteps/cgstep.hh b/dune/solvers/iterationsteps/cgstep.hh index 97f9e9be..12e9dbb7 100644 --- a/dune/solvers/iterationsteps/cgstep.hh +++ b/dune/solvers/iterationsteps/cgstep.hh @@ -12,6 +12,9 @@ namespace Dune { class CGStep : public IterationStep<VectorType> { public: + CGStep() + {} + CGStep(const MatrixType& matrix, VectorType& x, const VectorType& rhs) @@ -27,6 +30,14 @@ namespace Dune { preconditioner_(&preconditioner) {} + //! Set linear operator, solution and right hand side + virtual void setProblem(const MatrixType& mat, VectorType& x, const VectorType& rhs) + { + matrix_ = mat; + x_ = x; + r_ = rhs; + } + void check() const; void preprocess(); void iterate(); -- GitLab