Category : C Source Code
Archive   : DYNAM_S1.ZIP
Filename : YHENON.C

 
Output of file : YHENON.C contained in archive : DYNAM_S1.ZIP

/******************************* YHENON.C ************************************/
/********************* (C) 1986,7,8 by JAMES A. YORKE ************************/


#include "yinclud.h"



Henon() {
int i;
int base;
double y_temp[6],
temp;

if(num_lyap == 0) {
temp = rho - (*y) * (*y) + C1 * y[1];
y[1] = *y;
y[0] = temp;
/* temp = rho -y[0]*y[0] + C1*y[1];
y[1] = y[0];
y[0] = temp;
*/

}
else {
y_temp[0] = rho - y[0] * y[0] + C1 * y[1];
y_temp[1] = y[0];

for(i = 0; i < num_lyap; i++) {
base = lyapzero + vec_dim * i;
y_temp[base]
= -2 * y[0] * y[base]
+ C1 * y[base + 1];
y_temp[base + 1]
= y[base];
}
for(i = 0; i < lyapzero + vec_dim * num_lyap; i++)
y[i] = y_temp[i];
}
}

initHenon() {
/* Henon */
vec_dim = 2; /* the dimension of the Lyapunov vectors =
phase space dim */
num_lyap = 0; /* the number of Lyapunov numbers to be
computed <=vec_dim */
lyapzero = 2; /* y[lyapzero] is the zeroth coord of the
zeroth lyapunov vector */
dim = lyapzero + num_lyap * vec_dim;
/* needed for rungekutta */

X_upper = 2.0; /* x scale */
X_lower = -2.0;
Y_upper = 2.0; /* y scale */
Y_lower = -2.0;
C1 =.3;
rho = 1.4;
map = Henon;
}


  3 Responses to “Category : C Source Code
Archive   : DYNAM_S1.ZIP
Filename : YHENON.C

  1. Very nice! Thank you for this wonderful archive. I wonder why I found it only now. Long live the BBS file archives!

  2. This is so awesome! 😀 I’d be cool if you could download an entire archive of this at once, though.

  3. But one thing that puzzles me is the “mtswslnkmcjklsdlsbdmMICROSOFT” string. There is an article about it here. It is definitely worth a read: http://www.os2museum.com/wp/mtswslnk/