Steady State Callbacks
These callbacks are designed to automatically terminate integration when a steady state is reached.
DiffEqCallbacks.TerminateSteadyState
— FunctionTerminateSteadyState(abstol = 1e-8, reltol = 1e-6, test = allDerivPass; min_t = nothing,
wrap_test::Val = Val(true))
TerminateSteadyState
can be used to solve the problem for the steady-state by running the solver until the derivatives of the problem converge to 0 or tspan[2]
is reached. This is an alternative approach to root finding (see the Steady State Solvers section).
Arguments
abstol
andreltol
are the absolute and relative tolerance, respectively. These tolerances may be specified as scalars or as arrays of the same length as the states of the problem.test
represents the function that evaluates the condition for termination. The default condition is that all derivatives should become smaller thanabstol
or the states timesreltol
. The user can pass any other function to implement a different termination condition. Such function should take four arguments:integrator
,abstol
,reltol
, andmin_t
.wrap_test
can be set toVal(false)
, in which casetest
must have the definitiontest(u, t, integrator)
. Otherwise,test
must have the definitiontest(integrator, abstol, reltol, min_t)
.
Keyword Arguments
min_t
specifies an optional minimumt
before the steady state calculations are allowed to terminate.