API overview¶
There are two public pieces: ODEProblem, which
holds the equations and the diffsol solver built from them, and
solve, which integrates one. Errors are raised as
[DiffsolJaxError][diffsol_jax.DiffsolJaxError].
The equations (rhs, out, mass) all act on one lane: y is in the state
structure, p in the parameter structure, and t is a scalar. Any traceable
JAX code is allowed.
What belongs where¶
Constructing an ODEProblem builds the diffsol solver, which lives as long as
the problem, so build a problem once and reuse it. The options the solver is
built with -- solver, linear_solver, matrix_type, max_checkpoints --
are arguments of ODEProblem, and changing one means another problem:
problem.replace(solver="tsit45"). The options that vary per solve -- rtol,
atol, max_steps, ad -- are arguments of solve.
Solvers¶
solver= |
Method | Mass matrices / DAEs |
|---|---|---|
"bdf" (default) |
BDF (implicit, variable-order) | yes |
"esdirk34" |
ESDIRK3(4) (implicit) | yes |
"tr_bdf2" |
TR-BDF2 (implicit) | yes |
"tsit45" |
Tsitouras 5(4) (explicit) | no |
These are diffsol's solvers; see the diffsol book for how they work.