SingleIntegratorRun
- class cubie.integrators.SingleIntegratorRun(system: BaseODE, drivers_fn: Callable | None = None, driver_derivative_fn: Callable | None = None, **settings: Any)[source]
Bases:
SingleIntegratorRunCoreExpose aggregated read-only properties for integrator runs.
Notes
Instantiation, updates, and compilation are provided by
SingleIntegratorRunCore. This subclass intentionally limits itself to property-based access so that front-end utilities can inspect compiled CUDA components without mutating internal state.- _regular_event_count(duration: float, interval: float) int[source]
Count how many scheduled events fit inside a duration.
Casting
durationandintervalto the working precision rounds each of them slightly, so the division can land just below a whole number when the user asked for a whole number of events: float32 turns 10.0 / 0.001 into 9999.9993, which would floor to 9999 and lose the event at the end time. A small allowance is added before flooring so a result this close to a whole number counts as that whole number.The allowance covers only the one-off rounding of the two cast values. The allocation and the device’s event counts both come from this count, so the host and the device always agree with each other; see
save_event_count()andsummary_sample_count().- Parameters:
duration – Integration duration in time units.
interval – Scheduling interval in time units.
- Returns:
Number of scheduled events, excluding the initial sample.
- Return type:
- output_length(duration: float) int[source]
Calculate number of time-domain output samples for a duration.
- Parameters:
duration – Integration duration in time units.
- Returns:
Number of output samples including initial and optionally final.
- Return type:
- property persistent_local_elements: int
Return total persistent local-memory elements required by the loop.
- property sample_summaries_every: float | None
Return the loop sample summaries interval, or None if not configured.
- save_event_count(duration: float) int[source]
Return the number of scheduled save rows, initial included.
Return total shared-memory usage in bytes.
Return total shared-memory elements required by the loop.
- property solver_diagnostics: Dict[str, Any]
Return the step’s solver settings reported when runs fail.
- summaries_length(duration: float) int[source]
Calculate number of summary output rows for a duration.
The device writes one summary row after every
samples_per_summarysummary measurements. The number of measurements in a run follows the same counting rule as saves (_regular_event_count()), and only a complete window produces a row, so the row count is the measurement count divided by the measurements per window, rounded down. The measurements-per-window value is read from the loop configuration, the same place the device code gets it.- Parameters:
duration – Integration duration in time units.
- Returns:
Number of summary rows.
- Return type:
- property summarise_every: float | None
Return the loop summary interval, or None if not configured.
- property system_sizes: SystemSizes
Return the size descriptor for the ODE system.