pub struct ODEiv2Driver<'a> { /* private fields */ }

Implementations§

source§

impl<'a> ODEiv2Driver<'a>

source

pub fn alloc_y_new( sys: &'a mut ODEiv2System<'_>, t: &ODEiv2StepType, hstart: f64, epsabs: f64, epsrel: f64 ) -> Option<ODEiv2Driver<'a>>

These functions return a pointer to a newly allocated instance of a driver object. The functions automatically allocate and initialise the evolve, control and stepper objects for ODE system sys using stepper type T. The initial step size is given in hstart. The rest of the arguments follow the syntax and semantics of the control functions with same name (gsl_odeiv2_control_*_new).

source

pub fn alloc_yp_new( sys: &'a mut ODEiv2System<'_>, t: &ODEiv2StepType, hstart: f64, epsabs: f64, epsrel: f64 ) -> Option<ODEiv2Driver<'a>>

These functions return a pointer to a newly allocated instance of a driver object. The functions automatically allocate and initialise the evolve, control and stepper objects for ODE system sys using stepper type T. The initial step size is given in hstart. The rest of the arguments follow the syntax and semantics of the control functions with same name (gsl_odeiv2_control_*_new).

source

pub fn alloc_standard_new( sys: &'a mut ODEiv2System<'_>, t: &ODEiv2StepType, hstart: f64, epsabs: f64, epsrel: f64, a_y: f64, a_dydt: f64 ) -> Option<ODEiv2Driver<'a>>

These functions return a pointer to a newly allocated instance of a driver object. The functions automatically allocate and initialise the evolve, control and stepper objects for ODE system sys using stepper type T. The initial step size is given in hstart. The rest of the arguments follow the syntax and semantics of the control functions with same name (gsl_odeiv2_control_*_new).

source

pub fn alloc_scaled_new( sys: &'a mut ODEiv2System<'_>, t: &ODEiv2StepType, hstart: f64, epsabs: f64, epsrel: f64, a_y: f64, a_dydt: f64, scale_abs: &[f64] ) -> Option<ODEiv2Driver<'a>>

These functions return a pointer to a newly allocated instance of a driver object. The functions automatically allocate and initialise the evolve, control and stepper objects for ODE system sys using stepper type T. The initial step size is given in hstart. The rest of the arguments follow the syntax and semantics of the control functions with same name (gsl_odeiv2_control_*_new).

source

pub fn set_hmin(&mut self, hmin: f64) -> Result<(), Value>

The function sets a minimum for allowed step size hmin for driver self. Default value is 0.

source

pub fn set_hmax(&mut self, hmax: f64) -> Result<(), Value>

The function sets a maximum for allowed step size hmax for driver self. Default value is ::DBL_MAX.

source

pub fn set_nmax(&mut self, nmax: usize) -> Result<(), Value>

The function sets a maximum for allowed number of steps nmax for driver self. Default value of 0 sets no limit for steps.

source

pub fn apply( &mut self, t: &mut f64, t1: f64, y: &mut [f64] ) -> Result<(), Value>

This function evolves the driver system d from t to t1. Initially vector y should contain the values of dependent variables at point t. If the function is unable to complete the calculation, an error code from gsl_odeiv2_evolve_apply is returned, and t and y contain the values from last successful step.

If maximum number of steps is reached, a value of Value::MaxIteration is returned. If the step size drops below minimum value, the function returns with ::NoProg. If the user-supplied functions defined in the system sys returns Value::BadFunc, the function returns immediately with the same return code. In this case the user must call gsl_odeiv2_driver_reset before calling this function again.

source

pub fn apply_fixed_step( &mut self, t: &mut f64, h: f64, n: usize, y: &mut [f64] ) -> Result<(), Value>

This function evolves the driver system d from t with n steps of size h. If the function is unable to complete the calculation, an error code from gsl_odeiv2_evolve_apply_fixed_step is returned, and t and y contain the values from last successful step.

source

pub fn reset(&mut self) -> Result<(), Value>

This function resets the evolution and stepper objects.

source

pub fn reset_hstart(&mut self, hstart: f64) -> Result<(), Value>

The routine resets the evolution and stepper objects and sets new initial step size to hstart. This function can be used e.g. to change the direction of integration.

Trait Implementations§

source§

impl<'a> Drop for ODEiv2Driver<'a>

source§

fn drop(&mut self)

Executes the destructor for this type. Read more

Auto Trait Implementations§

§

impl<'a> !RefUnwindSafe for ODEiv2Driver<'a>

§

impl<'a> !Send for ODEiv2Driver<'a>

§

impl<'a> !Sync for ODEiv2Driver<'a>

§

impl<'a> Unpin for ODEiv2Driver<'a>

§

impl<'a> !UnwindSafe for ODEiv2Driver<'a>

Blanket Implementations§

source§

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

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

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

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for Twhere 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 Twhere 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, U> TryFrom<U> for Twhere U: Into<T>,

§

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 Twhere U: TryFrom<T>,

§

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.