diffrax icon indicating copy to clipboard operation
diffrax copied to clipboard

Add exponential Euler.

Open GJBoth opened this issue 1 year ago • 0 comments

This is a (very...) rough PR to see if there's interest in adding support for exponential integrators. Here's a good source with some background. Their main use is for stiff, oscillatory problems where neither IMEX nor stiff methods work well, such as brain dynamics or biochemical reaction networks.

I added the so-called exponential Euler method, which uses forward Euler to evaluate the integral, and which according to this paper also works for the stochastic version (additive, commutative noise).

In short, this solver

  • handles both the ODE and SDE version.
  • Has a term structure that is compatible with other solvers.
  • Has a specialised version for when the linear operator is diagonal.

The solver is quite straightforward, but the approach requires splitting the equation into terms, a linear and non-linear one. Since the ODETerm does not seem to support lineax terms in its vector field (not sure why?), I added a simple LinearODETerm which does allow this. Finally, I added the make_operators function which specialises to when the operator is diagonal.

If you like it I can clean this up and merge it.

GJBoth avatar Jan 13 '25 21:01 GJBoth