34 template <
typename NonLinearOperator>
71 template <
typename NonLinearOperator>
75 if (targetIterations_ == 0)
76 DUNE_THROW(Dune::InvalidStateException,
77 "For IterationBased, targetIterations should not be equal to 0. Try calling "
78 "setTargetIterations(int) first.");
79 const auto previousIterations = solverInfo.
iterations;
80 if (previousIterations > targetIterations_)
82 = sqrt(
static_cast<double>(targetIterations_) / previousIterations) * subsidiaryArgs.
stepSize;
98 int targetIterations_{0};
Implementation of the Newton-Raphson method for solving nonlinear equations.
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:24
void setTargetIterations(int targetIterations)
Set the target iterations.
Definition: adaptivestepsizing.hh:48
void operator()(const NonLinearSolverInformation &solverInfo, SubsidiaryArgs &subsidiaryArgs, const NonLinearOperator &nonLinearOperator)
Call operator for the NoOp strategy.
Definition: adaptivestepsizing.hh:35
int targetIterations() const
Get the target iterations.
Definition: adaptivestepsizing.hh:42
The IterationBased strategy for adaptive step sizing.
Definition: adaptivestepsizing.hh:61
void setTargetIterations(int targetIterations)
Set the target iterations.
Definition: adaptivestepsizing.hh:95
int targetIterations() const
Get the target iterations.
Definition: adaptivestepsizing.hh:89
void operator()(const NonLinearSolverInformation &solverInfo, SubsidiaryArgs &subsidiaryArgs, const NonLinearOperator &)
Call operator of the IterationBased strategy.
Definition: adaptivestepsizing.hh:72
Structure containing arguments for subsidiary functions.
Definition: pathfollowingfunctions.hh:38
int currentStep
The current step index in the control routine.
Definition: pathfollowingfunctions.hh:45
double stepSize
The step size in the control routine.
Definition: pathfollowingfunctions.hh:39
Information about the result of a non-linear solver.
Definition: solverinfos.hh:18
int iterations
Definition: solverinfos.hh:28
Represents a NonLinearOperator class for handling nonlinear operators.
Definition: nonlinearoperator.hh:154