ReturnCode lists the return codes of SciMLBase (ReturnCode$Success,
ReturnCode$MaxIters, ...); solutions carry them as strings in
sol$retcode, and successful_retcode() tells which ones mean success.
NullParameters() is the empty parameter object of problems without
parameters. ODESolution(t, u, prob, alg) builds a solution from saved
times and states (a matrix with one row per time, or a list of states),
interpolated linearly.
Usage
ReturnCode
NullParameters()
ODESolution(t, u, prob, alg = list(name = "ODESolution"), retcode = "Success")
AutoForwardDiff(chunksize = NULL, tag = NULL)
AutoFiniteDiff(fdtype = c("forward", "central", "complex"))
AutoSparse(ad, sparsity_detector = NULL, coloring_algorithm = NULL)
Sequential()
BaseThreads()
PolyesterThreads()Arguments
- t, u
Saved times and states.
- prob
The problem the solution belongs to.
- alg
The algorithm (any object with a
name).- retcode
The return code.
- chunksize, tag
Options of the Julia signature.
- fdtype
"forward","central"or"complex".- ad
An automatic differentiation choice.
- sparsity_detector, coloring_algorithm
Options of the Julia signature.
Details
The Jacobians of the implicit solvers come from the problem's symbolic
Jacobian (from a System, or jac_fn) or from differentiation.
AutoForwardDiff() uses the exact Jacobian when the problem has one,
else dual numbers as ForwardDiff does (central differences when the
function cannot run on them), AutoFiniteDiff(fdtype) finite
differences of the given type,
and AutoSparse(ad) the method of ad (Jacobians are dense in R).
Sequential(), BaseThreads() and PolyesterThreads() are the threading
options of the Runge-Kutta stages; R evaluates the stages in turn.
Examples
ReturnCode$Success
#> [1] "Success"
successful_retcode(ReturnCode$Terminated)
#> [1] TRUE
sol <- ODESolution(c(0, 1), rbind(0, 1), ODEProblem(function(u, p, t) 1, 0, c(0, 1)))
sol(0.5)
#> [1] 0.5