From cb8406c976352bdd9ddec1a963ca28a486056943 Mon Sep 17 00:00:00 2001
From: Ned Coltman <edward.coltman@iws.uni-stuttgart.de>
Date: Wed, 22 Apr 2020 15:23:04 +0000
Subject: [PATCH] Merge branch 'fix/compiler-error-precond-dune27' into
 'master'

[linear][seqsolverbacked] Fix compilation error for dune-2.7 related to solveWithParamTree

See merge request dumux-repositories/dumux!2025

(cherry picked from commit 9dcf7b6a070cad82b17600a5666f399853bf28be)

78c49f18 [linear][seqsolverbacked] Fix compilation error for dune-2.7 related to solveWithParamTree
---
 dumux/linear/seqsolverbackend.hh | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/dumux/linear/seqsolverbackend.hh b/dumux/linear/seqsolverbackend.hh
index 00db276e88..c6e83fbc9c 100644
--- a/dumux/linear/seqsolverbackend.hh
+++ b/dumux/linear/seqsolverbackend.hh
@@ -158,12 +158,15 @@ public:
     static bool solveWithParamTree(const Matrix& A, Vector& x, const Vector& b,
                                    const Dune::ParameterTree& params)
     {
-
         // make a linear operator from a matrix
         using MatrixAdapter = Dune::MatrixAdapter<Matrix, Vector, Vector>;
         const auto linearOperator = std::make_shared<MatrixAdapter>(A);
 
+#if DUNE_VERSION_GT(DUNE_ISTL,2,7)
         auto precond = std::make_shared<Preconditioner>(linearOperator, params.sub("preconditioner"));
+#else
+        auto precond = std::make_shared<Preconditioner>(A, params.sub("preconditioner"));
+#endif
         Solver solver(linearOperator, precond, params);
 
         Vector bTmp(b);
-- 
GitLab