pub trait DDENumericalMethod<const L: usize, T, V, H, D = String>{
// Required methods
fn init<F>(
&mut self,
dde: &F,
t0: T,
tf: T,
y0: &V,
phi: H,
) -> Result<Evals, Error<T, V>>
where F: DDE<L, T, V, D>;
fn step<F>(&mut self, dde: &F) -> Result<Evals, Error<T, V>>
where F: DDE<L, 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
DDENumericalMethod Trait for DDE NumericalMethods
DDE NumericalMethods implement this trait to solve delay differential equations.
The step function is called iteratively by a solver function (like solve_dde)
to advance the solution.
Required Methods§
Sourcefn init<F>(
&mut self,
dde: &F,
t0: T,
tf: T,
y0: &V,
phi: H,
) -> Result<Evals, Error<T, V>>where
F: DDE<L, T, V, D>,
fn init<F>(
&mut self,
dde: &F,
t0: T,
tf: T,
y0: &V,
phi: H,
) -> Result<Evals, Error<T, V>>where
F: DDE<L, T, V, D>,
Initialize DDENumericalMethod before solving DDE.
§Arguments
dde- System of DDEs to solve.t0- Initial time.tf- Final time.y0- Initial state att0.phi- Initial history functionphi(t)returning stateVfort <= t0.
§Returns
- Result<NumEvals, Error<T, V>> - Ok(evals) if initialization is successful, Err otherwise.
Sourcefn status(&self) -> &Status<T, V, D>
fn status(&self) -> &Status<T, V, D>
Get the current status of the solver (Solving, Complete, Error, etc.).
Sourcefn set_status(&mut self, status: Status<T, V, D>)
fn set_status(&mut self, status: Status<T, V, D>)
Set the status of the 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.