braincell.quad module#
Numerical integrators for BrainCell.
Exposes get_integrator() plus every canonical solver name
registered in braincell.quad._registry.
Note
This __init__.py deliberately performs side-effect imports of
every _<backend>.py module. Each backend self-registers into the
integrator registry at import time via @register_integrator. Do
not lazily defer these imports — unresolved solver names would
surface as ValueError: unknown integrator from
get_integrator() at first call instead of at import time. The
lazy-import pattern in braincell.quad._diffrax refers only to
the third-party diffrax dependency, not to the backend module
itself.
braincell.quad provides a mechanism to define coupled ordinary differential equations (ODEs)
and solve them using various numerical integration methods.
The integration methods are categorized into exponential integrators, Runge-Kutta methods,
implicit methods, and Diffrax integrators.
Defining Coupled ODEs#
A |
|
Mixin marking a module as integrable by |
|
Mixin that opts a submodule out of its parent's integration loop. |
Overall Integration Interface#
|
Resolve a numerical integrator from a string name or a callable. |
Exponential Integrators#
|
Advance one step with the (coupled) exponential Euler method. |
|
Advance each |
Runge-Kutta Integrators#
|
Advance one step with the explicit (forward) Euler method. |
|
Advance one step with the explicit midpoint (modified Euler) method. |
|
Advance one step with a generic second-order Runge-Kutta method. |
|
Advance one step with Heun's second-order Runge-Kutta method. |
|
Advance one step with Ralston's second-order Runge-Kutta method. |
|
Advance one step with the classical third-order Runge-Kutta method. |
|
Advance one step with Heun's third-order Runge-Kutta method. |
|
Advance one step with the Strong-Stability-Preserving RK3 method. |
|
Advance one step with Ralston's third-order Runge-Kutta method. |
|
Advance one step with the classical fourth-order Runge-Kutta method. |
|
Advance one step with Ralston's fourth-order Runge-Kutta method. |
Diffrax Explicit Integrators#
|
Advance one step with diffrax's explicit Euler solver. |
|
Advance one step with diffrax's Heun (improved Euler) solver. |
|
Advance one step with diffrax's explicit midpoint solver. |
|
Advance one step with diffrax's Ralston second-order solver. |
|
Advance one step with diffrax's Bogacki-Shampine 3(2) solver. |
|
Advance one step with diffrax's Tsitouras 5(4) solver. |
|
Advance one step with diffrax's Dormand-Prince 5(4) solver. |
|
Advance one step with diffrax's Dormand-Prince 8(5,3) solver. |
Diffrax Implicit Integrators#
|
Advance one step with diffrax's implicit (backward) Euler solver. |
|
Advance one step with diffrax's Kvaerno 3 ESDIRK solver. |
|
Advance one step with diffrax's Kvaerno 4 ESDIRK solver. |
|
Advance one step with diffrax's Kvaerno 5 ESDIRK solver. |