eqiora.time
Time-integration methods and related settings.
View sourceExample: control ODE error
Section titled “Example: control ODE error”Use model and x from the decay example:
import eqiora
method = eqiora.time.Tsitouras45( initial_step_s=0.01, relative_tolerance=1e-9, absolute_tolerances={(x, 0, 0, False): 1e-11},)plan = eqiora.resolve(model, temporal=method)The initial step is in seconds. Each absolute tolerance applies to one state
coordinate (field, derivative_order, component, imaginary). Components use
zero-based row-major indices; False selects the real part and True the imaginary
part. Tolerances use the coordinate’s SI units; x is dimensionless here.
output_times_s in run chooses observation times independently of the
adaptive internal steps.
EulerMaruyama
Section titled “EulerMaruyama”Ito diffusion on 2**depth equal steps over the original Run horizon.
Output times must lie on that dyadic grid. Exact restart retains the original partition; this profile does not promise cross-platform random bytes.
@finalclass EulerMaruyama: def __new__(cls, *, depth: int) -> Self: ... @property def depth(self) -> int: ... def __repr__(self) -> str: ...PoissonEvents
Section titled “PoissonEvents”Constant-rate independent Poisson arrivals with a total event budget.
@finalclass PoissonEvents: def __new__(cls, *, max_events: int) -> Self: ... @property def max_events(self) -> int: ... def __repr__(self) -> str: ...BackwardEuler
Section titled “BackwardEuler”Backward Euler with a fixed positive step size.
@finalclass BackwardEuler: def __new__(cls, step_s: float) -> Self: ... @property def step_s(self) -> float: ... def __repr__(self) -> str: ...TimePlanView
Section titled “TimePlanView”Resolved plan for finite time evolution (no mesh).
@finalclass TimePlanView: @property def kind(self) -> str: ... @property def backend(self) -> str: ... @property def backend_version(self) -> str: ... def __repr__(self) -> str: ... @property def scalar_type(self) -> str: ... @property def value_representation(self) -> str: ...Tsitouras45
Section titled “Tsitouras45”Adaptive explicit Tsitouras 5(4) integration.
Tolerances are in SI units and are set per Field, derivative order, component, and real or imaginary part.
@finalclass Tsitouras45: def with_conserved_norm(self, fields: Sequence[FieldRef], *, target: float, tolerance: float, dimension: Dimension) -> Self: ... def with_hermitian_parameter(self, parameter: ParameterRef) -> Self: ... def __new__(cls, *, initial_step_s: float, relative_tolerance: float, absolute_tolerances: Mapping[tuple[FieldRef, int, int, bool], float], events: EventPolicy | None=None, forward_sensitivities: ForwardSensitivity | None=None) -> Self: ... @property def initial_step_s(self) -> float: ... @property def relative_tolerance(self) -> float: ... @property def absolute_tolerances(self) -> dict[tuple[FieldRef, int, int, bool], float]: ... @property def events(self) -> EventPolicy | None: ... @property def forward_sensitivities(self) -> ForwardSensitivity | None: ... def __repr__(self) -> str: ...ImplicitMidpoint
Section titled “ImplicitMidpoint”Implicit midpoint rule with a fixed step and per-coordinate Newton tolerances.
The tolerances control the Newton corrections, not the time-discretization error. Output samples are interpolated from the collocation polynomial of each completed step, so requesting outputs does not change the steps.
@finalclass ImplicitMidpoint: def with_conserved_norm(self, fields: Sequence[FieldRef], *, target: float, tolerance: float, dimension: Dimension) -> Self: ... def with_hermitian_parameter(self, parameter: ParameterRef) -> Self: ... def __new__(cls, *, step_s: float, relative_tolerance: float, absolute_tolerances: Mapping[tuple[FieldRef, int, int, bool], float]) -> Self: ... @property def step_s(self) -> float: ... @property def relative_tolerance(self) -> float: ... @property def absolute_tolerances(self) -> dict[tuple[FieldRef, int, int, bool], float]: ... def __repr__(self) -> str: ...TimeObservationInterpolation
Section titled “TimeObservationInterpolation”Interpolation of Observable samples for time integrals and extrema.
EndpointLinear uses accepted endpoints. NativeMidpointQuadratic also uses native accepted midpoint values; it is unavailable for spatial histories. Neither policy interpolates a restart State.
@finalclass TimeObservationInterpolation: NativeMidpointQuadratic: ClassVar[TimeObservationInterpolation] EndpointLinear: ClassVar[TimeObservationInterpolation] def __eq__(self, other: object, /) -> bool: ... def __hash__(self) -> int: ...GuardTolerance
Section titled “GuardTolerance”Positive tolerance, in coherent SI units, for one activation guard.
@finalclass GuardTolerance: def __new__(cls, activation: ActivationRef, value: float, dimension: Dimension) -> Self: ... @property def activation(self) -> ActivationRef: ... @property def value(self) -> float: ... @property def dimension(self) -> Dimension: ...EventPolicy
Section titled “EventPolicy”Event-handling settings, with guard tolerances in each Activation’s units.
Events that must fire together as one root group need identical guard tolerances.
@finalclass EventPolicy: def __new__(cls, *, max_events: int, guard_tolerances: tuple[GuardTolerance, ...]) -> Self: ... @property def max_events(self) -> int: ... @property def model_digest(self) -> str: ... @property def guard_tolerances(self) -> tuple[GuardTolerance, ...]: ...ForwardSensitivity
Section titled “ForwardSensitivity”Error control for continuous forward sensitivities.
@finalclass ForwardSensitivity: def __new__(cls, *, relative_tolerance: float, absolute_tolerances: tuple[SensitivityTolerance, ...]) -> Self: ... @property def relative_tolerance(self) -> float: ... @property def model_digest(self) -> str: ... @property def absolute_tolerances(self) -> tuple[SensitivityTolerance, ...]: ...SensitivityTolerance
Section titled “SensitivityTolerance”Positive tolerance for the derivative of a Field with respect to a Parameter, in the units of that derivative.
@finalclass SensitivityTolerance: def __new__(cls, coordinate: tuple[FieldRef, int, int, bool], parameter: ParameterRef, value: float, dimension: Dimension) -> Self: ... @property def coordinate(self) -> tuple[FieldRef, int, int, bool]: ... @property def parameter(self) -> ParameterRef: ... @property def value(self) -> float: ... @property def dimension(self) -> Dimension: ...