braincell.quad.implicit_rk4_step#
- braincell.quad.implicit_rk4_step(target, t, dt, *args)[source]#
Advance a cell with implicit Euler voltage and explicit RK4 channels.
Operator-splitting update inside one
dtfor a multi-compartment cell:Channels and concentrations. With axial currents temporarily disabled, every non-voltage
DiffEqStateis advanced byrk4_step().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-
Celltargets the routine falls back to a single Newton-based implicit Euler step on the full state vector.The implicit Euler voltage solve is \(L\)-stable and damps high-frequency cable modes; the explicit RK4 channel update gives the rest of the system fourth-order accuracy. Use this scheme when the cable equation is the only severely stiff component and you want extra accuracy on smooth gating dynamics.
- Parameters:
target (
DiffEqModule) – The module to advance. Splitting is used when target is abraincell.Cell; otherwise the routine reduces to a plain Newton step.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
cn_rk4_stepCrank-Nicolson voltage solve paired with RK4 channels.
implicit_exp_euler_stepImplicit Euler voltage solve paired with exponential Euler channels.