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. Alternatively, absolute_tolerance
specifies the SI tolerance of one real scalar first-order ODE state.
The scalar form is bound and checked for positive finite controls at
resolve; it does not broadcast or accept extra contracts. Specify
exactly one tolerance form. Before resolution the scalar request has no
Field-bound mapping, so absolute_tolerances is None.
@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] | None=None, absolute_tolerance: float | None=None, 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] | None: ... @property def absolute_tolerance(self) -> float | None: ... @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.
Resolution requires an explicit solve.Linear or solve.Newton policy.
Linear requires structurally affine State dependence at each stage. Newton
uses its iteration and line-search budgets with these per-coordinate
correction tolerances; its residual tolerances do not control time stages.
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: ...Adaptive residual-native BDF integration for admitted spatial systems.
Tolerances control local time error in each real coordinate, including algebraic coordinates. Output cadence does not choose integration steps. Admitted real/complex index-one spatial systems retain the supplied initial State and derive consistent physical rates from the original equations. Requested outputs recover algebraic constraints from the accepted native interpolant. Resolution requires an explicit spatial solve policy. Finite models, events, sensitivities and durable adaptive checkpoints are not currently connected to this policy.
@finalclass Bdf: def __new__(cls, *, initial_step_s: float, relative_tolerance: float, absolute_tolerances: Mapping[tuple[FieldRef, int, int, bool], float]) -> 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]: ... 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: ...