braincell.quad.splitting_step#
- braincell.quad.splitting_step(target, t, dt, *args)[source]#
Advance a multi-compartment cell with operator-splitting.
Two complementary updates are applied within a single
dt:Channels and concentrations. With axial currents temporarily disabled (
compute_axial_current=False), everyDiffEqStatein target is advanced by the manually parallelised Newton iteration in_newton_method_manual_parallel(). This handles ion channel gating variables, calcium pools, and any other non-voltage state.Cable voltage. A dense LU factorisation of the implicit-Euler cable matrix \(I - \Delta t A\) is constructed once via
construct_lu()and reused withjax.scipy.linalg.lu_solve()to solve for the new midpoint voltages. The factorisation lives insideensure_compile_time_evalso it is hoisted out of the JIT cache.
For non-
Celltargets the splitting collapses to a single Newton solve over the whole state vector.Splitting recovers full-cable stability while keeping the channel update embarrassingly parallel across compartments. It is the historical NEURON-style integrator and is provided here mainly for comparison against
staggered_step(), which uses a sparser DHS cable solve.- Parameters:
target (
DiffEqModule) – The module to advance. When target is abraincell.Cell, the splitting branch is used; otherwise the routine falls back to a plain Newton step.t (
Quantity[s]) – Current simulation time.dt (
Quantity[s]) – Time step. Must carry units of time.*args – Extra positional arguments forwarded to
target’scompute_derivativeandpre/post_integralhooks.
- Returns:
target’s state — voltage and channel/ion variables — is updated in place.- Return type:
None
See also
staggered_stepSparser DHS-based splitting suitable for large trees.