Complete cf7f07b PR #530 to support FastAMG with dune-istl 2.3

This fixes further occurences of DUNE_HAS_FASTAMG that were
missed in pull request #530.

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-istl 2.3 or newer.
This commit is contained in:
Markus Blatt
2014-03-19 17:33:59 +01:00
parent f2d3098e50
commit 69a6a38856

View File

@@ -174,7 +174,7 @@ namespace Opm
linsolver_prolongate_factor_, linsolver_smooth_steps_);
break;
case KAMG:
#ifdef HAS_DUNE_FAST_AMG
#if defined(HAS_DUNE_FAST_AMG) || DUNE_VERSION_NEWER(DUNE_ISTL, 2, 3)
res = solveKAMG(A, x, b, linsolver_residual_tolerance_, maxit, linsolver_verbosity_,
linsolver_prolongate_factor_, linsolver_smooth_steps_);
#else
@@ -182,7 +182,7 @@ namespace Opm
#endif
break;
case FastAMG:
#ifdef HAS_DUNE_FAST_AMG
#if defined(HAS_DUNE_FAST_AMG) || DUNE_VERSION_NEWER(DUNE_ISTL, 2, 3)
res = solveFastAMG(A, x, b, linsolver_residual_tolerance_, maxit, linsolver_verbosity_,
linsolver_prolongate_factor_);
#else
@@ -312,7 +312,7 @@ namespace Opm
}
#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 linsolver_prolongate_factor, int linsolver_smooth_steps)