Skip to content
Snippets Groups Projects

[WIP] Merge branch 'feature/version-check-solverfactory' into 'master'

Closed Timo Koch requested to merge cherry-pick-07488576 into releases/3.2
Files
3
@@ -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>
@@ -46,6 +46,7 @@
#include <dumux/common/typetraits/matrix.hh>
#include <dumux/linear/solver.hh>
#include <dumux/linear/parallelhelpers.hh>
#include <dumux/linear/istlsolverregistry.hh>
namespace Dumux {
@@ -225,6 +226,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 +247,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 +298,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
Loading