braincell.quad.implicit_exp_euler_step

braincell.quad.implicit_exp_euler_step#

braincell.quad.implicit_exp_euler_step(target, t, dt, *args)[source]#

Advance a cell with implicit Euler voltage and exponential Euler channels.

Operator-splitting update inside one dt for a multi-compartment cell:

  1. Channels and concentrations. With axial currents temporarily disabled, every non-voltage DiffEqState is advanced by the coupled exponential Euler update from _exponential_euler().

  2. Cable voltage. The linear axial system \(dV/dt = A V\) is then advanced by one implicit-Euler solve via _implicit_euler_for_axial_current(), \((I - \Delta t A) V_{n+1} = V_n\).

For non-Cell targets the routine falls back to a single Newton-based implicit Euler step on the full state vector.

The combination of an \(L\)-stable cable solve and an \(A\)-stable channel solve makes this scheme robust at large time

steps and is the recommended choice for multi-compartment Hodgkin-Huxley models when accuracy on smooth dynamics is less critical than stability.

Parameters:
  • target (DiffEqModule) – The module to advance.

  • t (Quantity[s]) – Current simulation time.

  • dt (Quantity[s]) – Time step.

  • *args – Extra positional arguments forwarded to the channel and voltage solvers.

Returns:

target’s state is updated in place.

Return type:

None

See also

implicit_rk4_step

Implicit Euler voltage paired with RK4 channels.

cn_exp_euler_step

Crank-Nicolson voltage paired with exponential Euler channels.