Automatic Differentiation
 
Loading...
Searching...
No Matches

◆ initial_state()

template<typename F , typename T_y0 , typename... Args>
std::vector< double > stan::math::coupled_ode_system_impl< false, F, T_y0, Args... >::initial_state ( ) const
inline

Returns the initial state of the coupled system.

Because the starting state is unknown, the coupled system incorporates the initial conditions as parameters. At the initial time the Jacobian of the integrated function is the identity matrix. In addition the coupled system includes the Jacobian of the integrated function wrt to the parameters. This Jacobian is zero at the initial time-point.

Returns
the initial condition of the coupled system. This is a vector of length size() where the first N values are the initial condition of the base ODE and the next N*N elements correspond to the identity matrix which is the Jacobian of the integrated function at the initial time-point. The last N*M elements are all zero as these are the Jacobian wrt to the parameters at the initial time-point, which is zero.

Definition at line 213 of file coupled_ode_system.hpp.