
Introduction to Dynamical Systems 281
FIGURE 19.5: Case Study 1: Model with single differential equation.
20 int main () {
21 const int dimension = 1; /
*
number of differential equations
*
/
22 int status; /
*
status of driver function
*
/
23 const double eps_abs = 1.e-8; /
*
absolute error requested
*
/
24 const double eps_rel = 1.e-10; /
*
relative error requested
*
/
25 double alpha = 0.015; /
*
parameter for the diff eq
*
/
26 double omega = 2.0
*
M_PI/365.0; /
*
parameter for the diff eq
*
/
27 double myparams[2]; /
*
array for parameters
*
/
28
29 double y[dimension]; /
*
current solution vector
*
/
30 double t, t_next; /
*
current and next independent variable
*
/
31 double tmin, tmax, ...