conspire/math/integrate/tableau/mod.rs
1#[cfg(test)]
2mod test;
3
4use crate::math::Scalar;
5
6/// Butcher tableau for an explicit Runge–Kutta method.
7pub trait ButcherTableau {
8 /// Number of stages, equal to the number of stored slopes.
9 const STAGES: usize;
10 /// Order of the propagating solution; the exponent for adaptive time steps.
11 const ORDER: Scalar;
12 /// Stage-coupling coefficients, `A[i].len() == i`.
13 const A: &'static [&'static [Scalar]];
14 /// Stage abscissae, `C[0] == 0`.
15 const C: &'static [Scalar];
16 /// Propagating weights.
17 const B: &'static [Scalar];
18 /// Whether the last stage of a step is the first stage of the next.
19 const FSAL: bool = false;
20}
21
22/// An embedded explicit Runge–Kutta pair.
23pub trait EmbeddedTableau: ButcherTableau {
24 /// Difference of the propagating and embedded weights.
25 const D: &'static [Scalar];
26}