diff --git a/opm/core/linalg/LinearSolverIstl.cpp b/opm/core/linalg/LinearSolverIstl.cpp index edcf4941..2e0a8de7 100644 --- a/opm/core/linalg/LinearSolverIstl.cpp +++ b/opm/core/linalg/LinearSolverIstl.cpp @@ -59,7 +59,8 @@ namespace Opm solveCG_ILU0(const Mat& A, Vector& x, Vector& b, double tolerance, int maxit, int verbosity); LinearSolverInterface::LinearSolverReport - solveCG_AMG(const Mat& A, Vector& x, Vector& b, double tolerance, int maxit, int verbosity); + solveCG_AMG(const Mat& A, Vector& x, Vector& b, double tolerance, int maxit, int verbosity, + double prolongateFactor, int smothsteps); LinearSolverInterface::LinearSolverReport solveBiCGStab_ILU0(const Mat& A, Vector& x, Vector& b, double tolerance, int maxit, int verbosity); @@ -100,7 +101,7 @@ namespace Opm } linsolver_max_iterations_ = param.getDefault("linsolver_max_iterations", linsolver_max_iterations_); linsolver_smooth_steps_ = param.getDefault("linsolver_smooth_steps", linsolver_smooth_steps_); - linsolver_prolongate_factor_ = param.getDegfault("linsolver_prolongate_factor", linsolver_prolongate_factor_); + linsolver_prolongate_factor_ = param.getDefault("linsolver_prolongate_factor", linsolver_prolongate_factor_); } @@ -167,7 +168,8 @@ namespace Opm res = solveCG_ILU0(A, x, b, linsolver_residual_tolerance_, maxit, linsolver_verbosity_); break; case CG_AMG: - res = solveCG_AMG(A, x, b, linsolver_residual_tolerance_, maxit, linsolver_verbosity_); + res = solveCG_AMG(A, x, b, linsolver_residual_tolerance_, maxit, linsolver_verbosity_, + linsolver_prolongate_factor_, linsolver_smooth_steps_); break; case BiCGStab_ILU0: res = solveBiCGStab_ILU0(A, x, b, linsolver_residual_tolerance_, maxit, linsolver_verbosity_); @@ -222,7 +224,7 @@ namespace Opm LinearSolverInterface::LinearSolverReport - solveCG_AMG(const Mat& A, Vector& x, Vector& b, double tolerance, int maxit, int verbosity) + solveCG_AMG(const Mat& A, Vector& x, Vector& b, double tolerance, int maxit, int verbosity, double linsolver_prolongate_factor, int linsolver_smooth_steps) { // Solve with AMG solver. #define FIRST_DIAGONAL 1 @@ -261,9 +263,9 @@ namespace Opm #if ANISOTROPIC_3D criterion.setDefaultValuesAnisotropic(3, 2); #endif - criterion.setProlongateDampingFactor(linsolve_prolongate_factor_); - Precond precond(opA, criterion, smootherArgs, 1, linsolve_smooth_steps_, - linsolve_smooth_steps_); + criterion.setProlongationDampingFactor(linsolver_prolongate_factor); + Precond precond(opA, criterion, smootherArgs, 1, linsolver_smooth_steps, + linsolver_smooth_steps); // Construct linear solver. CGSolver linsolve(opA, precond, tolerance, maxit, verbosity); diff --git a/opm/core/linalg/LinearSolverIstl.hpp b/opm/core/linalg/LinearSolverIstl.hpp index 3ea9500b..abe5f0fb 100644 --- a/opm/core/linalg/LinearSolverIstl.hpp +++ b/opm/core/linalg/LinearSolverIstl.hpp @@ -91,7 +91,7 @@ namespace Opm /** \brief The number smoothing steps to apply in AMG. */ int linsolver_smooth_steps_; /** \brief The factor to scale the coarse grid correction with. */ - linsolver_prolongate_factor_; + double linsolver_prolongate_factor_; };