Skip to content

particula.execution.preparation_context

Typed, setup-only dependencies for built-in resident process adapters.

The context contains resources and preparation results, not simulation lifecycle methods. Built-ins cannot step, close, snapshot or restart their owning runner. Warp buffers remain runtime-typed at the direct-kernel boundary.

Classes

NameDescription
BuiltinPreparationContextExplicit native resources and shared setup outputs for one preparation.

BuiltinPreparationContextclassdataclass#

class BuiltinPreparationContext(wp: ModuleType, session: ResidentSession, registry: GPUResourceRegistry, device: Device, time_step: float, failure: Any, plans: tuple[_ProcessPlan | _RegisteredPlan, ...], fields: FieldBuffers, bindings: dict[str, Any], auxiliary: dict[str, Any], observers: list[Callable[[], object]], refresh: Callable[[], None] | None = None)

Explicit native resources and shared setup outputs for one preparation.

Binding and auxiliary maps are shared with the owner to preserve resource identity. Only setup mutates these maps; retained operations capture their fixed buffers. refresh publishes the derived-state refresh operation.

auxiliaryattributeinstance attribute#

auxiliary: dict[str, Any]

bindingsattributeinstance attribute#

bindings: dict[str, Any]

deviceattributeinstance attribute#

device: Device

failureattributeinstance attribute#

failure: Any

fieldsattributeinstance attribute#

fields: FieldBuffers

observersattributeinstance attribute#

observers: list[Callable[[], object]]

plansattributeinstance attribute#

plans: tuple[_ProcessPlan | _RegisteredPlan, ...]

refreshattributeclass attributeinstance attribute#

refresh: Callable[[], None] | None = None

registryattributeinstance attribute#

registry: GPUResourceRegistry

sessionattributeinstance attribute#

session: ResidentSession

time_stepattributeinstance attribute#

time_step: float

wpattributeinstance attribute#

wp: ModuleType

environmentproperty#

environment: WarpEnvironmentData

Expose the already validated box environment buffer layout.

gasproperty#

gas: WarpGasData

Expose the already validated full-gas buffer layout.

particlesproperty#

particles: WarpParticleData

Expose the already validated native particle buffer layout.

__init__method#

def __init__(wp: ModuleType, session: ResidentSession, registry: GPUResourceRegistry, device: Device, time_step: float, failure: Any, plans: tuple[_ProcessPlan | _RegisteredPlan, ...], fields: FieldBuffers, bindings: dict[str, Any], auxiliary: dict[str, Any], observers: list[Callable[[], object]], refresh: Callable[[], None] | None = None) -> None