pub trait VariableStepExplicit<Y, U, V, T = Time>where
Self: Explicit<Y, U, V, T> + VariableStep<T>,
Y: Differentiable<T> + Tensor,
Derivative<Y, T>: Mul<Quantity<T>, Output = Y>,
for<'a> &'a Y: Mul<Scalar, Output = Y> + Sub<&'a Y, Output = Y>,
for<'a> &'a Derivative<Y, T>: Mul<Scalar, Output = Derivative<Y, T>> + Mul<Quantity<T>, Output = Y>,
U: TensorVec<Item = Y>,
V: TensorVec<Item = Derivative<Y, T>>,{
type Tableau: EmbeddedTableau;
// Provided methods
fn integrate_variable_step(
&self,
function: impl FnMut(Quantity<T>, &Y) -> Result<Derivative<Y, T>, String>,
time: &[Quantity<T>],
initial_condition: Y,
) -> Result<(Times<T>, U, V), IntegrationError>
where Self: InterpolateSolution<Y, U, V, T> { ... }
fn interpolate_variable_step(
time: &Times<T>,
tp: &Times<T>,
yp: &U,
function: impl FnMut(Quantity<T>, &Y) -> Result<Derivative<Y, T>, String>,
) -> Result<(U, V), IntegrationError> { ... }
fn slopes(
function: impl FnMut(Quantity<T>, &Y) -> Result<Derivative<Y, T>, String>,
y: &Y,
t: Quantity<T>,
dt: Quantity<T>,
k: &mut [Derivative<Y, T>],
y_trial: &mut Y,
) -> Result<(), String> { ... }
fn error(
&self,
dt: Quantity<T>,
k: &[Derivative<Y, T>],
) -> Result<Scalar, String> { ... }
fn slopes_and_error(
&self,
function: impl FnMut(Quantity<T>, &Y) -> Result<Derivative<Y, T>, String>,
y: &Y,
t: Quantity<T>,
dt: Quantity<T>,
k: &mut [Derivative<Y, T>],
y_trial: &mut Y,
) -> Result<Scalar, String> { ... }
fn step(
&self,
function: impl FnMut(Quantity<T>, &Y) -> Result<Derivative<Y, T>, String>,
y: &mut Y,
t: &mut Quantity<T>,
y_sol: &mut U,
t_sol: &mut Times<T>,
dydt_sol: &mut V,
k_sol: &mut Vec<V>,
dt: &mut Quantity<T>,
k: &mut [Derivative<Y, T>],
y_trial: &Y,
e: Scalar,
) -> Result<(), String> { ... }
fn time_step(&self, error: Scalar, tolerance: Scalar, dt: &mut Quantity<T>) { ... }
}Expand description
Variable-step explicit integrators for ordinary differential equations.
Required Associated Types§
Sourcetype Tableau: EmbeddedTableau
type Tableau: EmbeddedTableau
Butcher tableau of this method’s embedded pair.
Provided Methods§
fn integrate_variable_step(
&self,
function: impl FnMut(Quantity<T>, &Y) -> Result<Derivative<Y, T>, String>,
time: &[Quantity<T>],
initial_condition: Y,
) -> Result<(Times<T>, U, V), IntegrationError>where
Self: InterpolateSolution<Y, U, V, T>,
fn interpolate_variable_step( time: &Times<T>, tp: &Times<T>, yp: &U, function: impl FnMut(Quantity<T>, &Y) -> Result<Derivative<Y, T>, String>, ) -> Result<(U, V), IntegrationError>
Sourcefn slopes(
function: impl FnMut(Quantity<T>, &Y) -> Result<Derivative<Y, T>, String>,
y: &Y,
t: Quantity<T>,
dt: Quantity<T>,
k: &mut [Derivative<Y, T>],
y_trial: &mut Y,
) -> Result<(), String>
fn slopes( function: impl FnMut(Quantity<T>, &Y) -> Result<Derivative<Y, T>, String>, y: &Y, t: Quantity<T>, dt: Quantity<T>, k: &mut [Derivative<Y, T>], y_trial: &mut Y, ) -> Result<(), String>
Runge–Kutta stages and the propagating solution.
\mathbf{k}_i = \mathbf{f}\!\left(t + c_i h,\ \mathbf{y} + h \sum_{j<i} a_{ij}\, \mathbf{k}_j\right)
,\qquad
\mathbf{y}_{n+1} = \mathbf{y} + h \textstyle\sum_i b_i\,\mathbf{k}_iSourcefn error(
&self,
dt: Quantity<T>,
k: &[Derivative<Y, T>],
) -> Result<Scalar, String>
fn error( &self, dt: Quantity<T>, k: &[Derivative<Y, T>], ) -> Result<Scalar, String>
Embedded local-error estimate reduced through the error norm.
e_{n+1} = \Big\Vert h \textstyle\sum_i d_i\,\mathbf{k}_i \Big\Vertfn slopes_and_error( &self, function: impl FnMut(Quantity<T>, &Y) -> Result<Derivative<Y, T>, String>, y: &Y, t: Quantity<T>, dt: Quantity<T>, k: &mut [Derivative<Y, T>], y_trial: &mut Y, ) -> Result<Scalar, String>
fn step( &self, function: impl FnMut(Quantity<T>, &Y) -> Result<Derivative<Y, T>, String>, y: &mut Y, t: &mut Quantity<T>, y_sol: &mut U, t_sol: &mut Times<T>, dydt_sol: &mut V, k_sol: &mut Vec<V>, dt: &mut Quantity<T>, k: &mut [Derivative<Y, T>], y_trial: &Y, e: Scalar, ) -> Result<(), String>
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".