![]() |
Stan Math Library
2.20.0
reverse mode automatic differentiation
|
coupled_ode_system
specialization for for known initial values and known parameters.
More...
#include <coupled_ode_system.hpp>
Public Member Functions | |
coupled_ode_system (const F &f, const std::vector< double > &y0, const std::vector< double > &theta, const std::vector< double > &x, const std::vector< int > &x_int, std::ostream *msgs) | |
Construct the coupled ode system from the base system function, initial state of the base system, parameters, data and a stream for messages. More... | |
void | operator() (const std::vector< double > &y, std::vector< double > &dy_dt, double t) const |
Calculates the derivative of the coupled ode system with respect to time. More... | |
int | size () const |
Returns the size of the coupled system. More... | |
std::vector< double > | initial_state () const |
Returns the initial state of the coupled system. More... | |
Public Attributes | |
const F & | f_ |
const std::vector< double > & | y0_dbl_ |
const std::vector< double > & | theta_dbl_ |
const std::vector< double > & | x_ |
const std::vector< int > & | x_int_ |
const size_t | N_ |
const size_t | M_ |
const size_t | size_ |
std::ostream * | msgs_ |
coupled_ode_system
specialization for for known initial values and known parameters.
For this case, the coupled ode is the same as the base ode. There are no sensitivity parameters and the size of the coupled ode system is the size of the base ode system.
F | base ode system functor. Must provide operator()(double t, std::vector<double> y, std::vector<double> theta, std::vector<double> x, std::vector<int>x_int, std::ostream* msgs) |
Definition at line 45 of file coupled_ode_system.hpp.
|
inline |
Construct the coupled ode system from the base system function, initial state of the base system, parameters, data and a stream for messages.
[in] | f | base ode system functor |
[in] | y0 | initial state of the base ode |
[in] | theta | parameters of the base ode |
[in] | x | real data |
[in] | x_int | integer data |
[in,out] | msgs | stream for messages |
Definition at line 69 of file coupled_ode_system.hpp.
|
inline |
Returns the initial state of the coupled system.
Here, it is identical to base ode state because the initial state is known.
Definition at line 115 of file coupled_ode_system.hpp.
|
inline |
Calculates the derivative of the coupled ode system with respect to time.
[in] | y | current state of the coupled ode. This must be the correct size, N_ . |
[out] | dy_dt | populated with derivatives of the coupled system evaluated at specified state and time. This vector will be overwritten. |
[in] | t | time. |
exception | if the system function does not return a derivative vector of the same size as the state vector. |
Definition at line 95 of file coupled_ode_system.hpp.
|
inline |
Returns the size of the coupled system.
Definition at line 107 of file coupled_ode_system.hpp.
const F& stan::math::coupled_ode_system< F, double, double >::f_ |
Definition at line 47 of file coupled_ode_system.hpp.
const size_t stan::math::coupled_ode_system< F, double, double >::M_ |
Definition at line 53 of file coupled_ode_system.hpp.
std::ostream* stan::math::coupled_ode_system< F, double, double >::msgs_ |
Definition at line 55 of file coupled_ode_system.hpp.
const size_t stan::math::coupled_ode_system< F, double, double >::N_ |
Definition at line 52 of file coupled_ode_system.hpp.
const size_t stan::math::coupled_ode_system< F, double, double >::size_ |
Definition at line 54 of file coupled_ode_system.hpp.
const std::vector<double>& stan::math::coupled_ode_system< F, double, double >::theta_dbl_ |
Definition at line 49 of file coupled_ode_system.hpp.
const std::vector<double>& stan::math::coupled_ode_system< F, double, double >::x_ |
Definition at line 50 of file coupled_ode_system.hpp.
const std::vector<int>& stan::math::coupled_ode_system< F, double, double >::x_int_ |
Definition at line 51 of file coupled_ode_system.hpp.
const std::vector<double>& stan::math::coupled_ode_system< F, double, double >::y0_dbl_ |
Definition at line 48 of file coupled_ode_system.hpp.