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.
This commit is contained in:
@@ -3,6 +3,9 @@
|
||||
|
||||
# defines that must be present in config.h for our headers
|
||||
set (opm-core_CONFIG_VAR
|
||||
DUNE_ISTL_VERSION_MAJOR
|
||||
DUNE_ISTL_VERSION_MINOR
|
||||
DUNE_ISTL_VERSION_REVISION
|
||||
HAVE_ERT
|
||||
HAVE_SUITESPARSE_UMFPACK_H
|
||||
)
|
||||
|
||||
@@ -30,6 +30,7 @@
|
||||
|
||||
// TODO: clean up includes.
|
||||
#include <dune/common/deprecated.hh>
|
||||
#include <dune/common/version.hh>
|
||||
#include <dune/istl/bvector.hh>
|
||||
#include <dune/istl/bcrsmatrix.hh>
|
||||
#include <dune/istl/operators.hh>
|
||||
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user