diff --git a/dumux/linear/seqsolverbackend.hh b/dumux/linear/seqsolverbackend.hh index 00db276e88d6979ddfdf50a1c7f02936e2926a3f..c6e83fbc9c6294ccb64394f7682f854d4a23b73f 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);