FixedStepController

class cubie.integrators.FixedStepController(precision: type[float16] | type[float32] | type[float64] | dtype[float16] | dtype[float32] | dtype[float64], dt: float, n: int = 1, **kwargs)[source]

Bases: BaseStepController

Controller that enforces a constant time step.

__init__(precision: type[float16] | type[float32] | type[float64] | dtype[float16] | dtype[float32] | dtype[float64], dt: float, n: int = 1, **kwargs) None[source]

Initialise the fixed step controller.

Parameters:
  • precision – Precision used for controller calculations.

  • dt – Fixed step size to apply on every iteration.

  • n – Number of state variables advanced by the integrator.

  • **kwargs – Optional parameters passed to FixedStepControlConfig. See FixedStepControlConfig for available parameters. None values are ignored.

build() ControllerCache[source]

Return a device function that always accepts with fixed step.

Returns:

CUDA device function that keeps the step size constant.

Return type:

Callable

property dt: float

Return the fixed step size used by the controller.

property local_memory_elements: int

Amount of local memory required by the controller.