pub struct Verner9 {
pub abs_tol: Scalar,
pub rel_tol: Scalar,
pub dt_beta: Scalar,
pub dt_expn: Scalar,
pub dt_cut: Scalar,
pub dt_min: Scalar,
pub error_norm: Norm,
}Expand description
Explicit, sixteen-stage, ninth-order, variable-step, Runge-Kutta method.1
\frac{dy}{dt} = f(t, y)t_{n+1} = t_n + hk_1 = f(t_n, y_n)\cdotsJ.H. Verner, Numer. Algor. 53, 383 (2010). ↩
Fields§
§abs_tol: ScalarAbsolute error tolerance.
rel_tol: ScalarRelative error tolerance.
dt_beta: ScalarMultiplier for adaptive time steps.
dt_expn: ScalarExponent for adaptive time steps.
dt_cut: ScalarCut back factor for the time step.
dt_min: ScalarMinimum value for the time step.
error_norm: NormNorm type for error evaluation.
Trait Implementations§
Source§impl<Y, U, V, T> Explicit<Y, U, V, T> for Verner9where
Y: Differentiate<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>>,
impl<Y, U, V, T> Explicit<Y, U, V, T> for Verner9where
Y: Differentiate<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>>,
const SLOPES: usize = 16
Source§fn integrate(
&self,
function: impl FnMut(Quantity<T>, &Y) -> Result<Derivative<Y, T>, String>,
time: &[Quantity<T>],
initial_condition: Y,
) -> Result<(Times<T>, U, V), IntegrationError>
fn integrate( &self, function: impl FnMut(Quantity<T>, &Y) -> Result<Derivative<Y, T>, String>, time: &[Quantity<T>], initial_condition: Y, ) -> Result<(Times<T>, U, V), IntegrationError>
Solves an initial value problem by explicitly integrating a system of ordinary differential equations. Read more
Source§impl<Y, Z, U, V, W, T> ExplicitDaeVariableStepExplicit<Y, Z, U, V, W, T> for Verner9where
Y: Differentiate<T> + Tensor,
Z: PartialEq + Tensor,
Derivative<Y, T>: Mul<Quantity<T>, Output = Y>,
U: TensorVec<Item = Y>,
V: TensorVec<Item = Z>,
W: TensorVec<Item = Derivative<Y, T>>,
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>,
impl<Y, Z, U, V, W, T> ExplicitDaeVariableStepExplicit<Y, Z, U, V, W, T> for Verner9where
Y: Differentiate<T> + Tensor,
Z: PartialEq + Tensor,
Derivative<Y, T>: Mul<Quantity<T>, Output = Y>,
U: TensorVec<Item = Y>,
V: TensorVec<Item = Z>,
W: TensorVec<Item = Derivative<Y, T>>,
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>,
fn integrate_explicit_dae_variable_step( &self, evolution: impl FnMut(Quantity<T>, &Y, &Z) -> Result<Derivative<Y, T>, String>, solution: impl FnMut(Quantity<T>, &Y, &Z) -> Result<Z, String>, time: &[Quantity<T>], initial_condition: (Y, Z), ) -> Result<(Times<T>, U, W, V), IntegrationError>
fn interpolate_explicit_dae_variable_step( &self, evolution: impl FnMut(Quantity<T>, &Y, &Z) -> Result<Derivative<Y, T>, String>, solution: impl FnMut(Quantity<T>, &Y, &Z) -> Result<Z, String>, time: &Times<T>, tp: &Times<T>, yp: &U, _dydtp: &W, _k_sol: &[W], zp: &V, ) -> Result<(U, W, V), IntegrationError>
Source§fn slopes_solve(
evolution: impl FnMut(Quantity<T>, &Y, &Z) -> Result<Derivative<Y, T>, String>,
solution: impl FnMut(Quantity<T>, &Y, &Z) -> Result<Z, String>,
y: &Y,
z: &Z,
t: Quantity<T>,
dt: Quantity<T>,
k: &mut [Derivative<Y, T>],
y_trial: &mut Y,
z_trial: &mut Z,
) -> Result<(), String>
fn slopes_solve( evolution: impl FnMut(Quantity<T>, &Y, &Z) -> Result<Derivative<Y, T>, String>, solution: impl FnMut(Quantity<T>, &Y, &Z) -> Result<Z, String>, y: &Y, z: &Z, t: Quantity<T>, dt: Quantity<T>, k: &mut [Derivative<Y, T>], y_trial: &mut Y, z_trial: &mut Z, ) -> Result<(), String>
VariableStepExplicit::slopes with the algebraic constraint resolved before each stage.fn slopes_solve_and_error( &self, evolution: impl FnMut(Quantity<T>, &Y, &Z) -> Result<Derivative<Y, T>, String>, solution: impl FnMut(Quantity<T>, &Y, &Z) -> Result<Z, String>, y: &Y, z: &Z, t: Quantity<T>, dt: Quantity<T>, k: &mut [Derivative<Y, T>], y_trial: &mut Y, z_trial: &mut Z, ) -> Result<Scalar, String>
fn step_solve( &self, evolution: impl FnMut(Quantity<T>, &Y, &Z) -> Result<Derivative<Y, T>, String>, y: &mut Y, z: &mut Z, t: &mut Quantity<T>, y_sol: &mut U, z_sol: &mut V, t_sol: &mut Times<T>, dydt_sol: &mut W, k_sol: &mut Vec<W>, dt: &mut Quantity<T>, k: &mut [Derivative<Y, T>], y_trial: &Y, z_trial: &Z, e: Scalar, ) -> Result<(), String>
Source§impl<Y, U, V, T> InterpolateSolution<Y, U, V, T> for Verner9where
Y: Differentiate<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>>,
impl<Y, U, V, T> InterpolateSolution<Y, U, V, T> for Verner9where
Y: Differentiate<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>>,
impl<Y, U> OdeIntegrator<Y, U> for Verner9
Source§impl<T> VariableStep<T> for Verner9
impl<T> VariableStep<T> for Verner9
Source§fn error_norm(&self) -> &Norm
fn error_norm(&self) -> &Norm
Returns the norm type for error evaluation.
Source§impl<Y, U, V, T> VariableStepExplicit<Y, U, V, T> for Verner9where
Self: Explicit<Y, U, V, T>,
Y: Differentiate<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>>,
impl<Y, U, V, T> VariableStepExplicit<Y, U, V, T> for Verner9where
Self: Explicit<Y, U, V, T>,
Y: Differentiate<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>>,
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>
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>
Source§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 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. Read more
Source§fn 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. Read more
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>
Auto Trait Implementations§
impl Freeze for Verner9
impl RefUnwindSafe for Verner9
impl Send for Verner9
impl Sync for Verner9
impl Unpin for Verner9
impl UnsafeUnpin for Verner9
impl UnwindSafe for Verner9
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more