1 #ifndef STAN_MATH_PRIM_ARR_FUNCTOR_COUPLED_ODE_SYSTEM_HPP 2 #define STAN_MATH_PRIM_ARR_FUNCTOR_COUPLED_ODE_SYSTEM_HPP 24 template <
typename F,
typename T1,
typename T2>
44 const std::vector<double>&
x_;
64 const std::vector<double>& y0,
65 const std::vector<double>& theta,
66 const std::vector<double>& x,
67 const std::vector<int>& x_int,
96 std::vector<double>& dy_dt,
98 dy_dt = f_(t, y, theta_dbl_, x_, x_int_, msgs_);
101 "dy_dt", dy_dt.size());
126 std::vector<double> state(size_, 0.0);
127 for (
size_t n = 0; n <
N_; n++)
128 state[n] = y0_dbl_[n];
142 std::vector<std::vector<double> >
const std::vector< int > & x_int_
void operator()(const std::vector< double > &y, std::vector< double > &dy_dt, double t)
Calculates the derivative of the coupled ode system with respect to the specified state at the specif...
const std::vector< double > & theta_dbl_
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, parameters, data and a stream for messages.
void check_size_match(const char *function, const char *name_i, T_size1 i, const char *name_j, T_size2 j)
Check if the provided sizes match.
const std::vector< double > & y0_dbl_
int size() const
Returns the size of the coupled system.
std::vector< double > initial_state()
Returns the initial state of the coupled system, which is identical to the base ODE original state in...
const std::vector< double > & x_
std::vector< std::vector< double > > decouple_states(const std::vector< std::vector< double > > &y)
Returns the base portion of the coupled state.
int size(const std::vector< T > &x)
Return the size of the specified standard vector.
Base template class for a coupled ordinary differential equation system, which adds sensitivities to ...