From 8c8bb67aa042583d0846f05d535be4e19a9eb448 Mon Sep 17 00:00:00 2001 From: Markus Blatt Date: Wed, 19 Mar 2014 11:19:25 +0100 Subject: [PATCH] Makes KAMG and FastAMG solver available with dune-istl 2.3 Previously we relied on the define DUNE_HAS_FAST_AMG to detect whether these preconditioners are available. This define is only available in the 2.2 release with cmake support. Therfore we now addtionally test whether we are using dune-isl 2.3 or newer. --- opm/core/linalg/LinearSolverIstl.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/opm/core/linalg/LinearSolverIstl.cpp b/opm/core/linalg/LinearSolverIstl.cpp index 77aaf4ca7..f9e2bb7bd 100644 --- a/opm/core/linalg/LinearSolverIstl.cpp +++ b/opm/core/linalg/LinearSolverIstl.cpp @@ -30,6 +30,7 @@ // TODO: clean up includes. #include +#include #include #include #include @@ -61,7 +62,7 @@ namespace Opm solveCG_AMG(const Mat& A, Vector& x, Vector& b, double tolerance, int maxit, int verbosity, double prolongateFactor, int smoothsteps); -#ifdef HAS_DUNE_FAST_AMG +#if defined(HAS_DUNE_FAST_AMG) || DUNE_VERSION_NEWER(DUNE_ISTL, 2, 3) LinearSolverInterface::LinearSolverReport solveKAMG(const Mat& A, Vector& x, Vector& b, double tolerance, int maxit, int verbosity, double prolongateFactor, int smoothsteps);