コンテンツにスキップ

DormandPrince

このコンテンツはまだ日本語訳がありません。

Defined in: mod.rs:21

pub struct DormandPrince

Dormand-Prince RK5(4)7M adaptive step-size integrator.

Uses a 7-stage embedded Runge-Kutta pair. The 5th-order solution is propagated (local extrapolation); the 4th-order solution is used only for error estimation. The FSAL (First Same As Last) property allows reuse of the 7th stage derivative as the 1st stage of the next step.

fn stepper<‘a, S: DynamicalSystem>(&self, system: &‘a S, initial: ::State, t0: f64, dt: f64, tol: Tolerances) -> AdaptiveStepper<‘a, S>

Create an AdaptiveStepper for the given system and initial conditions.


fn step_full<S: DynamicalSystem>(&self, system: &S, t: f64, state: &::State, dt: f64) -> (::State, ::State, ::State)

Perform a single Dormand-Prince step with full output.

Returns (y5, error, k7) where:

  • y5: the raw 5th-order candidate, not projected
  • error: embedded error estimate, belonging to that raw candidate
  • k7: 7th-stage derivative, f(t + dt, y5)

This is the low-level building block for a caller running its own step-size control, so it stops short of the projection: error pairs with the raw candidate, and mixing it with a projected state is inconsistent. A caller that accepts the step owes the state its OdeState::project call, and may reuse k7 as the next first stage only while that projection reports Projection::Unchanged (Projection::Changed means k7 was evaluated at a state that no longer exists). Integrator::step and AdaptiveStepper do this for you.

Projection::Unchanged: crate::Projection::Unchanged


fn integrate_adaptive_with_events<S, F, E, B>(&self, system: &S, initial: ::State, t0: f64, t_end: f64, dt_initial: f64, tol: &Tolerances, callback: F, event_check: E) -> IntegrationOutcome<::State, B> where S: DynamicalSystem, F: FnMut(f64, &::State), E: [Fn(f64, &::State) -> ControlFlow<B>](https://doc.rust-lang.org/std/ops/function/trait.Fn.html)

Integrate adaptively with event detection and NaN/Inf checking.

Uses the Dormand-Prince RK5(4) method with automatic step-size control. The dt_initial parameter is used as the initial step size guess.