pub struct BogackiShampine {
pub abs_tol: Scalar,
pub rel_tol: Scalar,
pub dt_beta: Scalar,
pub dt_expn: Scalar,
pub dt_cut: Scalar,
pub dt_min: Scalar,
}Expand description
Explicit, three-stage, third-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)k_2 = f(t_n + \tfrac{1}{2} h, y_n + \tfrac{1}{2} h k_1)k_3 = f(t_n + \tfrac{3}{4} h, y_n + \tfrac{3}{4} h k_2)y_{n+1} = y_n + \frac{h}{9}\left(2k_1 + 3k_2 + 4k_3\right)k_4 = f(t_{n+1}, y_{n+1})e_{n+1} = \frac{h}{72}\left(-5k_1 + 6k_2 + 8k_3 - 9k_4\right)P. Bogacki and L.F. Shampine, Appl. Math. Lett. 2, 321 (1989). ↩
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.
Trait Implementations§
Source§impl Debug for BogackiShampine
impl Debug for BogackiShampine
Source§impl Default for BogackiShampine
impl Default for BogackiShampine
Source§impl<Y, Z, U, V> ExplicitDaeVariableStepExplicit<Y, Z, U, V> for BogackiShampine
impl<Y, Z, U, V> ExplicitDaeVariableStepExplicit<Y, Z, U, V> for BogackiShampine
fn slopes_solve( evolution: impl FnMut(Scalar, &Y, &Z) -> Result<Y, String>, solution: impl FnMut(Scalar, &Y, &Z) -> Result<Z, String>, y: &Y, z: &Z, t: Scalar, dt: Scalar, k: &mut [Y], y_trial: &mut Y, z_trial: &mut Z, ) -> Result<(), String>
fn slopes_solve_and_error( &self, evolution: impl FnMut(Scalar, &Y, &Z) -> Result<Y, String>, solution: impl FnMut(Scalar, &Y, &Z) -> Result<Z, String>, y: &Y, z: &Z, t: Scalar, dt: Scalar, k: &mut [Y], y_trial: &mut Y, z_trial: &mut Z, ) -> Result<Scalar, String>
fn step_solve( &self, _: impl FnMut(Scalar, &Y, &Z) -> Result<Y, String>, y: &mut Y, z: &mut Z, t: &mut Scalar, y_sol: &mut U, z_sol: &mut V, t_sol: &mut Vector, dydt_sol: &mut U, dt: &mut Scalar, k: &mut [Y], y_trial: &Y, z_trial: &Z, e: Scalar, ) -> Result<(), String>
fn integrate_explicit_dae_variable_step( &self, evolution: impl FnMut(Scalar, &Y, &Z) -> Result<Y, String>, solution: impl FnMut(Scalar, &Y, &Z) -> Result<Z, String>, time: &[Scalar], initial_condition: (Y, Z), ) -> Result<(Vector, U, U, V), IntegrationError>
fn interpolate_explicit_dae_variable_step( &self, evolution: impl FnMut(Scalar, &Y, &Z) -> Result<Y, String>, solution: impl FnMut(Scalar, &Y, &Z) -> Result<Z, String>, time: &Vector, tp: &Vector, yp: &U, zp: &V, ) -> Result<(U, U, V), IntegrationError>
Source§impl<Y, Z, U, V> ExplicitDaeVariableStepFirstSameAsLast<Y, Z, U, V> for BogackiShampine
impl<Y, Z, U, V> ExplicitDaeVariableStepFirstSameAsLast<Y, Z, U, V> for BogackiShampine
fn slopes_solve_and_error_fsal( evolution: impl FnMut(Scalar, &Y, &Z) -> Result<Y, String>, solution: impl FnMut(Scalar, &Y, &Z) -> Result<Z, String>, y: &Y, z: &Z, t: Scalar, dt: Scalar, k: &mut [Y], y_trial: &mut Y, z_trial: &mut Z, ) -> Result<Scalar, String>
fn step_solve_fsal( &self, y: &mut Y, z: &mut Z, t: &mut Scalar, y_sol: &mut U, z_sol: &mut V, t_sol: &mut Vector, dydt_sol: &mut U, dt: &mut Scalar, k: &mut [Y], y_trial: &Y, z_trial: &Z, e: Scalar, ) -> Result<(), String>
Source§impl<Y, U> InterpolateSolution<Y, U> for BogackiShampine
impl<Y, U> InterpolateSolution<Y, U> for BogackiShampine
Source§impl VariableStep for BogackiShampine
impl VariableStep for BogackiShampine
Source§impl<Y, U> VariableStepExplicit<Y, U> for BogackiShampine
impl<Y, U> VariableStepExplicit<Y, U> for BogackiShampine
fn error(dt: Scalar, k: &[Y]) -> Result<Scalar, String>
fn slopes( function: impl FnMut(Scalar, &Y) -> Result<Y, String>, y: &Y, t: Scalar, dt: Scalar, k: &mut [Y], y_trial: &mut Y, ) -> Result<(), String>
fn slopes_and_error( &self, function: impl FnMut(Scalar, &Y) -> Result<Y, String>, y: &Y, t: Scalar, dt: Scalar, k: &mut [Y], y_trial: &mut Y, ) -> Result<Scalar, String>
fn step( &self, _function: impl FnMut(Scalar, &Y) -> Result<Y, String>, y: &mut Y, t: &mut Scalar, y_sol: &mut U, t_sol: &mut Vector, dydt_sol: &mut U, dt: &mut Scalar, k: &mut [Y], y_trial: &Y, e: Scalar, ) -> Result<(), String>
fn integrate_variable_step( &self, function: impl FnMut(Scalar, &Y) -> Result<Y, String>, time: &[Scalar], initial_condition: Y, ) -> Result<(Vector, U, U), IntegrationError>
fn interpolate_variable_step( time: &Vector, tp: &Vector, yp: &U, function: impl FnMut(Scalar, &Y) -> Result<Y, String>, ) -> Result<(U, U), IntegrationError>
Source§impl<Y, U> VariableStepExplicitFirstSameAsLast<Y, U> for BogackiShampine
impl<Y, U> VariableStepExplicitFirstSameAsLast<Y, U> for BogackiShampine
fn slopes_and_error_fsal( function: impl FnMut(Scalar, &Y) -> Result<Y, String>, y: &Y, t: Scalar, dt: Scalar, k: &mut [Y], y_trial: &mut Y, ) -> Result<Scalar, String>
fn step_fsal( &self, y: &mut Y, t: &mut Scalar, y_sol: &mut U, t_sol: &mut Vector, dydt_sol: &mut U, dt: &mut Scalar, k: &mut [Y], y_trial: &Y, e: Scalar, ) -> Result<(), String>
impl<Y, U> OdeIntegrator<Y, U> for BogackiShampine
Auto Trait Implementations§
impl Freeze for BogackiShampine
impl RefUnwindSafe for BogackiShampine
impl Send for BogackiShampine
impl Sync for BogackiShampine
impl Unpin for BogackiShampine
impl UnwindSafe for BogackiShampine
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