Version: dev

resolve_tolerances

Stable function · Simulation

Tier: stable · Kind: function · Topic: Simulation

JuliaTypeScriptPythonRustGo
resolve_tolerancesresolveTolerancesresolve_tolerancesresolve_tolerancesoutside profile

Julia

resolve_tolerances(solver; abstol, reltol)
resolve_tolerances(solver; abstol=nothing, reltol=nothing) -> (abstol, reltol)

Resolve integration tolerances most-specific first (esm-spec §2.2.2):

  1. An explicit argument at the solve call site — wins outright.
  2. Otherwise the document’s solver.abstol / solver.reltol.
  3. Otherwise the binding default (reltol 1e-4, abstol 1e-6).

The two resolve INDEPENDENTLY, so a document declaring only reltol leaves abstol on the default — the same per-field fall-through §6.6.4 uses.

These are INTEGRATION tolerances, a DIFFERENT QUANTITY from the Tolerance an assertion is COMPARED at (§6.6.4), which resolves on its own chain.

Source

TypeScript

function resolveTolerances(solver: Solver | undefined | null, opts?: { abstol?: number; reltol?: number }): { abstol: number; reltol: number }

Resolve integration tolerances most-specific first (esm-spec §2.2.2):

  1. An explicit argument at the call site — wins outright.
  2. Otherwise the document’s solver.abstol / solver.reltol.
  3. Otherwise the binding default (reltol 1e-4, abstol 1e-6).

The two resolve INDEPENDENTLY, so a document declaring only reltol leaves abstol on the default — the same per-field fall-through §6.6.4 uses.

These are INTEGRATION tolerances, a different quantity from the tolerance object an assertion is COMPARED at (§6.6.4).

Source

Python

resolve_tolerances(solver: Any, abstol: float | None = None, reltol: float | None = None) -> tuple[float, float]

Resolve integration tolerances most-specific first (esm-spec §2.2.2).

solver may be a Solver , the raw solver block as a dict (what EsmProblem.doc carries), or None.

  1. An explicit argument at the solve() call site — wins outright.
  2. Otherwise the document’s solver.abstol / solver.reltol.
  3. Otherwise the binding default (reltol 1e-4, abstol 1e-6).

The two tolerances resolve INDEPENDENTLY: a document that declares only reltol leaves abstol to fall through to the default, exactly as §6.6.4 merges its own chain per field.

These are INTEGRATION tolerances. They are a different quantity from the tolerance object an assertion is compared at (§6.6.4), which resolves on its own chain and is not touched here.

Source

Rust

pub fn resolve_tolerances(solver: Option<&Solver>, abstol: Option<f64>, reltol: Option<f64>) -> (f64, f64)

Resolve integration tolerances most-specific first (esm-spec §2.2.2):

  1. An explicit argument at the solve call site — wins outright.
  2. Otherwise the document’s solver.abstol / solver.reltol.
  3. Otherwise the binding default (reltol 1e-4, abstol 1e-6).

The two resolve INDEPENDENTLY, so a document declaring only reltol leaves abstol on the default — the same per-field fall-through §6.6.4 uses.

These are INTEGRATION tolerances, a different quantity from the tolerance object an assertion is COMPARED at (§6.6.4).

Source · Rust docs

Go

Not available in Go. Go is outside the simulation capability profile (Julia, Python, Rust): build an RHS and integrate it; TypeScript and Go are deliberately non-simulating.