3#include <amdis/Initfile.hpp>
4#include <amdis/Output.hpp>
10template <
class G,
class L>
11 template <
class Basis>
12ISTLIndexDistribution<G,L>::ISTLIndexDistribution(Basis
const& basis)
14 using SolverType = Dune::SolverCategory::Category;
15 std::string category =
"default";
18 auto const& gv = basis.gridView();
19 int mpiSize = gv.comm().size();
21 cat_ = SolverType::sequential;
22 if (category ==
"default")
26 cat_ = SolverType::sequential;
31 if (gv.overlapSize(0) > 0)
32 cat_ = SolverType::overlapping;
36 warning(
"Nonoverlapping solvers are currently not supported.");
37 cat_ = SolverType::nonoverlapping;
41 else if (category !=
"sequential" && mpiSize == 1)
43 warning(
"Only one process detected. Solver category set to sequential\n");
44 cat_ = SolverType::sequential;
46 else if (category ==
"sequential")
48 test_exit(mpiSize == 1,
"Solver category sequential is not supported in parallel\n");
49 cat_ = SolverType::sequential;
51 else if (category ==
"overlapping")
53 if (gv.overlapSize(0) == 0)
54 warning(
"Overlapping solver category chosen for grid with no overlap\n");
55 cat_ = SolverType::overlapping;
57 else if (category ==
"nonoverlapping")
60 warning(
"Nonoverlapping solvers are currently not supported.");
61 cat_ = SolverType::nonoverlapping;
65 error_exit(
"Unknown solver category\n");
static std::optional< T > get(std::string const &key)
Get parameter-values from parameter-tree.
Definition: Initfile.hpp:25