BaseStepController

class cubie.integrators.step_control.base_step_controller.BaseStepController[source]

Bases: CUDAFactory

Factory interface for compiling CUDA step-size controllers.

__init__() None[source]

Initialise the base controller factory.

abstractmethod build() Callable[source]

Compile and return the CUDA device controller.

Returns:

Device function implementing the controller policy.

Return type:

Callable

property dt0: float

Return the initial step size.

property dt_max: float

Return the maximum supported step size.

property dt_min: float

Return the minimum supported step size.

property is_adaptive: bool

Return True if the controller is adaptive.

abstract property local_memory_elements: int

Return the number of local scratch elements required.

property n: int

Return the number of controlled state variables.

register_buffers() None[source]

Register controller buffers with the central buffer registry.

Registers the timestep_buffer using size from local_memory_elements and location from compile_settings.timestep_memory. Controllers with zero buffer requirements still register to maintain consistent interface.

property settings_dict: dict[str, object]

Return the compile-time settings as a dictionary.

update(updates_dict: dict[str, object] | None = None, silent: bool = False, **kwargs: object) set[str][source]

Propagate configuration updates to the compiled controller.

Parameters:
  • updates_dict – Dictionary of configuration values to update.

  • silent – When True suppress warnings for recognised but unused controller parameters.

  • **kwargs – Additional configuration key-value pairs to update.

Returns:

Names of parameters that were applied successfully.

Return type:

set[str]

Raises:

KeyError – Raised when an update references parameters that are not defined for any controller.