Diffrax v0.4.0
Features
- Highlight: added IMEX solvers! These solve the "easy" part of the diffeq using an explicit solver, and the "hard" part using an implicit solver. We now have:
diffrax.KenCarp3
diffrax.KenCarp4
diffrax.KenCarp5
diffrax.Sil3
Each of these should be called with e.g.diffeqsolve(terms=MultiTerm(explicit_term, implicit_term), solver=diffrax.KenCarp4(), ...)
diffrax.ImplicitEuler
now supports adaptive time stepping, by using an embedded Heun method. (#251)
Backward incompatibilities
scan_stages
, e.g.Tsit5(scan_stages=True)
, no longer exists. All Runge--Kutta solvers now scan-over-stages by default.- If you were using
scan_stages
, then you should simply delete this argument. - If you were using the interactive API together with forward-mode autodiff then you should pass
scan_kind="bounded"
to the solver, e.g.Tsit5(scan_kind="bounded")
.
- If you were using
Bugfixes
- Fixed
AbstractTerm.vf_prod
being ignored, so that naiveprod(vf(...), control)
calls were being used instead of optimised vf-prod routines, where available. (#239) - Implicit solvers now use the correct stage value predictors. This should help the implicit solvers converge faster, so that overall runtime is decreased. This should mean that they occasionally take a different number of steps than before -- usually fewer.
Performance
- Overall compilation should be faster. (Due to patrick-kidger/equinox#353)
- Initial step size selection should now compile faster. (#257)
- Fixed dense output consuming far too much memory. (#252)
- Backsolve adjoint should now be much more efficient (due to the
vf_prod
bugfix).
Full Changelog: v0.3.1...v0.4.0