step
Stable function · Simulation
Tier: stable · Kind: function · Topic: Simulation
| Julia | TypeScript | Python | Rust | Go |
|---|---|---|---|---|
| not exported | outside profile | step | step | outside 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.
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
Rust
pub fn step(integrator: &mut Integrator<'_>) -> Result<StepStatus, SimulateError>
Advance integrator by one grid point (§2.5.6’s step!).
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.