Skip to content
Get started

eqiora.time

← Python API index

Time-integration methods and related settings.

View source

Use model and x from the decay example:

python
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.

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.

python
@final
class EulerMaruyama:
def __new__(cls, *, depth: int) -> Self: ...
@property
def depth(self) -> int: ...
def __repr__(self) -> str: ...

Constant-rate independent Poisson arrivals with a total event budget.

python
@final
class PoissonEvents:
def __new__(cls, *, max_events: int) -> Self: ...
@property
def max_events(self) -> int: ...
def __repr__(self) -> str: ...

Backward Euler with a fixed positive step size.

python
@final
class BackwardEuler:
def __new__(cls, step_s: float) -> Self: ...
@property
def step_s(self) -> float: ...
def __repr__(self) -> str: ...

Resolved plan for finite time evolution (no mesh).

python
@final
class 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: ...

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.

python
@final
class 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: ...

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.

python
@final
class 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.

python
@final
class 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: ...

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.

python
@final
class TimeObservationInterpolation:
NativeMidpointQuadratic: ClassVar[TimeObservationInterpolation]
EndpointLinear: ClassVar[TimeObservationInterpolation]
def __eq__(self, other: object, /) -> bool: ...
def __hash__(self) -> int: ...

Positive tolerance, in coherent SI units, for one activation guard.

python
@final
class 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: ...

Event-handling settings, with guard tolerances in each Activation’s units.

Events that must fire together as one root group need identical guard tolerances.

python
@final
class 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, ...]: ...

Error control for continuous forward sensitivities.

python
@final
class 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, ...]: ...

Positive tolerance for the derivative of a Field with respect to a Parameter, in the units of that derivative.

python
@final
class 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: ...