braincell.quad.diffrax_euler_step#
- braincell.quad.diffrax_euler_step(target, *args)[source]#
Advance one step with diffrax’s explicit Euler solver.
Wraps diffrax.Euler so it can be driven from the same
brainstate.environcontext as the native braincell integrators. The first call triggers a one-time import ofdiffrax(see__getattr__()); subsequent calls take the fast path.- Parameters:
target (
DiffEqModule) – Module whose differential states will be advanced.*args – Extra positional arguments forwarded to
target’scompute_derivativeandpre/post_integralhooks.
- Returns:
target’s state is updated in place.- Return type:
None
- Raises:
ModuleNotFoundError – If
diffraxis not installed.
See also
euler_stepNative (no-diffrax) explicit Euler implementation.
diffrax_heun_step,diffrax_midpoint_step,diffrax_ralston_stepNotes
The current time and step size are read from the active
brainstate.environcontext. The braincell state vector is stacked along the last axis before being handed to diffrax.