Struct Dopri5

Source
pub struct Dopri5<T, V, F>
where T: FloatNumber, F: System<T, V>,
{ /* private fields */ }
Expand description

Structure containing the parameters for the numerical integration.

Implementations§

Source§

impl<T, D: Dim, F> Dopri5<T, OVector<T, D>, F>
where f64: From<T>, T: FloatNumber, F: System<T, OVector<T, D>>, OVector<T, D>: Mul<T, Output = OVector<T, D>>, DefaultAllocator: Allocator<D>,

Source

pub fn new( f: F, x: T, x_end: T, dx: T, y: OVector<T, D>, rtol: T, atol: T, ) -> Self

Default initializer for the structure

§Arguments
  • f - Structure implementing the System trait
  • x - Initial value of the independent variable (usually time)
  • x_end - Final value of the independent variable
  • dx - Increment in the dense output. This argument has no effect if the output type is Sparse
  • y - Initial value of the dependent variable(s)
  • rtol - Relative tolerance used in the computation of the adaptive step size
  • atol - Absolute tolerance used in the computation of the adaptive step size
Source

pub fn from_param( f: F, x: T, x_end: T, dx: T, y: OVector<T, D>, rtol: T, atol: T, safety_factor: T, beta: T, fac_min: T, fac_max: T, h_max: T, h: T, n_max: u32, n_stiff: u32, out_type: OutputType, ) -> Self

Advanced initializer for the structure.

§Arguments
  • f - Structure implementing the System trait
  • x - Initial value of the independent variable (usually time)
  • x_end - Final value of the independent variable
  • dx - Increment in the dense output. This argument has no effect if the output type is Sparse
  • y - Initial value of the dependent variable(s)
  • rtol - Relative tolerance used in the computation of the adaptive step size
  • atol - Absolute tolerance used in the computation of the adaptive step size
  • safety_factor - Safety factor used in the computation of the adaptive step size
  • beta - Value of the beta coefficient of the PI controller. Default is 0.04
  • fac_min - Minimum factor between two successive steps. Default is 0.2
  • fac_max - Maximum factor between two successive steps. Default is 10.0
  • h_max - Maximum step size. Default is x_end-x
  • h - Initial value of the step size. If h = 0.0, the initial value of h is computed automatically
  • n_max - Maximum number of iterations. Default is 100000
  • n_stiff - Stiffness is tested when the number of iterations is a multiple of n_stiff. Default is 1000
  • out_type - Type of the output. Must be a variant of the OutputType enum. Default is Dense
Source

pub fn integrate_with_continuous_output_model( &mut self, continuous_output: &mut ContinuousOutputModel<T, OVector<T, D>>, ) -> Result<Stats, IntegrationError>

Integrates the system and builds a continuous output model.

Source

pub fn integrate(&mut self) -> Result<Stats, IntegrationError>

Integrates the system.

Source

pub fn x_out(&self) -> &Vec<T>

Getter for the independent variable’s output.

Source

pub fn y_out(&self) -> &Vec<OVector<T, D>>

Getter for the dependent variables’ output.

Source

pub fn results(&self) -> &SolverResult<T, OVector<T, D>>

Getter for the results type, a pair of independent and dependent variables

Trait Implementations§

Source§

impl<T, D: Dim, F> From<Dopri5<T, Matrix<T, D, Const<1>, <DefaultAllocator as Allocator<D>>::Buffer<T>>, F>> for SolverResult<T, OVector<T, D>>
where T: FloatNumber, F: System<T, OVector<T, D>>, DefaultAllocator: Allocator<D>,

Source§

fn from(val: Dopri5<T, OVector<T, D>, F>) -> Self

Converts to this type from the input type.

Auto Trait Implementations§

§

impl<T, V, F> Freeze for Dopri5<T, V, F>
where F: Freeze, T: Freeze, V: Freeze,

§

impl<T, V, F> RefUnwindSafe for Dopri5<T, V, F>

§

impl<T, V, F> Send for Dopri5<T, V, F>
where F: Send, T: Send, V: Send,

§

impl<T, V, F> Sync for Dopri5<T, V, F>
where F: Sync, T: Sync, V: Sync,

§

impl<T, V, F> Unpin for Dopri5<T, V, F>
where F: Unpin, T: Unpin, V: Unpin,

§

impl<T, V, F> UnwindSafe for Dopri5<T, V, F>
where F: UnwindSafe, T: UnwindSafe, V: UnwindSafe,

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<SS, SP> SupersetOf<SS> for SP
where SS: SubsetOf<SP>,

Source§

fn to_subset(&self) -> Option<SS>

The inverse inclusion map: attempts to construct self from the equivalent element of its superset. Read more
Source§

fn is_in_subset(&self) -> bool

Checks if self is actually part of its subset T (and can be converted to it).
Source§

fn to_subset_unchecked(&self) -> SS

Use with care! Same as self.to_subset but without any property checks. Always succeeds.
Source§

fn from_subset(element: &SS) -> SP

The inclusion map: converts self to the equivalent element of its superset.
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.