Struct rgsl::types::ordinary_differential_equations::ODEiv2Evolve [] [src]

pub struct ODEiv2Evolve { /* fields omitted */ }

Methods

impl ODEiv2Evolve
[src]

This function returns a pointer to a newly allocated instance of an evolution function for a system of dim dimensions.

This function advances the system (e, sys) from time t and position y using the stepping function step. The new time and position are stored in t and y on output.

The initial step-size is taken as h. The control function con is applied to check whether the local error estimated by the stepping function step using step-size h exceeds the required error tolerance. If the error is too high, the step is retried by calling step with a decreased step-size. This process is continued until an acceptable step-size is found. An estimate of the local error for the step can be obtained from the components of the array e->yerr[].

If the user-supplied functions defined in the system sys returns enums::value::BadFunc, the function returns immediately with the same return code. In this case the user must call gsl_odeiv2_step_reset and gsl_odeiv2_evolve_reset before calling this function again.

Otherwise, if the user-supplied functions defined in the system sys or the stepping function step return a status other than ::Value::Success, the step is retried with a decreased step-size. If the step-size decreases below machine precision, a status of ::Failuer is returned if the user functions returned ::Value::Success. Otherwise the value returned by user function is returned. If no acceptable step can be made, t and y will be restored to their pre-step values and h contains the final attempted step-size.

If the step is successful the function returns a suggested step-size for the next step in h. The maximum time t1 is guaranteed not to be exceeded by the time-step. On the final time-step the value of t will be set to t1 exactly.

This function advances the ODE-system (e, sys, con) from time t and position y using the stepping function step by a specified step size h. If the local error estimated by the stepping function exceeds the desired error level, the step is not taken and the function returns enums::value::Failure. Otherwise the value returned by user function is returned.

This function resets the evolution function e. It should be used whenever the next use of e will not be a continuation of a previous step.

This function sets a pointer of the driver object d for evolve object e.

If a system has discontinuous changes in the derivatives at known points, it is advisable to evolve the system between each discontinuity in sequence. For example, if a step-change in an external driving force occurs at times t_a, t_b and t_c then evolution should be carried out over the ranges (t_0,t_a), (t_a,t_b), (t_b,t_c), and (t_c,t_1) separately and not directly over the range (t_0,t_1).

Trait Implementations

impl Drop for ODEiv2Evolve
[src]

A method called when the value goes out of scope. Read more