Class to perform a residual check based on the last "n" iterations.
A typical usage is in dynamic simulations where equilibrium is checked based on a force residual. Fluctuations could however be responsible for this criterion to be triggered too early. By checking several time-steps such case can be avoided.
Definition at line 27 of file Iterate.h.
void GooseFEM::Iterate::StopList::roll_insert |
( |
double | res | ) |
|
|
inline |
Roll the list with the residuals, and add a new residual to the end.
In Python code this function corresponds to::
residuals = residuals[1:] + [new_residual]
I.e. the residual of n
iterations ago will be forgotten.
- Parameters
-
res | New residual to add to the list of residuals. |
Definition at line 69 of file Iterate.h.