Skip to content
Snippets Groups Projects
Commit de551e78 authored by Jö Fahlke's avatar Jö Fahlke
Browse files

Check the number of iterations needed by newton

Closes: #11
parent 0b6fbfd9
No related branches found
No related tags found
1 merge request!15Check the number of iterations needed by newton
Checking pipeline status
...@@ -31,7 +31,7 @@ dune_add_test( ...@@ -31,7 +31,7 @@ dune_add_test(
COMMAND sh COMMAND sh
CMD_ARGS -exc [[ CMD_ARGS -exc [[
./solution01 -output.filename solution-matrix-free \ ./solution01 -output.filename solution-matrix-free \
-solver.preconditioner.type none -operator.type matrix-free -solver.preconditioner.type none -newton.Operator.type matrix-free
cmp solution-matrix-free.vtu ref.vtu cmp solution-matrix-free.vtu ref.vtu
]]) ]])
...@@ -64,7 +64,7 @@ dune_add_test( ...@@ -64,7 +64,7 @@ dune_add_test(
COMMAND sh COMMAND sh
CMD_ARGS -exc [[ CMD_ARGS -exc [[
./nitschesolution01 -output.filename nitschesolution-matrix-free \ ./nitschesolution01 -output.filename nitschesolution-matrix-free \
-solver.preconditioner.type none -operator.type matrix-free -solver.preconditioner.type none -newton.Operator.type matrix-free
cmp nitschesolution-matrix-free.vtu nitscheref.vtu cmp nitschesolution-matrix-free.vtu nitscheref.vtu
]]) ]])
......
...@@ -100,7 +100,7 @@ namespace PPS { ...@@ -100,7 +100,7 @@ namespace PPS {
newton.setMinLinearReduction(1e-4); // min. red. in lin. solve newton.setMinLinearReduction(1e-4); // min. red. in lin. solve
newton.setMaxIterations(25); // limit number of its newton.setMaxIterations(25); // limit number of its
newton.setLineSearchMaxIterations(10); // limit line search newton.setLineSearchMaxIterations(10); // limit line search
newton.setOperatorParams(ptree.sub("operator")); // select operator type newton.setParameters(ptree.sub("newton"));
// solve nonlinear problem // solve nonlinear problem
newton.apply(); newton.apply();
......
...@@ -764,7 +764,7 @@ namespace PPS ...@@ -764,7 +764,7 @@ namespace PPS
*/ */
void setParameters(const Dune::ParameterTree & param) void setParameters(const Dune::ParameterTree & param)
{ {
typedef typename TstV::ElementType RFType; typedef typename TstV::field_type RFType;
if (param.hasKey("VerbosityLevel")) if (param.hasKey("VerbosityLevel"))
this->setVerbosityLevel( this->setVerbosityLevel(
param.get<unsigned int>("VerbosityLevel")); param.get<unsigned int>("VerbosityLevel"));
......
...@@ -15,7 +15,12 @@ stab = 100 ...@@ -15,7 +15,12 @@ stab = 100
[problem] [problem]
eta=100.0 eta=100.0
[operator] [newton]
# The 3 is an empirical value, it is expected that the needed number of
# iterations may vary to some degree
MaxIterations = 3
[newton.Operator]
type = matrix-free type = matrix-free
[solver] [solver]
......
...@@ -15,6 +15,11 @@ stab = 100 ...@@ -15,6 +15,11 @@ stab = 100
[problem] [problem]
eta=100.0 eta=100.0
[newton]
# The 3 is an empirical value, it is expected that the needed number of
# iterations may vary to some degree
MaxIterations = 3
[solver] [solver]
#preconditioner.type = none #preconditioner.type = none
maxiter = 100 maxiter = 100
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment