1 |
C $Id: CPP_MACROS.h,v 1.1 1998/05/25 20:21:06 cnh Exp $ |
2 |
C===================================================================== |
3 |
C Header file: CPP_MACROS.h | |
4 |
C Function: Defines CPP macros which are used throughout | |
5 |
C the code to make global changes at compile | |
6 |
C time. | |
7 |
C Comments: | |
8 |
C===================================================================== |
9 |
|
10 |
C /--------------------------------------------------------------\ |
11 |
C | Index permutation | |
12 |
C |==============================================================| |
13 |
C | o This macro is used to reorder the indices of | |
14 |
C | three-dimensional arrays. Different orderings are selected by| |
15 |
C | using #define _IJK or #define _KIJ etc.. | |
16 |
C \--------------------------------------------------------------/ |
17 |
C /--------------------------------------------------------------\ |
18 |
C | 1. Axis ordering i,j,k | |
19 |
C \--------------------------------------------------------------/ |
20 |
#ifdef _IJK |
21 |
# define _I3X 1 |
22 |
# define _I3Y 2 |
23 |
# define _I3Z 3 |
24 |
# define _I3(k,i,j) i,j,k |
25 |
#endif |
26 |
C /--------------------------------------------------------------\ |
27 |
C | 2. Axis ordering k,i,j | |
28 |
C \--------------------------------------------------------------/ |
29 |
#ifdef _KIJ |
30 |
# define _I3X 2 |
31 |
# define _I3Y 3 |
32 |
# define _I3Z 1 |
33 |
# define _I3(k,i,j) k,i,j |
34 |
#endif |
35 |
|
36 |
C /--------------------------------------------------------------\ |
37 |
C | Debugging | |
38 |
C |==============================================================| |
39 |
C | Use this macro to include or suppress special debug print | |
40 |
C | statements. | |
41 |
C \--------------------------------------------------------------/ |
42 |
#ifdef _WRITE_DEBUG |
43 |
# define _D(a) WRITE(0,*) a |
44 |
#else |
45 |
# define _D(a) |
46 |
#endif |
47 |
|
48 |
C Double precision |
49 |
#ifdef _ALL_DOUBLE |
50 |
# define REAL Real*8 |
51 |
# define real Real*8 |
52 |
#else |
53 |
# define REAL Real*8 |
54 |
# define real Real*4 |
55 |
#endif |
56 |
|
57 |
|
58 |
C CPP Macros used to switch terms on and off |
59 |
C ========================================== |
60 |
|
61 |
C o Momentum equation terms |
62 |
C _LPM Laplacian diffusion of momentum |
63 |
C _BHM Biharmonic diffusion of momentum |
64 |
C _ADM Advection of momentum |
65 |
C _SPM Spherical polar metric terms |
66 |
C _XZC XZ-plane coriolis terms |
67 |
|
68 |
#ifdef _LAPLACIAN_DIFFUSION_OF_MOMENTUM |
69 |
# define _LPM(a) a |
70 |
#else |
71 |
# define _LPM(a) |
72 |
#endif |
73 |
|
74 |
#ifdef _BIHARMONIC_DIFFUSION_OF_MOMENTUM |
75 |
# define _BHM(a) a |
76 |
#else |
77 |
# define _BHM(a) |
78 |
#endif |
79 |
|
80 |
#ifdef _ADVECTION_OF_MOMENTUM |
81 |
# define _ADM(a) a |
82 |
#else |
83 |
# define _ADM(a) |
84 |
#endif |
85 |
|
86 |
#ifdef _SPHERICAL_POLAR_METRIC_TERMS |
87 |
# define _SPM(a) a |
88 |
#else |
89 |
# define _SPM(a) |
90 |
#endif |
91 |
|
92 |
#ifdef _XZ_CORIOLIS |
93 |
# define _XZC(a) a |
94 |
#else |
95 |
# define _XZC(a) |
96 |
#endif |
97 |
|
98 |
C o Temerature equation terms |
99 |
C _LPT Laplacian diffusion of temperature |
100 |
C _BHT Biharmonic diffusion of temperature |
101 |
C _ADT Advection of momentum |
102 |
#ifdef _LAPLACIAN_DIFFUSION_OF_TEMPERATURE |
103 |
# define _LPT(a) a |
104 |
#else |
105 |
# define _LPT(a) |
106 |
#endif |
107 |
|
108 |
#ifdef _BIHARMONIC_DIFFUSION_OF_TEMPERATURE |
109 |
# define _BHT(a) a |
110 |
#else |
111 |
# define _BHT(a) |
112 |
#endif |
113 |
|
114 |
#ifdef _ADVECTION_OF_TEMPERATURE |
115 |
# define _ADT(a) a |
116 |
#else |
117 |
# define _ADT(a) |
118 |
#endif |
119 |
|