From 94e5509e99dda20bea69909eb5b047d97aa07ee5 Mon Sep 17 00:00:00 2001
From: Bernd Flemisch <bernd@iws.uni-stuttgart.de>
Date: Wed, 16 Oct 2013 11:52:14 +0000
Subject: [PATCH] Bugfix in AMGBackend: take GET_PARAM_FROM_GROUP instead of
 GET_PROP_VALUE for the properties/parameters MaxiTerations, Verbosity and
 ResidualReduction. Only then, these values can be changed form the input file
 or command line. Approved by Alex.

git-svn-id: svn://svn.iws.uni-stuttgart.de/DUMUX/dumux/trunk@11669 2fb0f335-1f38-0410-981e-8018bf24f1b0
---
 dumux/linear/amgbackend.hh | 18 +++++++++---------
 1 file changed, 9 insertions(+), 9 deletions(-)

diff --git a/dumux/linear/amgbackend.hh b/dumux/linear/amgbackend.hh
index f23477f426..bc79e5d473 100644
--- a/dumux/linear/amgbackend.hh
+++ b/dumux/linear/amgbackend.hh
@@ -230,8 +230,8 @@ public:
         constraints_ = Dune::make_shared<Constraints>();
         scalarGridFunctionSpace_ = Dune::make_shared<ScalarGridFunctionSpace>(problem.gridView(), *fem_, *constraints_);
         gridFunctionSpace_ = Dune::make_shared<GridFunctionSpace>(*scalarGridFunctionSpace_);
-        int maxIt = GET_PROP_VALUE(TypeTag, LinearSolverMaxIterations);
-        int verbosity = GET_PROP_VALUE(TypeTag, LinearSolverVerbosity);
+        int maxIt = GET_PARAM_FROM_GROUP(TypeTag, double, LinearSolver, MaxIterations);
+        int verbosity = GET_PARAM_FROM_GROUP(TypeTag, int, LinearSolver, Verbosity);
         imp_ = Dune::make_shared<PDELabBackend>(*gridFunctionSpace_, maxIt, verbosity);
     }
 
@@ -245,7 +245,7 @@ public:
     template<class Matrix, class Vector>
     bool solve(Matrix& A, Vector& x, Vector& b)
     {
-        static const double residReduction = GET_PROP_VALUE(TypeTag, LinearSolverResidualReduction);
+        static const double residReduction = GET_PARAM_FROM_GROUP(TypeTag, double, LinearSolver, ResidualReduction);
         imp_->apply(A, x, b, residReduction);
 
         result_.converged  = imp_->result().converged;
@@ -305,11 +305,11 @@ public:
     template<class Matrix, class Vector>
     bool solve(Matrix& A, Vector& x, Vector& b)
     {
-        int maxIt = GET_PROP_VALUE(TypeTag, LinearSolverMaxIterations);
-        int verbosity = GET_PROP_VALUE(TypeTag, LinearSolverVerbosity);
+        int maxIt = GET_PARAM_FROM_GROUP(TypeTag, double, LinearSolver, MaxIterations);
+        int verbosity = GET_PARAM_FROM_GROUP(TypeTag, int, LinearSolver, Verbosity);
         imp_ = Dune::make_shared<PDELabBackend>(maxIt, verbosity);
 
-        static const double residReduction = GET_PROP_VALUE(TypeTag, LinearSolverResidualReduction);
+        static const double residReduction = GET_PARAM_FROM_GROUP(TypeTag, double, LinearSolver, ResidualReduction);
         imp_->apply(A, x, b, residReduction);
 
         result_.converged  = imp_->result().converged;
@@ -372,11 +372,11 @@ public:
     {
         scaleLinearSystem(A, b);
 
-        int maxIt = GET_PROP_VALUE(TypeTag, LinearSolverMaxIterations);
-        int verbosity = GET_PROP_VALUE(TypeTag, LinearSolverVerbosity);
+        int maxIt = GET_PARAM_FROM_GROUP(TypeTag, double, LinearSolver, MaxIterations);
+        int verbosity = GET_PARAM_FROM_GROUP(TypeTag, int, LinearSolver, Verbosity);
         imp_ = Dune::make_shared<PDELabBackend>(maxIt, verbosity);
         
-        static const double residReduction = GET_PROP_VALUE(TypeTag, LinearSolverResidualReduction);
+        static const double residReduction = GET_PARAM_FROM_GROUP(TypeTag, double, LinearSolver, ResidualReduction);
         imp_->apply(A, x, b, residReduction);
 
         result_.converged  = imp_->result().converged;
-- 
GitLab