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

◆ cvodes_integrator()

template<int Lmm, typename F , typename T_y0 , typename T_t0 , typename T_ts , typename... T_Args>
template<require_eigen_col_vector_t< T_y0 > * = nullptr>
stan::math::cvodes_integrator< Lmm, F, T_y0, T_t0, T_ts, T_Args >::cvodes_integrator ( const char *  function_name,
const F &  f,
const T_y0 &  y0,
const T_t0 &  t0,
const std::vector< T_ts > &  ts,
double  relative_tolerance,
double  absolute_tolerance,
long int  max_num_steps,
std::ostream *  msgs,
const T_Args &...  args 
)
inline

Construct cvodes_integrator object.

Parameters
function_nameCalling function name (for printing debugging messages)
fRight hand side of the ODE
y0Initial state
t0Initial time
tsTimes at which to solve the ODE at. All values must be sorted and not less than t0.
relative_toleranceRelative tolerance passed to CVODES
absolute_toleranceAbsolute tolerance passed to CVODES
max_num_stepsUpper limit on the number of integration steps to take between each output (error if exceeded)
[in,out]msgsthe print stream for warning messages
argsExtra arguments passed unmodified through to ODE right hand side function
Returns
Solution to ODE at times ts
a vector of states, each state being a vector of the same size as the state variable, corresponding to a time in ts.
Exceptions
<code>std::domain_error</code>if y0, t0, ts, theta, x are not finite, all elements of ts are not greater than t0, or ts is not sorted in strictly increasing order.
<code>std::invalid_argument</code>if arguments are the wrong size or tolerances or max_num_steps are out of range.

Definition at line 191 of file cvodes_integrator.hpp.