brainpy.integrators module#

ODE integrators#

Base ODE Integrator#

ODEIntegrator(f[, var_type, dt, name, ...])

Numerical Integrator for Ordinary Differential Equations (ODEs).

Generic ODE Functions#

set_default_odeint(method)

Set the default ODE numerical integrator method for differential equations.

get_default_odeint()

Get the default ODE numerical integrator method.

register_ode_integrator(name, integrator)

Register a new ODE integrator.

get_supported_methods()

Get all supported numerical methods for DDEs.

Explicit Runge-Kutta ODE Integrators#

ExplicitRKIntegrator(f[, var_type, dt, ...])

Explicit Runge–Kutta methods for ordinary differential equation.

Euler(f[, var_type, dt, name, show_code, ...])

The Euler method for ODEs.

MidPoint(f[, var_type, dt, name, show_code, ...])

Explicit midpoint method for ODEs.

Heun2(f[, var_type, dt, name, show_code, ...])

Heun's method for ODEs.

Ralston2(f[, var_type, dt, name, show_code, ...])

Ralston's method for ODEs.

RK2(f[, beta, var_type, dt, name, ...])

Generic second order Runge-Kutta method for ODEs.

RK3(f[, var_type, dt, name, show_code, ...])

Classical third-order Runge-Kutta method for ODEs.

Heun3(f[, var_type, dt, name, show_code, ...])

Heun's third-order method for ODEs.

Ralston3(f[, var_type, dt, name, show_code, ...])

Ralston's third-order method for ODEs.

SSPRK3(f[, var_type, dt, name, show_code, ...])

Third-order Strong Stability Preserving Runge-Kutta (SSPRK3).

RK4(f[, var_type, dt, name, show_code, ...])

Classical fourth-order Runge-Kutta method for ODEs.

Ralston4(f[, var_type, dt, name, show_code, ...])

Ralston's fourth-order method for ODEs.

RK4Rule38(f[, var_type, dt, name, ...])

3/8-rule fourth-order method for ODEs.

Adaptive Runge-Kutta ODE Integrators#

AdaptiveRKIntegrator(f[, var_type, dt, ...])

Adaptive Runge-Kutta method for ordinary differential equations.

RKF12(f[, var_type, dt, name, adaptive, ...])

The Fehlberg RK1(2) method for ODEs.

RKF45(f[, var_type, dt, name, adaptive, ...])

The Runge–Kutta–Fehlberg method for ODEs.

DormandPrince(f[, var_type, dt, name, ...])

The Dormand–Prince method for ODEs.

CashKarp(f[, var_type, dt, name, adaptive, ...])

The Cash–Karp method for ODEs.

BogackiShampine(f[, var_type, dt, name, ...])

The Bogacki–Shampine method for ODEs.

HeunEuler(f[, var_type, dt, name, adaptive, ...])

The Heun–Euler method for ODEs.

Exponential ODE Integrators#

ExponentialEuler(f[, var_type, dt, name, ...])

Exponential Euler method using automatic differentiation.

SDE integrators#

Base SDE Integrator#

SDEIntegrator(f, g[, dt, name, show_code, ...])

SDE Integrator.

Generic SDE Functions#

set_default_sdeint(method)

Set the default SDE numerical integrator method for differential equations.

get_default_sdeint()

Get the default SDE numerical integrator method.

register_sde_integrator(name, integrator)

Register a new SDE integrator.

get_supported_methods()

Get all supported numerical methods for DDEs.

Normal SDE Integrators#

Euler(f, g[, dt, name, show_code, var_type, ...])

Euler method for the Ito and Stratonovich integrals.

Heun(f, g[, dt, name, show_code, var_type, ...])

The Euler-Heun method for Stratonovich integral scheme.

Milstein(f, g[, dt, name, show_code, ...])

Milstein method for Ito or Stratonovich integrals.

MilsteinGradFree(f, g[, dt, name, ...])

Derivative-free Milstein method for Ito or Stratonovich integrals.

ExponentialEuler(f, g[, dt, name, ...])

First order, explicit exponential Euler method.

SRK methods for scalar Wiener process#

SRK1W1(f, g[, dt, name, show_code, ...])

Order 2.0 weak SRK methods for SDEs with scalar Wiener process.

SRK2W1(f, g[, dt, name, show_code, ...])

Order 1.5 Strong SRK Methods for SDEs with Scalar Noise.

KlPl(f, g[, dt, name, show_code, var_type, ...])

FDE integrators#

Base FDE Integrator#

FDEIntegrator(f, alpha, num_memory[, dt, ...])

Numerical integrator for fractional differential equations (FEDs).

Generic FDE Functions#

set_default_fdeint(method)

Set the default ODE numerical integrator method for differential equations.

get_default_fdeint()

Get the default ODE numerical integrator method.

register_fde_integrator(name, integrator)

Register a new ODE integrator.

get_supported_methods()

Get all supported numerical methods for DDEs.

Methods for Caputo Fractional Derivative#

CaputoEuler(f, alpha, num_memory, inits[, ...])

One-step Euler method for Caputo fractional differential equations.

CaputoL1Schema(f, alpha, num_memory, inits)

The L1 scheme method for the numerical approximation of the Caputo fractional-order derivative equations [3]_.

Methods for Riemann-Liouville Fractional Derivative#

GLShortMemory(f, alpha, inits, num_memory[, ...])

Efficient Computation of the Short-Memory Principle in Grünwald-Letnikov Method [1]_.