25#ifndef DUMUX_LINEAR_SOLVER_PARAMETERS_HH
26#define DUMUX_LINEAR_SOLVER_PARAMETERS_HH
32#include <dune/common/parametertree.hh>
37template<
class LinearSolverTraits>
48 Dune::ParameterTree params;
57 params[
"restart"] =
"10";
58 params[
"maxit"] =
"250";
59 params[
"reduction"] =
"1e-13";
60 params[
"verbose"] =
"0";
61 params[
"preconditioner.iterations"] =
"1";
62 params[
"preconditioner.relaxation"] =
"1.0";
63 params[
"preconditioner.verbosity"] =
"0";
64 params[
"preconditioner.defaultAggregationSizeMode"] =
"isotropic";
65 params[
"preconditioner.defaultAggregationDimension"] = std::to_string(LinearSolverTraits::GridView::dimension);
66 params[
"preconditioner.maxLevel"] =
"100";
67 params[
"ParameterGroup"] = paramGroup;
68 params[
"preconditioner.ParameterGroup"] = paramGroup;
75 if (linearSolverGroups.empty())
80 for (
const auto& group : linearSolverGroups)
82 const auto fullDumuxKey = group +
"." + dumuxKey;
83 const auto value = getParam<std::string>(fullDumuxKey,
"");
86 params[istlKey] = value;
96template<
class LinearSolverTraits>
97const std::vector<std::array<std::string, 2>>
101 {
"Verbosity",
"verbose"},
102 {
"MaxIterations",
"maxit"},
103 {
"ResidualReduction",
"reduction"},
105 {
"GMResRestart",
"restart"},
106 {
"Restart",
"restart"},
107 {
"MaxOrthogonalizationVectors",
"mmax"},
110 {
"Preconditioner.Verbosity",
"preconditioner.verbosity"},
111 {
"Preconditioner.Type",
"preconditioner.type"},
112 {
"Preconditioner.Iterations",
"preconditioner.iterations"},
113 {
"Preconditioner.Relaxation",
"preconditioner.relaxation"},
114 {
"Preconditioner.ILUOrder",
"preconditioner.n"},
115 {
"Preconditioner.ILUResort",
"preconditioner.resort"},
116 {
"Preconditioner.AmgSmootherRelaxation",
"preconditioner.smootherRelaxation"},
117 {
"Preconditioner.AmgSmootherIterations",
"preconditioner.smootherIterations"},
118 {
"Preconditioner.AmgMaxLevel",
"preconditioner.maxLevel"},
119 {
"Preconditioner.AmgCoarsenTarget",
"preconditioner.coarsenTarget"},
120 {
"Preconditioner.AmgMinCoarseningRate",
"preconditioner.minCoarseningRate"},
121 {
"Preconditioner.AmgAccumulationMode",
"preconditioner.accumulationMode"},
122 {
"Preconditioner.AmgProlongationDampingFactor",
"preconditioner.prolongationDampingFactor"},
123 {
"Preconditioner.AmgAlpha",
"preconditioner.alpha"},
124 {
"Preconditioner.AmgBeta",
"preconditioner.beta"},
125 {
"Preconditioner.AmgAdditive",
"preconditioner.additive"},
126 {
"Preconditioner.AmgGamma",
"preconditioner.gamma"},
127 {
"Preconditioner.AmgPreSmoothingSteps",
"preconditioner.preSteps"},
128 {
"Preconditioner.AmgPostSmoothingSteps",
"preconditioner.postSteps"},
129 {
"Preconditioner.AmgCriterionSymmetric",
"preconditioner.criterionSymmetric"},
130 {
"Preconditioner.AmgStrengthMeasure",
"preconditioner.strengthMeasure"},
131 {
"Preconditioner.AmgDiagonalRowIndex",
"preconditioner.diagonalRowIndex"},
132 {
"Preconditioner.AmgDefaultAggregationSizeMode",
"preconditioner.defaultAggregationSizeMode"},
133 {
"Preconditioner.AmgDefaultAggregationDimension",
"preconditioner.defaultAggregationDimension"},
134 {
"Preconditioner.AmgMaxAggregateDistance",
"preconditioner.maxAggregateDistance"},
135 {
"Preconditioner.AmgMinAggregateSize",
"preconditioner.minAggregateSize"},
136 {
"Preconditioner.AmgMaxAggregateSize",
"preconditioner.maxAggregateSize"}
The infrastructure to retrieve run-time parameters from Dune::ParameterTrees.
std::vector< std::string > getParamSubGroups(const std::string &subGroupName, const std::string ¶mGroup)
Get a list of sub groups from the parameter tree sorted by relevance.
Definition: parameters.hh:398
Definition: linearsolverparameters.hh:39
static const std::vector< std::array< std::string, 2 > > dumuxToIstlSolverParams
Translation table for solver parameters.
Definition: linearsolverparameters.hh:43
static void setDefaultParameters(Dune::ParameterTree ¶ms, const std::string ¶mGroup="")
Set some defaults for the solver parameters.
Definition: linearsolverparameters.hh:55
static void fillValuesForIstlKeys(Dune::ParameterTree ¶ms, const std::string ¶mGroup="")
Iterate over all keys required by the ISTL, translate them to Dumux syntax and add values to tree.
Definition: linearsolverparameters.hh:72
static Dune::ParameterTree createParameterTree(const std::string ¶mGroup="")
Create a tree containing parameters required for the linear solvers and precondioners of the Dune IST...
Definition: linearsolverparameters.hh:46