From a41414017677bef1271c47e456bfce77f23e1251 Mon Sep 17 00:00:00 2001 From: Ansgar Burchardt <Ansgar.Burchardt@tu-dresden.de> Date: Tue, 3 Jul 2018 16:11:24 +0200 Subject: [PATCH] AMGStep: do not use deprecated constructor --- dune/solvers/iterationsteps/amgstep.hh | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/dune/solvers/iterationsteps/amgstep.hh b/dune/solvers/iterationsteps/amgstep.hh index a0f37001..4dfa8834 100644 --- a/dune/solvers/iterationsteps/amgstep.hh +++ b/dune/solvers/iterationsteps/amgstep.hh @@ -49,7 +49,7 @@ public: setProblem(*stiffnessMatrix, x, rhs); fop_ = std::unique_ptr<Operator>(new Operator(*stiffnessMatrix)); - amg_ = std::unique_ptr<AMG>(new AMG(*fop_, coarseningCriterion, smootherArgs, 1, 1, 1, false)); + amg_ = std::unique_ptr<AMG>(new AMG(*fop_, coarseningCriterion, smootherArgs)); amg_->pre(*this->x_, residual_); } @@ -94,12 +94,21 @@ private: std::unique_ptr<AMG> amg_; VectorType residual_; + + void setupCoarseningCriterion() + { + coarseningCriterion_.setNoPreSmoothSteps(1); + coarseningCriterion_.setNoPostSmoothSteps(1); + coarseningCriterion_.setGamma(1); + coarseningCriterion_.setAdditive(false); + } }; template <class MatrixType, class VectorType> void AMGStep<MatrixType,VectorType>::preprocess() { - amg_ = std::unique_ptr<AMG>(new AMG(*fop_, coarseningCriterion_, smootherArgs_, 1, 1, 1, false)); + setupCoarseningCriterion(); + amg_ = std::unique_ptr<AMG>(new AMG(*fop_, coarseningCriterion_, smootherArgs_)); amg_->pre(*this->x_, residual_); } -- GitLab