DelayDiffEq.Discontinuity
— TypeDiscontinuity(t, order)
Object of discontinuity of order order
at time t
, i.e. discontinuity of order
th derivative at time t
.
DelayDiffEq.HistoryFunction
— TypeHistoryFunction(h, integrator)
Wrap history function h
and integrator integrator
to create a common interface for retrieving values at any time point with varying accuracy.
Before the initial time point of the integrator
values are calculated by history function h
, for time points up to the final time point of the solution interpolated values of the solution are returned, and after the final time point an inter- or extrapolation of the current state of the integrator
is retrieved.
DelayDiffEq.MethodOfSteps
— MethodMethodOfSteps(alg; constrained = false, fpsolve = NLFunctional())
Construct an algorithm that solves delay differential equations by the method of steps, where alg
is an ODE algorithm from OrdinaryDiffEq.jl upon which the calculation of steps is based.
If the algorithm is constrained
only steps of size at most the minimal delay will be taken. If it is unconstrained, fixed-point iteration fpsolve
is applied for step sizes that exceed the minimal delay.
Citations:
General Approach
ZivariPiran, Hossein, and Wayne H. Enright. "An efficient unified approach for the numerical solution of delay differential equations." Numerical Algorithms 53.2-3 (2010): 397-417.
State-Dependent Delays
S. P. Corwin, D. Sarafyan and S. Thompson in "DKLAG6: a code based on continuously imbedded sixth-order Runge-Kutta methods for the solution of state-dependent functional differential equations", Applied Numerical Mathematics, 1997.
Base.sizehint!
— Methodsizehint!(sol::DESolution, n)
Suggest that solution sol
reserves capacity for at least n
elements.
Base.sizehint!
— Methodsizehint!(sol::DESolution, alg, tspan, tstops, saveat; kwargs...)
Suggest that solution sol
reserves capacity for a number of elements that depends on the parameter settings of the numerical solver.
DelayDiffEq.add_next_discontinuities!
— Functionadd_next_discontinuities!(integrator::DDEIntegrator, order[, t=integrator.t])
Add discontinuities of next order that are propagated from discontinuity of order order
at time t
in integrator
, but only if order
is less or equal than the order of the applied method or the problem is neutral.
Discontinuities caused by constant delays are immediately calculated, and discontinuities caused by dependent delays are tracked by a callback.
DelayDiffEq.advance_ode_integrator!
— Functionadvance_ode_integrator!(integrator::DDEIntegrator[, always_calc_begin = false])
Advance the ODE integrator of integrator
to the next time interval by updating its values and interpolation data with the current values and a full set of interpolation data of integrator
.
DelayDiffEq.advance_or_update_ode_integrator!
— Functionadvance_or_update_ode_integrator!(integrator::DDEIntegrator[, always_calc_begin = false])
Advance or update the ODE integrator of integrator
to the next time interval by updating its values and interpolation data with the current values and a full set of interpolation data of integrator
.
DelayDiffEq.callback_set_and_cache
— Methodcallback_set_and_cache(prob, callback)
Return set of callbacks and its cache for the differential equation problem prob
and the user-provided callback
.
DelayDiffEq.constant_extrapolant!
— Methodconstant_extrapolant!(val, t, integrator::DEIntegrator, idxs, deriv)
Calculate constant extrapolation of derivative deriv
at time t
and indices idxs
for integrator
, and save result in val
if val
is not nothing
.
DelayDiffEq.constant_extrapolant
— Methodconstant_extrapolant(t, integrator::DEIntegrator, idxs, deriv)
Calculate constant extrapolation of derivative deriv
at time t
and indices idxs
for integrator
.
DelayDiffEq.discontinuity_function
— Methoddiscontinuity_function(integrator::DDEIntegrator, lag, T, t)
Evaluate function $f(x) = T + lag(u(x), p, x) - x$ at time point t
, where T
is time point of a previous discontinuity and lag
is a dependent delay.
DelayDiffEq.discontinuity_interval
— Methoddiscontinuity_interval(integrator::DDEIntegrator, lag, T, Θs)
Return an estimated subinterval of the current integration step of the integrator
that contains a propagated discontinuity induced by the dependent delay lag
and the discontinuity at time point T
, or nothing
.
The interval is estimated by checking the signs of T + lag(u(t), p, t) - t
for time points integrator.t .+ θs
in the interval [integrator.t, integrator.t + integrator.dt]
.
DelayDiffEq.discontinuity_time
— Methoddiscontinuity_time(integrator::DDEIntegrator, lag, T, interval)
Estimate time point of the propagated discontinuity induced by the dependent delay lag
and the discontinuity at time point T
inside the interval
of the current integration step of the integrator
.
DelayDiffEq.get_abstol
— Methodget_abstol(u, tspan, alg; abstol = nothing)
Return the absolute tolerance for solving the differential equation problem with state variable u
and time span tspan
with algorithm alg
.
DelayDiffEq.get_reltol
— Methodget_reltol(u, tspan, alg; reltol = nothing)
Return the relative tolerance for solving the differential equation problem with state variable u
and time span tspan
with algorithm alg
.
DelayDiffEq.has_constant_lags
— Methodhas_constant_lags(prob::DDEProblem)
Return if the DDE problem prob
contains constant delays.
DelayDiffEq.has_constant_lags
— Methodhas_constant_lags(integrator::DDEIntegrator)
Return if the DDE problem of the integrator
contains constant delays.
DelayDiffEq.has_dependent_lags
— Methodhas_dependent_lags(prob::DDEProblem)
Return if the DDE problem prob
contains dependent delays.
DelayDiffEq.has_dependent_lags
— Methodhas_dependent_lags(integrator::DDEIntegrator)
Return if the DDE problem of the integrator
contains dependent delays.
DelayDiffEq.initialize_solution!
— Methodinitialize_solution!(integrator::DDEIntegrator)
Initialize the solution of an integrator by adjusting the cache for composite algorithms.
DelayDiffEq.iscomposite
— Methodiscomposite(alg)
Return if algorithm alg
is a composite algorithm.
DelayDiffEq.move_back_ode_integrator!
— Methodmove_back_ode_integrator!(integrator::DDEIntegrator)
Move the ODE integrator of integrator
one integration step back by reverting its values and interpolation data to the values saved in the dense history.
DelayDiffEq.rate_prototype_of
— Methodrate_prototype_of(u0, tspan)
Return prototype of rates for a given differential equation problem with state u
and time span tspan
.
DelayDiffEq.solution_arrays
— Methodsolution_arrays(u, tspan, rate_prototype; kwargs...)
Return arrays of saved time points, states, and rates, initialized with the solution at the first time point if save_start = true
(the default).
DelayDiffEq.track_propagated_discontinuities!
— Methodtrack_propagated_discontinuities!(integrator::DDEIntegrator)
Try to find a propagated discontinuity in the time interval [integrator.t, integrator.t + integrator.dt]
and add it to the set of discontinuities and grid points of the integrator
.
DelayDiffEq.u_uprev
— Methodu_uprev(u0, alg; kwargs...)
Return state vectors u
and uprev
(possibly aliased) for solving the differential equation problem for initial state u0
with algorithm alg
.
DelayDiffEq.u_uprev_uprev2
— Methodu_uprev_uprev2(u0, alg; kwargs...)
Return state vectors u
, uprev
, and uprev2
(possibly aliased) for solving the differential equation problem for initial state u0
with algorithm alg
.
DelayDiffEq.update_ode_integrator!
— Functionupdate_ode_integrator!(integrator::DDEIntegrator[, always_calc_begin = false])
Update the ODE integrator of integrator
by updating its values and interpolation data with the current values and a full set of interpolation data of integrator
.
SciMLBase.reinit!
— Functionreinit!(integrator::DDEIntegrator[, u0 = integrator.sol.prob.u0;
t0 = integrator.sol.prob.tspan[1],
tf = integrator.sol.prob.tspan[2],
erase_sol = true,
kwargs...])
Reinitialize integrator
with (optionally) different initial state u0
, different integration interval from t0
to tf
, and erased solution if erase_sol = true
.