pub trait ODENumericalMethod<T, V, D = String>{
// Required methods
fn init<F>(
&mut self,
ode: &F,
t0: T,
tf: T,
y: &V,
) -> Result<Evals, Error<T, V>>
where F: ODE<T, V, D>;
fn step<F>(&mut self, ode: &F) -> Result<Evals, Error<T, V>>
where F: ODE<T, V, D>;
fn t(&self) -> T;
fn y(&self) -> &V;
fn t_prev(&self) -> T;
fn y_prev(&self) -> &V;
fn h(&self) -> T;
fn set_h(&mut self, h: T);
fn status(&self) -> &Status<T, V, D>;
fn set_status(&mut self, status: Status<T, V, D>);
}Expand description
ODENumericalMethod Trait for ODE NumericalMethods
ODE NumericalMethods implement this trait to solve ordinary differential equations. This step function is called iteratively to solve the ODE. By implementing this trait, different functions can use a user provided ODE solver to solve the ODE that fits their requirements.
Required Methods§
Sourcefn init<F>(
&mut self,
ode: &F,
t0: T,
tf: T,
y: &V,
) -> Result<Evals, Error<T, V>>where
F: ODE<T, V, D>,
fn init<F>(
&mut self,
ode: &F,
t0: T,
tf: T,
y: &V,
) -> Result<Evals, Error<T, V>>where
F: ODE<T, V, D>,
Sourcefn set_status(&mut self, status: Status<T, V, D>)
fn set_status(&mut self, status: Status<T, V, D>)
Set status of solver
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.