Commit 732d3e89 authored by Timo Koch's avatar Timo Koch
Browse files

[params] Remove global defaults for linear solver

As already noted in 76563518 the global
defaults have been replaced by local defaults. The change already
appears in the changelog. In case someone relied on the global defaults
in their own code they will get a parameter error at runtime which is
easy to fix.
parent f9671e2f
...@@ -301,14 +301,6 @@ private: ...@@ -301,14 +301,6 @@ private:
// parameters in the assembly group // parameters in the assembly group
defaultParams["Assembly.NumericDifferenceMethod"] = "1"; defaultParams["Assembly.NumericDifferenceMethod"] = "1";
// parameters in the linear solver group
defaultParams["LinearSolver.GMResRestart"] = "10";
defaultParams["LinearSolver.MaxIterations"] = "250";
defaultParams["LinearSolver.PreconditionerIterations"] = "1";
defaultParams["LinearSolver.PreconditionerRelaxation"] = "1.0";
defaultParams["LinearSolver.ResidualReduction"] = "1e-13";
defaultParams["LinearSolver.Verbosity"] = "0";
// parameters in the problem group // parameters in the problem group
defaultParams["Problem.EnableGravity"] = "true"; defaultParams["Problem.EnableGravity"] = "true";
defaultParams["Problem.EnableInertiaTerms"] = "true"; defaultParams["Problem.EnableInertiaTerms"] = "true";
......
...@@ -88,7 +88,7 @@ public: ...@@ -88,7 +88,7 @@ public:
const std::string& modelParamGroup = "") const std::string& modelParamGroup = "")
{ {
// get the restart threshold // get the restart threshold
const int restartGMRes = getParamFromGroup<double>(modelParamGroup, "LinearSolver.GMResRestart"); const int restartGMRes = getParamFromGroup<int>(modelParamGroup, "LinearSolver.GMResRestart", 10);
Preconditioner precond(A, s.precondIter(), s.relaxation()); Preconditioner precond(A, s.precondIter(), s.relaxation());
...@@ -131,7 +131,7 @@ public: ...@@ -131,7 +131,7 @@ public:
const std::string& modelParamGroup = "") const std::string& modelParamGroup = "")
{ {
// get the restart threshold // get the restart threshold
const int restartGMRes = getParamFromGroup<int>(modelParamGroup, "LinearSolver.GMResRestart"); const int restartGMRes = getParamFromGroup<int>(modelParamGroup, "LinearSolver.GMResRestart", 10);
Preconditioner precond(A, s.relaxation()); Preconditioner precond(A, s.relaxation());
......
...@@ -490,7 +490,7 @@ void MimeticPressure2P<TypeTag>::solve() ...@@ -490,7 +490,7 @@ void MimeticPressure2P<TypeTag>::solve()
{ {
using Solver = GetPropType<TypeTag, Properties::LinearSolver>; using Solver = GetPropType<TypeTag, Properties::LinearSolver>;
auto verboseLevelSolver = getParam<int>("LinearSolver.Verbosity"); auto verboseLevelSolver = getParam<int>("LinearSolver.Verbosity", 0);
if (verboseLevelSolver) if (verboseLevelSolver)
std::cout << "MimeticPressure2P: solve for pressure" << std::endl; std::cout << "MimeticPressure2P: solve for pressure" << std::endl;
......
...@@ -504,7 +504,7 @@ void MimeticPressure2PAdaptive<TypeTag>::solve() ...@@ -504,7 +504,7 @@ void MimeticPressure2PAdaptive<TypeTag>::solve()
{ {
using Solver = GetPropType<TypeTag, Properties::LinearSolver>; using Solver = GetPropType<TypeTag, Properties::LinearSolver>;
int verboseLevelSolver = getParam<int>("LinearSolver.Verbosity"); int verboseLevelSolver = getParam<int>("LinearSolver.Verbosity", 0);
if (verboseLevelSolver) if (verboseLevelSolver)
std::cout << "MimeticPressure2PAdaptive: solve for pressure" << std::endl; std::cout << "MimeticPressure2PAdaptive: solve for pressure" << std::endl;
......
...@@ -527,7 +527,7 @@ void FVPressure<TypeTag>::solve() ...@@ -527,7 +527,7 @@ void FVPressure<TypeTag>::solve()
{ {
using Solver = GetPropType<TypeTag, Properties::LinearSolver>; using Solver = GetPropType<TypeTag, Properties::LinearSolver>;
int verboseLevelSolver = getParam<int>("LinearSolver.Verbosity"); int verboseLevelSolver = getParam<int>("LinearSolver.Verbosity", 0);
if (verboseLevelSolver) if (verboseLevelSolver)
std::cout << __FILE__ << ": solve for pressure" << std::endl; std::cout << __FILE__ << ": solve for pressure" << std::endl;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment