Skip to contents

Traits of ODE and SDE algorithms: alg_order(alg) (the strong order for SDE methods), get_current_alg_order(alg), isadaptive(alg), alg_stability_size(alg), alg_compatible(prob, alg) (whether the method takes the problem's noise), alg_mass_matrix_compatible(alg), alg_needs_extra_process(alg) (methods that use a second Brownian increment), alg_can_repeat_jac(alg), alg_control_rate(alg), delta_default(alg) (the weight of the drift error estimate), is_split_step(alg), isdiscrete(alg), supports_regular_jumps(alg), supports_solve_rng(prob, alg), adaptive_alg(alg) and unwrap_alg(x) (the method of an integrator, or the current one of a composite method). Of functions and problems: isinplace(f) (always FALSE: R functions return their values), issplit(prob).

Usage

alg_order(alg)

get_current_alg_order(alg, ...)

isadaptive(alg)

alg_stability_size(alg)

alg_compatible(prob, alg)

alg_mass_matrix_compatible(alg)

alg_needs_extra_process(alg)

alg_can_repeat_jac(alg)

alg_control_rate(alg)

delta_default(alg)

is_split_step(alg)

isdiscrete(alg)

supports_regular_jumps(alg)

supports_solve_rng(prob, alg)

adaptive_alg(alg)

unwrap_alg(x, ...)

isinplace(f, ...)

issplit(prob)

get_dt(integ)

get_tmp_cache(integ)

u_cache(integ)

du_cache(integ)

full_cache(integ)

user_cache(integ)

rand_cache(integ)

ratenoise_cache(integ)

has_tstop(integ)

first_tstop(integ)

pop_tstop(integ)

get_rng(integ)

set_rng(integ, seed)

has_rng(integ)

auto_dt_reset(integ)

change_t_via_interpolation(integ, t)

reeval_internals_due_to_modification(integ, ...)

check_keywords(integ, kwargs, warnlist)

addat(integ, idxs, value = 0)

deleteat(integ, idxs)

resize_non_user_cache(integ, ...)

addat_non_user_cache(integ, ...)

deleteat_non_user_cache(integ, ...)

Arguments

alg

An algorithm.

...

Unused.

prob

A problem.

x

An integrator or algorithm.

f

A function.

integ

An integrator.

seed

A seed.

t

A time inside the last step.

kwargs, warnlist

Keyword names and the accepted ones.

idxs, value

Indices and the value of new components.

Value

A trait value, a vector, or the integrator invisibly.

Details

Integrator utilities: get_dt(integ), get_tmp_cache(integ), u_cache(), du_cache(), full_cache(), user_cache(), rand_cache() and ratenoise_cache() (the vectors of the integrator's state that a callback may use as scratch space), has_tstop(integ), first_tstop(integ), pop_tstop(integ) (pop_tstop!), get_rng(integ), set_rng(integ, seed) (set_rng!), has_rng(integ), auto_dt_reset(integ) (a fresh initial step size estimate), change_t_via_interpolation(integ, t) (move back inside the last step), reeval_internals_due_to_modification(integ), check_keywords(integ, kwargs, warnlist), addat(integ, idxs, value) and deleteat(integ, idxs) (grow or shrink the state; the right-hand side must follow the new size), and the cache resizing hooks resize_non_user_cache(), addat_non_user_cache(), deleteat_non_user_cache().

Examples

alg_order(SRIW1())
#> [1] 1.5
isadaptive(EM())
#> [1] FALSE
alg_compatible(SDEProblem(function(u, p, t) u, function(u, p, t) u, 1, c(0, 1)), SOSRA())
#> [1] TRUE