define.h 1.45 KB
Newer Older
Cassio Kirch's avatar
Cassio Kirch committed
1 2 3 4 5
#define X        0
#define Y        1
#define Z        2
#define PI       3.14159265359

Cassio Kirch's avatar
Cassio Kirch committed
6
//#define PLOT_EXIT_FILES
Cassio Kirch's avatar
Cassio Kirch committed
7 8
#define ENDO_GAMMA
//#define ECTO_GAMMA
Cassio Kirch's avatar
Cassio Kirch committed
9
//#define COUNT_NEIGHBORS
Cassio Kirch's avatar
Cassio Kirch committed
10 11

#define ENDOPROP               0.25
Cassio Kirch's avatar
Cassio Kirch committed
12
#define N                      800u
Cassio Kirch's avatar
Cassio Kirch committed
13
#define RANGE                  150.0
Cassio Kirch's avatar
Cassio Kirch committed
14
#define PROP                   0.35
Cassio Kirch's avatar
Cassio Kirch committed
15 16
#define SEED                   13049u        /* Must be unsigned int. */
#define DIMENSIONS             2u
Cassio Kirch's avatar
Cassio Kirch committed
17 18 19
#define BOXES                  22500u
#define BOXES_IN_EDGE          150u
#define NEIGHBOR_DISTANCE      1.0//1.32             /* r0 */
Cassio Kirch's avatar
Cassio Kirch committed
20
#define CORE_RADIUS            0.4               /* rc */
Cassio Kirch's avatar
Cassio Kirch committed
21 22 23
#define ELASTIC_DISTANCE       1.0               /* re */
#define INFINITE_FORCE         10000.0
#define ETA                    1.0
Cassio Kirch's avatar
Cassio Kirch committed
24 25 26 27
#define V0                     0.01
#define ALPHA11                0.1
#define ALPHA12                0.1
#define ALPHA22                0.1
Cassio Kirch's avatar
Cassio Kirch committed
28 29 30
#define BETA11                 0.3
#define BETA12                 0.16
#define BETA22                 0.15
Cassio Kirch's avatar
Cassio Kirch committed
31
#define DT                     1.0
Cassio Kirch's avatar
Cassio Kirch committed
32 33
#define DATE_SIZE              36u           /* Size of string */
#define FILENAME_SIZE          128u           /* Size of string */
Cassio Kirch's avatar
Cassio Kirch committed
34 35 36
#define STEPS                  5000000ull
#define EXIT_INTERVAL          1000ull
#define NUM_THREADS            8u
Cassio Kirch's avatar
Cassio Kirch committed
37 38 39 40 41

#define RANDOM_0(max) (((double)rand()/RAND_MAX) * max)

#define absDistance(x1, y1, x2, y2) sqrt(pow ((x2) - (x1), 2) +       \
                                         pow ((y2) - (y1), 2))