25#ifndef DUMUX_LINEAR_SOLVER_PARAMETERS_HH
26#define DUMUX_LINEAR_SOLVER_PARAMETERS_HH
32#include <dune/common/parametertree.hh>
40template<
class LinearSolverTraits>
51 Dune::ParameterTree params;
60 params[
"restart"] =
"10";
61 params[
"maxit"] =
"250";
62 params[
"reduction"] =
"1e-13";
63 params[
"verbose"] =
"0";
64 params[
"preconditioner.iterations"] =
"1";
65 params[
"preconditioner.relaxation"] =
"1.0";
66 params[
"preconditioner.verbosity"] =
"0";
67 params[
"preconditioner.defaultAggregationSizeMode"] =
"isotropic";
68 params[
"preconditioner.defaultAggregationDimension"] = std::to_string(LinearSolverTraits::GridView::dimension);
69 params[
"preconditioner.maxLevel"] =
"100";
70 params[
"ParameterGroup"] = paramGroup;
71 params[
"preconditioner.ParameterGroup"] = paramGroup;
78 if (linearSolverGroups.empty())
83 for (
const auto& group : linearSolverGroups)
85 const auto fullDumuxKey = group +
"." + dumuxKey;
86 const auto value = getParam<std::string>(fullDumuxKey,
"");
89 params[istlKey] = value;
99template<
class LinearSolverTraits>
100const std::vector<std::array<std::string, 2>>
104 {
"Verbosity",
"verbose"},
105 {
"MaxIterations",
"maxit"},
106 {
"ResidualReduction",
"reduction"},
108 {
"GMResRestart",
"restart"},
109 {
"Restart",
"restart"},
110 {
"MaxOrthogonalizationVectors",
"mmax"},
113 {
"Preconditioner.Verbosity",
"preconditioner.verbosity"},
114 {
"Preconditioner.Type",
"preconditioner.type"},
115 {
"Preconditioner.Iterations",
"preconditioner.iterations"},
116 {
"Preconditioner.Relaxation",
"preconditioner.relaxation"},
117 {
"Preconditioner.ILUOrder",
"preconditioner.n"},
118 {
"Preconditioner.ILUResort",
"preconditioner.resort"},
119 {
"Preconditioner.AmgSmootherRelaxation",
"preconditioner.smootherRelaxation"},
120 {
"Preconditioner.AmgSmootherIterations",
"preconditioner.smootherIterations"},
121 {
"Preconditioner.AmgMaxLevel",
"preconditioner.maxLevel"},
122 {
"Preconditioner.AmgCoarsenTarget",
"preconditioner.coarsenTarget"},
123 {
"Preconditioner.AmgMinCoarseningRate",
"preconditioner.minCoarseningRate"},
124 {
"Preconditioner.AmgAccumulationMode",
"preconditioner.accumulationMode"},
125 {
"Preconditioner.AmgProlongationDampingFactor",
"preconditioner.prolongationDampingFactor"},
126 {
"Preconditioner.AmgAlpha",
"preconditioner.alpha"},
127 {
"Preconditioner.AmgBeta",
"preconditioner.beta"},
128 {
"Preconditioner.AmgAdditive",
"preconditioner.additive"},
129 {
"Preconditioner.AmgGamma",
"preconditioner.gamma"},
130 {
"Preconditioner.AmgPreSmoothingSteps",
"preconditioner.preSteps"},
131 {
"Preconditioner.AmgPostSmoothingSteps",
"preconditioner.postSteps"},
132 {
"Preconditioner.AmgCriterionSymmetric",
"preconditioner.criterionSymmetric"},
133 {
"Preconditioner.AmgStrengthMeasure",
"preconditioner.strengthMeasure"},
134 {
"Preconditioner.AmgDiagonalRowIndex",
"preconditioner.diagonalRowIndex"},
135 {
"Preconditioner.AmgDefaultAggregationSizeMode",
"preconditioner.defaultAggregationSizeMode"},
136 {
"Preconditioner.AmgDefaultAggregationDimension",
"preconditioner.defaultAggregationDimension"},
137 {
"Preconditioner.AmgMaxAggregateDistance",
"preconditioner.maxAggregateDistance"},
138 {
"Preconditioner.AmgMinAggregateSize",
"preconditioner.minAggregateSize"},
139 {
"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:185
Generates a parameter tree required for the linear solvers and precondioners of the Dune ISTL.
Definition: linearsolverparameters.hh:42
static const std::vector< std::array< std::string, 2 > > dumuxToIstlSolverParams
Translation table for solver parameters.
Definition: linearsolverparameters.hh:46
static void setDefaultParameters(Dune::ParameterTree ¶ms, const std::string ¶mGroup="")
Set some defaults for the solver parameters.
Definition: linearsolverparameters.hh:58
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:75
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:49