AdaptiveStepControlConfig

class cubie.integrators.step_control.adaptive_step_controller.AdaptiveStepControlConfig(precision: type[float16] | type[float32] | type[float64] | dtype[float16] | dtype[float32] | dtype[float64], n_states: int = 1, mass_flags: Iterable | None = None, dt: float | None = None, timestep_memory_location: str = 'local', atol: float | ArrayLike = array([1.e-06]), rtol: float | ArrayLike = array([1.e-06]), dt_min: float = 1e-06, dt_max: float = 1.0, algorithm_order: int = 1, min_step_shrink: float = 0.3, max_step_growth: float = 2.0, safety: float = 0.9, deadband_min: float = 1.0, deadband_max: float = 1.0, norm_fn: Callable | None = None, *, jit_flags: JITFlags = NOTHING, unroll: UnrollFlags = NOTHING)[source]

Bases: BaseStepControllerConfig

Configuration for adaptive step controllers.

Notes

Parameters influencing compilation should live here so that device functions are rebuilt when they change.

_resolve_gain(gain) float[source]

Return a gain as a precision float at the algorithm order.

algorithm_order: int
property deadband_max: float

Return the upper gain threshold for the unity deadband.

property deadband_min: float

Return the lower gain threshold for the unity deadband.

property dt: float

Return the initial step; the bounds’ geometric mean if unset.

property dt_max: float

Return the maximum permissible step size.

property dt_min: float

Return the minimum permissible step size.

property is_adaptive: bool

Return True because the controller adapts step size.

property max_step_growth: float

Return the most the step may grow per adjustment.

property min_step_shrink: float

Return the most the step may shrink per adjustment.

norm_fn: Callable | None
property safety: float

Return the safety scaling factor.