Trait freude::Stepper
[−]
[src]
pub trait Stepper { type State: Clone; fn do_step<Sy>(&mut self, _: &mut Sy, _: &mut Self::State)
where
Sy: Ode<State = Self::State>; fn timestep(&self) -> f64; fn integrate_n_steps<Sy>(
&mut self,
system: &mut Sy,
state: &mut Self::State,
n: usize
) -> f64
where
Sy: Ode<State = Self::State>, { ... } fn integrate_time<Sy>(
&mut self,
system: &mut Sy,
state: &mut Self::State,
t: f64
) -> (f64, usize)
where
Sy: Ode<State = Self::State>, { ... } }
A trait defining the interface of an integration method.
Associated Types
Required Methods
fn do_step<Sy>(&mut self, _: &mut Sy, _: &mut Self::State) where
Sy: Ode<State = Self::State>,
Sy: Ode<State = Self::State>,
fn timestep(&self) -> f64
Provided Methods
fn integrate_n_steps<Sy>(
&mut self,
system: &mut Sy,
state: &mut Self::State,
n: usize
) -> f64 where
Sy: Ode<State = Self::State>,
&mut self,
system: &mut Sy,
state: &mut Self::State,
n: usize
) -> f64 where
Sy: Ode<State = Self::State>,
fn integrate_time<Sy>(
&mut self,
system: &mut Sy,
state: &mut Self::State,
t: f64
) -> (f64, usize) where
Sy: Ode<State = Self::State>,
&mut self,
system: &mut Sy,
state: &mut Self::State,
t: f64
) -> (f64, usize) where
Sy: Ode<State = Self::State>,
Implementors
impl Stepper for Euler<f64> type State = f64;
impl<D, P: ZipMarker> Stepper for Euler<P> where
P: Clone,
D: Dimension,
&'a P: IntoNdProducer<Dim = D, Item = &'a f64>,
&'a mut P: IntoNdProducer<Dim = D, Item = &'a mut f64>, type State = P;impl Stepper for Heun<f64> type State = f64;
impl<D, P: ZipMarker> Stepper for Heun<P> where
P: Clone,
D: Dimension,
&'a P: IntoNdProducer<Dim = D, Item = &'a f64>,
&'a mut P: IntoNdProducer<Dim = D, Item = &'a mut f64>, type State = P;impl Stepper for RungeKutta4<f64> type State = f64;
impl<D, P: ZipMarker> Stepper for RungeKutta4<P> where
P: Clone,
D: Dimension,
&'a P: IntoNdProducer<Dim = D, Item = &'a f64>,
&'a mut P: IntoNdProducer<Dim = D, Item = &'a mut f64>, type State = P;