Skip to main content

rk45_adaptive

Function rk45_adaptive 

Source
pub fn rk45_adaptive<F>(
    f: F,
    t0: &ExactNum,
    y0: &ExactNum,
    t1: &ExactNum,
    atol: &ExactNum,
    rtol: &ExactNum,
    p: usize,
    rm: RoundingMode,
    cc: &mut Consts,
) -> Option<(ExactNumArray, ExactNumArray)>
Expand description

Dormand–Prince RK5(4) with absolute / relative step control.

Accepts a step when |y₅−y₄| ≤ atol + rtol max(|y|,|y₅|). Step size is updated by (atol_scale / err)^{1/5} with safety 9/10, growth cap 5, shrink cap 1/5. None if t1 ≤ t0, a value is non-finite, the step falls below ode_min_step, or ODE_MAX_STEPS accepted steps are exhausted before t1.