IndependentIntegration#

class braincell.quad.IndependentIntegration(solver, **kwargs)[source]#

Mixin that opts a submodule out of its parent’s integration loop.

States owned by an IndependentIntegration submodule are filtered out by braincell.quad._util.split_diffeq_states(), so they are not touched by whichever solver is driving the parent DiffEqModule. The submodule then advances its own states by calling make_integration(), which dispatches through whatever solver was named at construction time.

This is the right tool when a sub-system needs a different time step or a fundamentally different solver from the rest of the cell — for example, fast voltage gating that should run with exponential Euler while the surrounding model uses RK4, or a calcium pool that prefers backward Euler.

Parameters:

See also

DiffEqModule

Parent integration interface.

braincell.quad.get_integrator

Solver lookup.

Examples

>>> from braincell import DiffEqModule, IndependentIntegration
>>> class FastGate(IndependentIntegration, DiffEqModule):
...     def __init__(self):
...         super().__init__(solver='exp_euler')
...     def compute_derivative(self, *args):
...         ...
make_integration(*args, **kwargs)[source]#

Run one step of the configured solver on this submodule.