|
ccgsl 2.7.2
C++wrappersforGnuScientificLibrary
|
Adaptive step size control. More...
#include <odeiv2.hpp>

Public Types | |
| typedef gsl_odeiv2_control_type | type |
| Convenience typedef. More... | |
Public Member Functions | |
| control () | |
| The default constructor is only really useful for assigning to. More... | |
| control (type const *T) | |
| The constructor creates a new control of type T. More... | |
| control (gsl_odeiv2_control *v) | |
| Could construct from a gsl_odeiv2_control. More... | |
| control (control const &v) | |
| The copy constructor. More... | |
| control & | operator= (control const &v) |
| The assignment operator. More... | |
| ~control () | |
| The destructor only deletes the pointers if count reaches zero. More... | |
| control (control &&v) | |
| Move constructor. More... | |
| control & | operator= (control &&v) |
| Move operator. More... | |
| bool | operator== (control const &v) const |
| Two control are identically equal if their elements are identical. More... | |
| bool | operator!= (control const &v) const |
| Two control are different if their elements are not identical. More... | |
| bool | operator< (control const &v) const |
| A container needs to define an ordering for sorting. More... | |
| bool | operator> (control const &v) const |
| A container needs to define an ordering for sorting. More... | |
| bool | operator<= (control const &v) const |
| A container needs to define an ordering for sorting. More... | |
| bool | operator>= (control const &v) const |
| A container needs to define an ordering for sorting. More... | |
| bool | empty () const |
| Find if the control is empty. More... | |
| void | swap (control &v) |
| Swap two control objects. More... | |
| gsl_odeiv2_control * | get () const |
| Get the gsl_odeiv2_control. More... | |
| bool | unique () const |
| Find if this is the only object sharing the gsl_odeiv2_control. More... | |
| size_t | use_count () const |
| Find how many control objects share this pointer. More... | |
| operator bool () const | |
| Allow conversion to bool. More... | |
| int | init (double eps_abs, double eps_rel, double a_y, double a_dydt) |
| C++ version of gsl_odeiv2_control_init(). More... | |
| int | hadjust (step &s, double const y[], double const yerr[], double const dydt[], double *h) |
| C++ version of gsl_odeiv2_control_hadjust(). More... | |
| template<typename Y , typename YERR , typename DYDT > | |
| int | hadjust (step &s, Y const &y, YERR const &yerr, DYDT const &dydt, double &h) |
| C++ version of gsl_odeiv2_control_hadjust(). More... | |
| char const * | name () const |
| C++ version of gsl_odeiv2_control_name(). More... | |
| int | errlevel (double const y, double const dydt, double const h, size_t const ind, double &errlev) |
| C++ version of gsl_odeiv2_control_errlevel(). More... | |
| int | set_driver (driver const &d) |
| C++ version of gsl_odeiv2_control_set_driver(). More... | |
Static Public Member Functions | |
| static control | standard_new (double eps_abs, double eps_rel, double a_y, double a_dydt) |
| C++ version of gsl_odeiv2_control_standard_new(). More... | |
| static control | y_new (double eps_abs, double eps_rel) |
| C++ version of gsl_odeiv2_control_y_new(). More... | |
| static control | yp_new (double eps_abs, double eps_rel) |
| C++ version of gsl_odeiv2_control_yp_new(). More... | |
| template<typename SCALE_ABS > | |
| static control | scaled_new (double eps_abs, double eps_rel, double a_y, double a_dydt, SCALE_ABS const &scale_abs) |
| C++ version of gsl_odeiv2_control_scaled_new(). More... | |
Private Attributes | |
| gsl_odeiv2_control * | ccgsl_pointer |
| The shared pointer. More... | |
| size_t * | count |
| The shared reference count. More... | |
Adaptive step size control.
Definition at line 411 of file odeiv2.hpp.
| typedef gsl_odeiv2_control_type gsl::odeiv2::control::type |
Convenience typedef.
Definition at line 416 of file odeiv2.hpp.
|
inline |
The default constructor is only really useful for assigning to.
Definition at line 420 of file odeiv2.hpp.
References ccgsl_pointer, and count.
Referenced by operator=(), scaled_new(), standard_new(), y_new(), and yp_new().
|
inlineexplicit |
The constructor creates a new control of type T.
The four static constructors are more useful if you have not defined a type.
| T | The type |
Definition at line 431 of file odeiv2.hpp.
References ccgsl_pointer, and count.
|
inlineexplicit |
Could construct from a gsl_odeiv2_control.
This is not usually a good idea. In this case we should not use gsl_odeiv2_control_free() to deallocate the memory.
| v | The control |
Definition at line 447 of file odeiv2.hpp.
References ccgsl_pointer, and count.
|
inline |
The copy constructor.
This creates a new reference to the workspace.
| v | The control to copy. |
Definition at line 458 of file odeiv2.hpp.
References ccgsl_pointer, and count.
|
inline |
The destructor only deletes the pointers if count reaches zero.
Definition at line 477 of file odeiv2.hpp.
References ccgsl_pointer, and count.
|
inline |
Move constructor.
| v | The control to move. |
Definition at line 489 of file odeiv2.hpp.
References count.
|
inline |
Find if the control is empty.
true if has size zero; otherwise false Definition at line 566 of file odeiv2.hpp.
References ccgsl_pointer.
|
inline |
C++ version of gsl_odeiv2_control_errlevel().
| y | The current value of y |
| dydt | The current value of dydt |
| h | The current step size |
| ind | The index |
| errlev | The desired error level (return value) |
Definition at line 684 of file odeiv2.hpp.
References get().
|
inline |
Get the gsl_odeiv2_control.
Definition at line 592 of file odeiv2.hpp.
References ccgsl_pointer.
Referenced by gsl::odeiv2::evolve::apply(), gsl::odeiv2::evolve::apply_fixed_step(), errlevel(), hadjust(), init(), name(), and set_driver().
|
inline |
C++ version of gsl_odeiv2_control_hadjust().
| s | The step |
| y[] | Current value of y |
| yerr[] | Current value of yerr |
| dydt[] | Current value of dydt |
| h | Step size (return value) |
Definition at line 636 of file odeiv2.hpp.
References gsl::odeiv2::step::get(), and get().
|
inline |
C++ version of gsl_odeiv2_control_hadjust().
This version allows arrays as gsl::vector objects (or std::vector<double>).
| s | The step |
| y | Current value of y |
| yerr | Current value of yerr |
| dydt | Current value of dydt |
| h | Step size (return value) |
Definition at line 651 of file odeiv2.hpp.
References gsl::odeiv2::step::get(), and get().
|
inline |
C++ version of gsl_odeiv2_control_init().
| eps_abs | Absolute error |
| eps_rel | Relative error |
| a_y | Scaling factor for y |
| a_dydt | Scaling factor for dydt |
Definition at line 623 of file odeiv2.hpp.
References get().
|
inline |
C++ version of gsl_odeiv2_control_name().
Definition at line 659 of file odeiv2.hpp.
References get().
|
inlineexplicit |
Allow conversion to bool.
true or false according as this contains a pointer to a gsl_odeiv2_control. Definition at line 612 of file odeiv2.hpp.
References ccgsl_pointer.
|
inline |
Two control are different if their elements are not identical.
| v | The control to be compared with this |
false or true according as this and v have identical elements or not Definition at line 519 of file odeiv2.hpp.
References operator==().
|
inline |
A container needs to define an ordering for sorting.
This uses standard lexicographical ordering and so is not useful, for example, for checking, that a control is nonnegative.
| v | The control to be compared with this |
false or true according as this is less than v lexicographically Definition at line 531 of file odeiv2.hpp.
References ccgsl_pointer.
|
inline |
A container needs to define an ordering for sorting.
This uses standard lexicographical ordering and so is not useful, for example, for checking, that a control is nonnegative.
| v | The control to be compared with this |
false or true according as this is less than or equal to v lexicographically Definition at line 551 of file odeiv2.hpp.
References ccgsl_pointer.
Move operator.
| v | The control to move. |
Definition at line 498 of file odeiv2.hpp.
References control().
The assignment operator.
This copies elementwise.
| v | The control to copy |
Definition at line 465 of file odeiv2.hpp.
References ccgsl_pointer, and count.
|
inline |
Two control are identically equal if their elements are identical.
| v | The control to be compared with this |
true or false according as this and v have identical elements or not Definition at line 511 of file odeiv2.hpp.
References ccgsl_pointer.
Referenced by operator!=().
|
inline |
A container needs to define an ordering for sorting.
This uses standard lexicographical ordering and so is not useful, for example, for checking, that a control is nonnegative.
| v | The control to be compared with this |
false or true according as this is greater than v lexicographically Definition at line 541 of file odeiv2.hpp.
References ccgsl_pointer.
|
inline |
A container needs to define an ordering for sorting.
This uses standard lexicographical ordering and so is not useful, for example, for checking, that a control is nonnegative.
| v | The control to be compared with this |
false or true according as this is no less than v lexicographically Definition at line 561 of file odeiv2.hpp.
References ccgsl_pointer.
|
inlinestatic |
C++ version of gsl_odeiv2_control_scaled_new().
This version allows scale_abs to be gsl::vector or anything for which scale_abs.data() returns an array of doubles.
| eps_abs | Absolute error |
| eps_rel | Relative error |
| a_y | Scaling factor for y |
| a_dydt | Scaling factor for dydt |
| scale_abs | An array of scales for absolute error |
Definition at line 754 of file odeiv2.hpp.
References control().
|
inline |
C++ version of gsl_odeiv2_control_set_driver().
| d | The driver |
Definition at line 1408 of file odeiv2.hpp.
References get(), and gsl::odeiv2::driver::get().
|
inlinestatic |
C++ version of gsl_odeiv2_control_standard_new().
| eps_abs | Absolute error |
| eps_rel | Relative error |
| a_y | Scaling factor for y |
| a_dydt | Scaling factor for dydt |
Definition at line 704 of file odeiv2.hpp.
References control().
|
inline |
Swap two control objects.
This works even if the control have different sizes because it swaps pointers.
| v | The control to swap with this. |
Definition at line 573 of file odeiv2.hpp.
References ccgsl_pointer, and count.
|
inline |
Find if this is the only object sharing the gsl_odeiv2_control.
true or falses according as this is the only control object sharing the gsl_odeiv2_control. Definition at line 598 of file odeiv2.hpp.
References count.
|
inline |
Find how many control objects share this pointer.
Definition at line 603 of file odeiv2.hpp.
References count.
|
inlinestatic |
C++ version of gsl_odeiv2_control_y_new().
| eps_abs | Absolute error |
| eps_rel | Relative error |
Definition at line 714 of file odeiv2.hpp.
References control().
|
inlinestatic |
C++ version of gsl_odeiv2_control_yp_new().
| eps_abs | Absolute error |
| eps_rel | Relative error |
Definition at line 723 of file odeiv2.hpp.
References control().
|
private |
The shared pointer.
Definition at line 581 of file odeiv2.hpp.
Referenced by control(), empty(), get(), operator bool(), operator<(), operator<=(), operator=(), operator==(), operator>(), operator>=(), swap(), and ~control().
|
private |
The shared reference count.
Definition at line 585 of file odeiv2.hpp.
Referenced by control(), operator=(), swap(), unique(), use_count(), and ~control().