version 0.4.1
Ikarus::AdaptiveStepSizing::IterationBased Struct Reference

The IterationBased strategy for adaptive step sizing. More...

#include <ikarus/controlroutines/adaptivestepsizing.hh>

Public Member Functions

template<typename NLO >
void operator() (const NonLinearSolverInformation &solverInfo, SubsidiaryArgs &subsidiaryArgs, const NLO &nonLinearOperator)
 Call operator of the IterationBased strategy. More...
 
int targetIterations () const
 Get the target iterations. More...
 
void setTargetIterations (int targetIterations)
 Set the target iterations. More...
 

Detailed Description

This strategy adjusts the step size based on the ratio of target iterations to previous iterations.

The step size is changed according to the number of iterations of the previous step

\[ \hat{s}_{k+1} = \sqrt{\frac{\hat{i}}{i_k}}\hat{s}_k, \]

where \(\hat{s}_{k+1} \) is the new stesize and \(\hat{i}\) is the desired number of iterations and \(i_k\) is the number of iterations of the previous step.

Member Function Documentation

◆ operator()()

template<typename NLO >
void Ikarus::AdaptiveStepSizing::IterationBased::operator() ( const NonLinearSolverInformation solverInfo,
SubsidiaryArgs subsidiaryArgs,
const NLO &  nonLinearOperator 
)
inline

Adjusts the step size based on the ratio of target iterations to previous iterations.

Parameters
solverInfoInformation about the nonlinear solver.
subsidiaryArgsSubsidiary arguments for adaptive step sizing.
nonLinearOperatorThe nonlinear operator.
Template Parameters
NLOThe nonlinear operator.

◆ setTargetIterations()

void Ikarus::AdaptiveStepSizing::IterationBased::setTargetIterations ( int  targetIterations)
inline
Parameters
targetIterationsThe number of target iterations.

◆ targetIterations()

int Ikarus::AdaptiveStepSizing::IterationBased::targetIterations ( ) const
inline
Returns
The number of target iterations.
Here is the caller graph for this function:

The documentation for this struct was generated from the following file: