ccgsl 2.7.2
C++wrappersforGnuScientificLibrary
gsl::odeiv2::system::Concept Struct Referenceabstract

This is an empty base class. More...

#include <odeiv2_system.hpp>

Collaboration diagram for gsl::odeiv2::system::Concept:
Collaboration graph

Public Member Functions

template<typename T >
int function (double const t, T const &y, T &dydt)
 The function that stores dydt given y and t. More...
 
template<typename T , typename U >
int jacobian (double const t, T const &, U &dfdy, T &dfdt)
 As function but also store Jacobian in dfdy. More...
 
virtual size_t size () const =0
 The dimension of the function arguments. More...
 

Detailed Description

This is an empty base class.

Its main purpose is to define the Concept of a class whose objects can be used to construct a system object. Any class that implements function() and size() with suitable T can be used in the constructor of system. If a class is derived from gsl::odeiv2::system::Concept, the compiler is likely to give better warnings if one of the required functions is not implemented correctly.

Definition at line 75 of file odeiv2_system.hpp.

Member Function Documentation

◆ function()

template<typename T >
int gsl::odeiv2::system::Concept::function ( double const  t,
T const &  y,
T &  dydt 
)

The function that stores dydt given y and t.

T may be double* or gsl::vector. U may be * double* or gsl::vector.

Parameters
tThe first (time) paramter
yThe second (y) paramter
dydtThe derivatives of y with respect to t
Returns
GSL_SUCCESS on success; otherwise GSL_EBADFUNC

◆ jacobian()

template<typename T , typename U >
int gsl::odeiv2::system::Concept::jacobian ( double const  t,
T const &  ,
U &  dfdy,
T &  dfdt 
)
inline

As function but also store Jacobian in dfdy.

It is not necessary to supply this function for all ode methods. T may be double* or gsl::vector. U may be double*, gsl::vector or gsl::matrix.

Parameters
tThe first (time) paramter
dfdyThe derivatives of f with respect to y
dfdtThe derivatives of f with respect to t
Returns
GSL_SUCCESS on success; otherwise GSL_EBADFUNC

Definition at line 96 of file odeiv2_system.hpp.

References gsl::exception::GSL_SUCCESS.

◆ size()

virtual size_t gsl::odeiv2::system::Concept::size ( ) const
pure virtual

The dimension of the function arguments.

Returns
The dimension (number of elements) of y, dydt and dfdy

The documentation for this struct was generated from the following file: