Automatic Differentiation
 
Loading...
Searching...
No Matches
stan::math::dae_system< F, Tyy, Typ, T_par > Class Template Reference

Detailed Description

template<typename F, typename Tyy, typename Typ, typename... T_par>
class stan::math::dae_system< F, Tyy, Typ, T_par >

IDAS DAE system that contains information on residual equation functor, sensitivity residual equation functor, as well as initial conditions.

This is a base type that is intended to contain common values used by forward sensitivity system.

Template Parameters
Ftype of functor for DAE residual
Tyyscalar type of initial unknown values
Typscalar type of initial unknown's derivative values
Tparscalar type of parameters

Definition at line 36 of file dae_system.hpp.

#include <dae_system.hpp>

Public Types

using scalar_t = stan::return_type_t< Tyy, Typ, T_par... >
 
using return_t = std::vector< Eigen::Matrix< scalar_t, -1, 1 > >
 

Public Member Functions

 dae_system (const F &f, const Tyy &yy0, const Typ &yp0, std::ostream *msgs, const T_par &... args)
 Construct IDAS DAE system from initial condition and parameters.
 
void eval_residual (double t)
 

Static Public Member Functions

static int idas_res (double t, N_Vector yy, N_Vector yp, N_Vector rr, void *user_data)
 Evaluate DAE residual according to IDAS signature.
 
static int idas_sens_res (int ns, double t, N_Vector yy, N_Vector yp, N_Vector res, N_Vector *yys, N_Vector *yps, N_Vector *ress, void *user_data, N_Vector temp1, N_Vector temp2, N_Vector temp3)
 Evaluate DAE sensitivity residual according to IDAS signature.
 

Public Attributes

Tyy const & yy
 state variable y
 
Typ const & yp
 time derivatives of y
 
Eigen::VectorXd dbl_yy
 
Eigen::VectorXd dbl_yp
 
const size_t N
 
const size_t M
 
const size_t ns
 
vari ** varis
 
std::vector< stan::math::varall_vars
 
Eigen::VectorXd dbl_rr
 

Static Public Attributes

static constexpr bool is_var_yy0 = stan::is_var<return_type_t<Tyy>>::value
 
static constexpr bool is_var_yp0 = stan::is_var<return_type_t<Typ>>::value
 
static constexpr bool is_var_par = stan::is_var<return_type_t<T_par...>>::value
 
static constexpr bool use_fwd_sens = is_var_yy0 || is_var_yp0 || is_var_par
 

Protected Attributes

const F & f_
 residual functor
 
std::tuple< decltype(deep_copy_vars(std::declval< const T_par & >()))... > local_args_tuple_
 
std::tuple< plain_type_t< decltype(value_of(std::declval< const T_par & >()))> dbl_args_tuple_
 
std::tuple< const T_par &... > args_tuple_
 
std::ostream * msgs_
 

Private Types

using dae_type = dae_system< F, Tyy, Typ, T_par... >
 

The documentation for this class was generated from the following file: