Skip to content
Snippets Groups Projects
Commit cb8406c9 authored by Ned Coltman's avatar Ned Coltman
Browse files

Merge branch 'fix/compiler-error-precond-dune27' into 'master'

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

See merge request !2025

(cherry picked from commit 9dcf7b6a)

78c49f18 [linear][seqsolverbacked] Fix compilation error for dune-2.7 related to solveWithParamTree
parent 6136a5e2
No related branches found
No related tags found
2 merge requests!2152WIP add default fluxcache properties,!2027Merge branch 'fix/compiler-error-precond-dune27' into 'master'
......@@ -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);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment