Struct ode_solvers::dop853::Dop853
source · [−]pub struct Dop853<V, F> where
F: System<V>, { /* private fields */ }
Expand description
Structure containing the parameters for the numerical integration.
Implementations
sourceimpl<T, D: Dim, F> Dop853<OVector<T, D>, F> where
f64: From<T>,
T: Copy + SubsetOf<f64> + Scalar + ClosedAdd + ClosedMul + ClosedSub + Zero,
F: System<OVector<T, D>>,
DefaultAllocator: Allocator<T, D>,
impl<T, D: Dim, F> Dop853<OVector<T, D>, F> where
f64: From<T>,
T: Copy + SubsetOf<f64> + Scalar + ClosedAdd + ClosedMul + ClosedSub + Zero,
F: System<OVector<T, D>>,
DefaultAllocator: Allocator<T, D>,
sourcepub fn new(
f: F,
x: f64,
x_end: f64,
dx: f64,
y: OVector<T, D>,
rtol: f64,
atol: f64
) -> Self
pub fn new(
f: F,
x: f64,
x_end: f64,
dx: f64,
y: OVector<T, D>,
rtol: f64,
atol: f64
) -> Self
Default initializer for the structure.
Arguments
f
- Structure implementing the Systemtrait x
- Initial value of the independent variable (usually time)x_end
- Final value of the independent variabledx
- Increment in the dense output. This argument has no effect if the output type is Sparsey
- Initial value of the dependent variable(s)rtol
- Relative tolerance used in the computation of the adaptive step sizeatol
- Absolute tolerance used in the computation of the adaptive step size
sourcepub fn from_param(
f: F,
x: f64,
x_end: f64,
dx: f64,
y: OVector<T, D>,
rtol: f64,
atol: f64,
safety_factor: f64,
beta: f64,
fac_min: f64,
fac_max: f64,
h_max: f64,
h: f64,
n_max: u32,
n_stiff: u32,
out_type: OutputType
) -> Self
pub fn from_param(
f: F,
x: f64,
x_end: f64,
dx: f64,
y: OVector<T, D>,
rtol: f64,
atol: f64,
safety_factor: f64,
beta: f64,
fac_min: f64,
fac_max: f64,
h_max: f64,
h: f64,
n_max: u32,
n_stiff: u32,
out_type: OutputType
) -> Self
Advanced initializer for the structure.
Arguments
f
- Structure implementing the Systemtrait x
- Initial value of the independent variable (usually time)x_end
- Final value of the independent variabledx
- Increment in the dense output. This argument has no effect if the output type is Sparsey
- Initial value of the dependent variable(s)rtol
- Relative tolerance used in the computation of the adaptive step sizeatol
- Absolute tolerance used in the computation of the adaptive step sizesafety_factor
- Safety factor used in the computation of the adaptive step size. Default is 0.9beta
- Value of the beta coefficient of the PI controller. Default is 0.0fac_min
- Minimum factor between two successive steps. Default is 0.333fac_max
- Maximum factor between two successive steps. Default is 6.0h_max
- Maximum step size. Default is `x_end-xh
- Initial value of the step size. If h = 0.0, the intial value of h is computed automaticallyn_max
- Maximum number of iterations. Default is 100000n_stiff
- Stifness is tested when the number of iterations is a multiple of n_stiff. Default is 1000out_type
- Type of the output. Must be a variant of the OutputType enum. Default is Dense
sourcepub fn integrate(&mut self) -> Result<Stats, IntegrationError>
pub fn integrate(&mut self) -> Result<Stats, IntegrationError>
Core integration method.
Auto Trait Implementations
impl<V, F> RefUnwindSafe for Dop853<V, F> where
F: RefUnwindSafe,
V: RefUnwindSafe,
impl<V, F> Send for Dop853<V, F> where
F: Send,
V: Send,
impl<V, F> Sync for Dop853<V, F> where
F: Sync,
V: Sync,
impl<V, F> Unpin for Dop853<V, F> where
F: Unpin,
V: Unpin,
impl<V, F> UnwindSafe for Dop853<V, F> where
F: UnwindSafe,
V: UnwindSafe,
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
impl<T> Same<T> for T
impl<T> Same<T> for T
type Output = T
type Output = T
Should always be Self
sourceimpl<SS, SP> SupersetOf<SS> for SP where
SS: SubsetOf<SP>,
impl<SS, SP> SupersetOf<SS> for SP where
SS: SubsetOf<SP>,
sourcefn to_subset(&self) -> Option<SS>
fn to_subset(&self) -> Option<SS>
The inverse inclusion map: attempts to construct self
from the equivalent element of its
superset. Read more
sourcefn is_in_subset(&self) -> bool
fn is_in_subset(&self) -> bool
Checks if self
is actually part of its subset T
(and can be converted to it).
sourcefn to_subset_unchecked(&self) -> SS
fn to_subset_unchecked(&self) -> SS
Use with care! Same as self.to_subset
but without any property checks. Always succeeds.
sourcefn from_subset(element: &SS) -> SP
fn from_subset(element: &SS) -> SP
The inclusion map: converts self
to the equivalent element of its superset.