Trait SolverVariantMethods

Source
pub trait SolverVariantMethods: SolverBase {
    // Provided methods
    fn euler(&mut self, dt: &f64) { ... }
    fn heun(&mut self, dt: &f64) { ... }
    fn midpoint(&mut self, dt: &f64) { ... }
    fn ralston(&mut self, dt: &f64) { ... }
    fn rk23_bogacki_shampine(&mut self, dt_max: &f64) -> f64 { ... }
    fn rk23_bogacki_shampine_step(&mut self, dt: f64) -> (Vec<f64>, Vec<f64>) { ... }
    fn rk4fixed(&mut self, dt: &f64) { ... }
    fn rk45_cash_karp(&mut self, dt_max: &f64) -> f64 { ... }
    fn rk45_cash_karp_step(&mut self, dt: f64) -> (Vec<f64>, Vec<f64>) { ... }
}

Provided Methods§

Source

fn euler(&mut self, dt: &f64)

Steps forward by dt

Source

fn heun(&mut self, dt: &f64)

Heun’s Method (starts out with Euler’s method but adds an extra step) See Heun’s Method (the first listed Heun’s method, not the one also known as Ralston’s Method): https://en.wikipedia.org/wiki/Heun%27s_method

Source

fn midpoint(&mut self, dt: &f64)

Midpoint Method See: https://en.wikipedia.org/wiki/Midpoint_method

Source

fn ralston(&mut self, dt: &f64)

Ralston’s Method See Ralston’s Method: https://en.wikipedia.org/wiki/List_of_Runge%E2%80%93Kutta_methods#Ralston.27s_method

Source

fn rk23_bogacki_shampine(&mut self, dt_max: &f64) -> f64

solves time step with adaptive Bogacki Shampine Method (variant of RK23) and returns ‘dt’ used see: https://en.wikipedia.org/wiki/Bogacki%E2%80%93Shampine_method

Source

fn rk23_bogacki_shampine_step(&mut self, dt: f64) -> (Vec<f64>, Vec<f64>)

Source

fn rk4fixed(&mut self, dt: &f64)

solves time step with 4th order Runge-Kutta method. See RK4 method: https://en.wikipedia.org/wiki/Runge%E2%80%93Kutta_methods#Examples

Source

fn rk45_cash_karp(&mut self, dt_max: &f64) -> f64

solves time step with adaptive Cash-Karp Method (variant of RK45) and returns dt used https://en.wikipedia.org/wiki/Cash%E2%80%93Karp_method

Source

fn rk45_cash_karp_step(&mut self, dt: f64) -> (Vec<f64>, Vec<f64>)

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§