Version: dev

step

Stable function · Simulation

Tier: stable · Kind: function · Topic: Simulation

JuliaTypeScriptPythonRustGo
not exportedoutside profilestepstepoutside profile

Julia

Julia does not export this function.

TypeScript

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

Python

step(integrator: Integrator) -> ReturnCode | None

Advance integrator one accepted step — the spec’s step!.

Python has no ! convention for a mutating function, so the bang is dropped; the function mutates its argument exactly as the Julia twin does.

Source

Example (integrator)

integ = earthsci_ast.init(prob)
earthsci_ast.step(integ)
assert 0.0 < integ.t < 10.0
assert integ["N"] < 100.0

rest = earthsci_ast.solve_all(integ)
assert rest.retcode == earthsci_ast.ReturnCode.Success
assert rest.t[-1] == 10.0

From docs/api/examples/python/simulate.py

Rust

pub fn step(integrator: &mut Integrator<'_>) -> Result<StepStatus, SimulateError>

Advance integrator by one grid point (§2.5.6’s step!).

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.