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

◆ cvodes_integrator_adjoint_vari()

template<typename F , typename T_y0 , typename T_t0 , typename T_ts , typename... T_Args>
template<typename FF , require_eigen_col_vector_t< T_y0 > * = nullptr>
stan::math::cvodes_integrator_adjoint_vari< F, T_y0, T_t0, T_ts, T_Args >::cvodes_integrator_adjoint_vari ( const char *  function_name,
FF &&  f,
const T_y0 &  y0,
const T_t0 &  t0,
const std::vector< T_ts > &  ts,
double  relative_tolerance_forward,
const Eigen::VectorXd &  absolute_tolerance_forward,
double  relative_tolerance_backward,
const Eigen::VectorXd &  absolute_tolerance_backward,
double  relative_tolerance_quadrature,
double  absolute_tolerance_quadrature,
long int  max_num_steps,
long int  num_steps_between_checkpoints,
int  interpolation_polynomial,
int  solver_forward,
int  solver_backward,
std::ostream *  msgs,
const T_Args &...  args 
)
inline

Construct cvodes_integrator object.

Note: All arguments must be stored as copies if in doubt. The reason is that the references can go out of scope, since the work done from the integrator is in the chain method.

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_tolerance_forwardRelative tolerance for forward problem passed to CVODES
absolute_tolerance_forwardAbsolute tolerance per ODE state for forward problem passed to CVODES
relative_tolerance_backwardRelative tolerance for backward problem passed to CVODES
absolute_tolerance_backwardAbsolute tolerance per ODE state for backward problem passed to CVODES
relative_tolerance_quadratureRelative tolerance for quadrature problem passed to CVODES
absolute_tolerance_quadratureAbsolute tolerance for quadrature problem passed to CVODES
max_num_stepsUpper limit on the number of integration steps to take between each output (error if exceeded)
num_steps_between_checkpointsNumber of integrator steps after which a checkpoint is stored for the backward pass
interpolation_polynomialtype of polynomial used for interpolation
solver_forwardsolver used for forward pass
solver_backwardsolver used for backward pass 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.

Solve the ODE initial value problem y' = f(t, y), y(t0) = y0 at a set of times, { t1, t2, t3, ... } using the requested forward solver of CVODES.

Definition at line 211 of file cvodes_integrator_adjoint.hpp.