aquakin.IntegratorConfig#
- class aquakin.IntegratorConfig(order=3, factormax=3.0, colored_jacobian='auto', dtmax=None, max_steps=100000, solver=None)[source]#
Bases:
objectThe integrator / step-size configuration for a solve.
A single frozen value object centralising the per-step solver settings that used to be scattered as loose keyword arguments on
Plant.solveand the reactor constructors. Passed asintegrator=IntegratorConfig(...); the default flips the public solve stack to the fast configuration (Kvaerno3 + a capped step-growth factor + an auto colored Jacobian).rtol/atolare deliberately not here – they stay separate arguments ofPlant.solve/ the reactor constructors (a tolerance is the accuracy contract, not the integrator machinery).- Parameters:
order (int) – ESDIRK order:
3->Kvaerno3(the new fast default, fewer stages),5->Kvaerno5(the robust higher-order method). Ignored whensolveris given.factormax (float, optional) – Cap on the PID controller’s per-step growth factor (diffrax default 10). A smaller cap (default 3) damps the overshoot-then-reject oscillation on a stiff forced system.
Nonekeeps the diffrax default.colored_jacobian ({"auto", True, False}) – Sparse (colored-AD) materialisation of the per-step implicit Jacobian. See
Plant.solvefor the full semantics. Plant-only – reactors ignore it.dtmax (float, optional) – Maximum integrator step size (
None= uncapped). Set it for a reverse-mode gradient through a stiff solve (thethrough_solvedifferentiation method); the cap-freestablemethod does not need it.max_steps (int) – Maximum number of internal solver steps.
solver (diffrax.AbstractSolver, optional) – An explicit solver object that overrides
orderand is honoured verbatim (the one escape hatch).Nonebuilds the canonical solver oforder.
- __init__(order=3, factormax=3.0, colored_jacobian='auto', dtmax=None, max_steps=100000, solver=None)#
- Parameters:
order (int)
factormax (float | None)
colored_jacobian (bool | str)
dtmax (float | None)
max_steps (int)
solver (AbstractSolver | None)
- Return type:
None
Methods
__init__([order, factormax, ...])Attributes
colored_jacobiandtmaxfactormaxmax_stepsordersolver