diff --git a/CHANGELOG.md b/CHANGELOG.md index a927ecdaf262c2db2e762d67079fb4c352799eb8..615fe391fa162da9553f216f5e186b830f110800 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -17,7 +17,7 @@ An additional new option is `Vtk.CoordPrecision` which changes the precision of - __Examples__: The documentation of the examples has been improved further, focusing on readability and convenience. Further, three additional examples are included the folder `examples`. To get an overview, point your browser to https://git.iws.uni-stuttgart.de/dumux-repositories/dumux/tree/master/examples. -- __Linear solvers__: There is a new ISTL solver factory backend which allows to choose solvers at runtime (requires dune-istl 2.7) and also enables more parallel solvers (requires dune-istl > 2.7.1). +- __Linear solvers__: There is a new ISTL solver factory backend which allows to choose solvers at runtime (requires dune-istl 2.7) and also enables more parallel solvers (requires dune-istl > 2.7.0). ### Immediate interface changes not allowing/requiring a deprecation period diff --git a/dumux/linear/istlsolverfactorybackend.hh b/dumux/linear/istlsolverfactorybackend.hh index 2fda1567de72a3b266f2e282ec9fdbd49fd1d921..2781d5ceec9980b9153102eb7a0a4072782b5560 100644 --- a/dumux/linear/istlsolverfactorybackend.hh +++ b/dumux/linear/istlsolverfactorybackend.hh @@ -239,6 +239,7 @@ private: template<class ParallelTraits, class Matrix, class Vector> void solveParallel_(Matrix& A, Vector& x, Vector& b) { +#if DUNE_VERSION_GT_REV(DUNE_ISTL,2,7,0) using Comm = typename ParallelTraits::Comm; using LinearOperator = typename ParallelTraits::LinearOperator; using ScalarProduct = typename ParallelTraits::ScalarProduct; @@ -259,6 +260,9 @@ private: // solve linear system solver->apply(x, b, result_); +#else + DUNE_THROW(Dune::NotImplemented, "Parallel solvers only available for dune-istl > 2.7.0"); +#endif } #endif // HAVE_MPI diff --git a/test/freeflow/shallowwater/dambreak/main.cc b/test/freeflow/shallowwater/dambreak/main.cc index 18080ada723be04023372aace5d43bf8e260c2a3..7471c8ab8972080851fdcd6415e87edf06d53b15 100644 --- a/test/freeflow/shallowwater/dambreak/main.cc +++ b/test/freeflow/shallowwater/dambreak/main.cc @@ -43,7 +43,7 @@ #include <dumux/linear/linearsolvertraits.hh> -#if DUNE_VERSION_NEWER_REV(DUNE_ISTL,2,7,1) +#if DUNE_VERSION_GT_REV(DUNE_ISTL,2,7,0) #include <dumux/linear/istlsolverfactorybackend.hh> #else #include <dumux/linear/amgbackend.hh> @@ -131,7 +131,7 @@ int main(int argc, char** argv) try auto assembler = std::make_shared<Assembler>(problem, gridGeometry, gridVariables, timeLoop, xOld); // the linear solver -#if DUNE_VERSION_NEWER_REV(DUNE_ISTL,2,7,1) +#if DUNE_VERSION_GT_REV(DUNE_ISTL,2,7,0) using LinearSolver = IstlSolverFactoryBackend<LinearSolverTraits<GridGeometry>>; #else using LinearSolver = AMGBiCGSTABBackend<LinearSolverTraits<GridGeometry>>; diff --git a/test/porousmediumflow/richards/implicit/lens/main.cc b/test/porousmediumflow/richards/implicit/lens/main.cc index 40e3cbbb1d8230458efc0c2de8e059cb16bdad3a..960133a45127dbcdaa48e69cc21633df3e497bc7 100644 --- a/test/porousmediumflow/richards/implicit/lens/main.cc +++ b/test/porousmediumflow/richards/implicit/lens/main.cc @@ -40,7 +40,7 @@ #include <dumux/common/dumuxmessage.hh> #include <dumux/linear/linearsolvertraits.hh> -#if DUNE_VERSION_NEWER_REV(DUNE_ISTL,2,7,1) +#if DUNE_VERSION_GT_REV(DUNE_ISTL,2,7,0) #include <dumux/linear/istlsolverfactorybackend.hh> #include <dumux/linear/linearsolvertraits.hh> #else @@ -150,7 +150,7 @@ int main(int argc, char** argv) try auto assembler = std::make_shared<Assembler>(problem, gridGeometry, gridVariables, timeLoop, xOld); // the linear solver -#if DUNE_VERSION_NEWER_REV(DUNE_ISTL,2,7,1) +#if DUNE_VERSION_GT_REV(DUNE_ISTL,2,7,0) using LinearSolver = IstlSolverFactoryBackend<LinearSolverTraits<GridGeometry>>; #else using LinearSolver = AMGBiCGSTABBackend<LinearSolverTraits<GridGeometry>>;