Skip to content

AdaptiveStepper

Defined in: mod.rs:110

pub struct AdaptiveStepper\<'a, S: [DynamicalSystem](../../traits/dynamicalsystem/)\> {
pub dt_min: f64,
// ...
}

Stateful adaptive stepper that encapsulates FSAL k1/dt management.

Created via DormandPrince::stepper. Callers repeatedly call advance_to(AdaptiveStepper::advance_to) to advance to successive target times (e.g. output interval boundaries), without needing to manage k1 reuse or step-size adaptation themselves.

dt_min: f64

Minimum step size below which integration fails. Can be overridden after construction to match the total integration interval.


fn advance_to<F, E, B>(&mut self, t_target: f64, callback: F, event_check: E) -> [Result<AdvanceOutcome<B>, IntegrationError>](https://doc.rust-lang.org/std/result/enum.Result.html) where F: FnMut(f64, &::State), E: [Fn(f64, &::State) -> ControlFlow<B>](https://doc.rust-lang.org/std/ops/function/trait.Fn.html)

Advance adaptively to t_target.

  • Each accepted step calls callback(t, &state).
  • If event_check returns Break(reason), returns Event { reason }.
  • On success returns Reached with internal state updated to t_target.

fn state(&self) -> &::State

Current state.


fn t(&self) -> f64

Current time.


fn dt(&self) -> f64

Current adaptive step size.


fn into_state(self) -> ::State

Consume the stepper and return the final state.