12#ifndef DUMUX_LINEAR_SOLVERCATEGORY_HH
13#define DUMUX_LINEAR_SOLVERCATEGORY_HH
15#include <dune/istl/solvers.hh>
19template<
class LinearSolverTraits,
class Gr
idView>
24 if (gridView.comm().size() <= 1)
25 return Dune::SolverCategory::sequential;
27 if (LinearSolverTraits::isNonOverlapping(gridView))
28 return Dune::SolverCategory::nonoverlapping;
30 return Dune::SolverCategory::overlapping;
34 if (gridView.comm().size() > 1)
35 DUNE_THROW(Dune::InvalidStateException,
36 "Attempt to construct parallel solver but LinearSolverTraits::canCommunicate is false. " <<
37 "Maybe the grid implementation does not support distributed parallelism."
41 return Dune::SolverCategory::sequential;
Distance implementation details.
Definition: cvfelocalresidual.hh:25
static constexpr bool canCommunicate
Definition: gridcapabilities.hh:51
Dune::SolverCategory::Category solverCategory(const GridView &gridView)
Definition: solvercategory.hh:20