Skip to content
Snippets Groups Projects
Commit 637a4a65 authored by Timo Koch's avatar Timo Koch
Browse files

Merge branch 'feature/version-check-solverfactory' into 'master'

[linear][istlsolverfactorybackend] Make usable with dune 2.7

See merge request !1982

(cherry picked from commit 07488576)

947f1b32 [linear][istlsolverfactorybackend] Make usable with dune 2.7
parent f96ad774
No related branches found
No related tags found
1 merge request!1983[WIP] Merge branch 'feature/version-check-solverfactory' into 'master'
......@@ -27,7 +27,7 @@
#define DUMUX_LINEAR_ISTL_SOLVERFACTORYBACKEND_HH
#include <dune/common/version.hh>
#if DUNE_VERSION_NEWER_REV(DUNE_ISTL,2,7,1)
#if DUNE_VERSION_GTE(DUNE_ISTL,2,7)
#include <dune/common/parallel/mpihelper.hh>
#include <dune/common/parametertree.hh>
......@@ -225,6 +225,7 @@ private:
template<class ParallelTraits, class Matrix, class Vector>
void solveParallel_(Matrix& A, Vector& x, Vector& b)
{
#if DUNE_VERSION_GT(DUNE_ISTL,2,7)
using Comm = typename ParallelTraits::Comm;
using LinearOperator = typename ParallelTraits::LinearOperator;
using ScalarProduct = typename ParallelTraits::ScalarProduct;
......@@ -245,6 +246,9 @@ private:
// solve linear system
solver->apply(x, b, result_);
#else
DUNE_THROW(Dune::NotImplemented, "Parallel solvers only available for dune-istl > 2.7");
#endif
}
#endif // HAVE_MPI
......@@ -293,6 +297,6 @@ private:
} // end namespace Dumux
#else
#warning "Generic dune-istl solver factory backend needs dune-istl >= 2.7.1!"
#warning "Generic dune-istl solver factory backend needs dune-istl >= 2.7!"
#endif // DUNE version check
#endif // header guard
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