Skip to content

validate_step_size

Defined in: error.rs:128

fn validate_step_size(dt: f64) -> [Result<(), IntegrationError>](https://doc.rust-lang.org/std/result/enum.Result.html)

Reject step sizes that cannot advance time toward t_end.

dt == 0 (or negative, or NaN) leaves t unchanged in the fixed-step loops, which spin forever instead of terminating.

Public so downstream fixed-step loops built on Integrator::step (rather than on integrate/advance_to, which check internally) can apply the same precondition and report the same error.

Integrator::step: crate::Integrator::step