78 if (targetIterations_ == 0)
79 DUNE_THROW(Dune::InvalidStateException,
80 "TargetIterations should not be equal to 0. Try calling "
81 "setTargetIterations(int) first.");
82 const auto previousIterations = solverInfo.
iterations;
83 if (previousIterations > targetIterations_)
85 sqrt(
static_cast<double>(targetIterations_) / previousIterations) * subsidiaryArgs.
stepSize;
100 DUNE_THROW(Dune::InvalidStateException,
"TargetIterations should not be equal to 0.");
105 int targetIterations_{0};
Implementation of the solver information returned by the nonlinear solvers.
Defines structures and methods related to subsidiary functions for control routines.
Definition: adaptivestepsizing.hh:17
The NoOp strategy for adaptive step sizing.
Definition: adaptivestepsizing.hh:25
void operator()(const NonLinearSolverInformation &solverInfo, SubsidiaryArgs &subsidiaryArgs, const F &f)
Call operator for the NoOp strategy.
Definition: adaptivestepsizing.hh:37
void setTargetIterations(int targetIterations)
Set the target iterations.
Definition: adaptivestepsizing.hh:49
int targetIterations() const
Get the target iterations.
Definition: adaptivestepsizing.hh:43
The IterationBased strategy for adaptive step sizing.
Definition: adaptivestepsizing.hh:63
void setTargetIterations(int targetIterations)
Set the target iterations.
Definition: adaptivestepsizing.hh:98
void operator()(const NonLinearSolverInformation &solverInfo, SubsidiaryArgs &subsidiaryArgs, const F &f)
Call operator of the IterationBased strategy.
Definition: adaptivestepsizing.hh:75
int targetIterations() const
Get the target iterations.
Definition: adaptivestepsizing.hh:92
Structure containing arguments for subsidiary functions.
Definition: pathfollowingfunctions.hh:39
int currentStep
The current step index in the control routine.
Definition: pathfollowingfunctions.hh:46
double stepSize
The step size in the control routine.
Definition: pathfollowingfunctions.hh:40
Information about the result of a non-linear solver.
Definition: solverinfos.hh:21
int iterations
Definition: solverinfos.hh:31