Skip to contents

Multistep methods of OrdinaryDiffEq.jl (OrdinaryDiffEqNordsieck) that store the solution history as a Nordsieck vector (the scaled derivatives of the interpolating polynomial) and solve the corrector by functional iteration, so they suit nonstiff problems. The Julia documentation marks them as experimental and recommends VCABM() (Adams) and FBDF() (BDF).

Usage

AN5()

JVODE(
  algorithm = "Adams",
  bias1 = 6,
  bias2 = 6,
  bias3 = 10,
  addon = 1e-06,
  qmin = 0.2,
  qmax = 10,
  qsteady_min = 1,
  qsteady_max = 1.5
)

JVODE_Adams(...)

JVODE_BDF(...)

Arguments

algorithm

"Adams" or "BDF".

bias1, bias2, bias3

Safety factors of CVODE for the error estimates at orders q - 1, q and q + 1.

addon

Constant added to the step size ratio denominators.

qmin, qmax

Smallest and largest step size ratio.

qsteady_min, qsteady_max

The step size is kept when the ratio of the old to the new step lies in this interval (a ratio of new to old below qsteady_max keeps it too).

...

Arguments of JVODE().

Value

An ODE algorithm.

Details

  • AN5(): the adaptive fixed order 5 Adams method. The first step (and the first step after a callback that changes u) is a Tsit5 step that builds the Nordsieck vector; the PI controller sets the step size.

  • JVODE(): the variable step, variable order method of CVODE (Brown, Byrne and Hindmarsh), Adams of orders 1 to 12 or BDF of orders 1 to 5, which chooses the order and step size from the error estimates at orders q - 1, q and q + 1. JVODE_Adams() and JVODE_BDF() are JVODE("Adams") and JVODE("BDF"). An Adams order change is applied only together with a step size change, as in the Julia version; with a fixed dt the Adams method therefore stays at order 1.

The dense output is the cubic Hermite interpolant of each step.

Examples

prob <- ODEProblem(function(u, p, t) c(u[2], -u[1]), c(0, 1), c(0, 1))
sol <- solve(prob, JVODE_Adams(), reltol = 1e-8, abstol = 1e-8)
sol(1)
#> [1] 0.8414711 0.5403023
solve(prob, AN5(), reltol = 1e-6, abstol = 1e-8)$stats$nf
#> [1] 20