| title | Prerequisites |
|---|---|
| layout | default |
| nav_order | 1.7 |
The main header file of the library is dae-cpp/solver.hpp. It contains all the necessary classes, solvers, and utilities. To include dae-cpp into the project, use
#include <dae-cpp/solver.hpp>All classes and solvers exposed to the user are defined in the daecpp namespace. This means that all names from the dae-cpp library should be prefixed with daecpp::. Alternatively, use
using namespace daecpp;| Type | Equivalent to | Note |
|---|---|---|
daecpp::int_type |
int32_t (default), int64_t if DAECPP_LONG is defined |
Integer type, used for sparse matrix indices |
daecpp::float_type |
double (default), float if DAECPP_SINGLE is defined |
Floating point scalar, used for sparse matrix coefficients |
daecpp::state_vector |
std::vector<float_type> |
State vector, used, for example, to define the initial condition |
daecpp::state_type |
autodiff::VectorXreal |
State vector, used for the vector function definition so that it can be automatically (algorithmically) differentiated using autodiff package |
daecpp::state_value |
autodiff::real1st |
Floating point "dual" number, used in the vector function for automatic differentiation |
daecpp::dual_type |
autodiff::real1st |
(DEPRECATED) Floating point "dual" number, used in the vector function for automatic differentiation |