Chombo + EB + MF  3.2
CONSTANTS.H
Go to the documentation of this file.
1 #ifdef CH_LANG_CC
2 /*
3  * _______ __
4  * / ___/ / ___ __ _ / / ___
5  * / /__/ _ \/ _ \/ V \/ _ \/ _ \
6  * \___/_//_/\___/_/_/_/_.__/\___/
7  * Please refer to Copyright.txt, in Chombo's root directory.
8  */
9 #endif
10 
11 #ifndef _CONSTANTS_H_
12 #define _CONSTANTS_H_
13 #include "BaseNamespaceHeader.H"
14 
15 #if defined(CH_USE_FLOAT) && !defined(CH_LANG_CC)
16 #define zero (0.0e0)
17 #endif
18 #if defined(CH_USE_FLOAT) || defined(CH_LANG_CC)
19 
20 #define one (1.0e0)
21 #define two (2.0e0)
22 #define three (3.0e0)
23 #define four (4.0e0)
24 #define five (5.0e0)
25 #define six (6.0e0)
26 #define seven (7.0e0)
27 #define eight (8.0e0)
28 #define nine (9.0e0)
29 #define ten (10.0e0)
30 #define twelve (12.0e0)
31 #define fifteen (15.0e0)
32 #define sixteen (16.0e0)
33 #define twenty (20.0e0)
34 #define thirty (30.0e0)
35 #define tenth (0.100e0)
36 #define eighth (0.125e0)
37 #define sixth (1.000e0 / 6.000e0)
38 #define twelfth (1.000e0 / 12.000e0)
39 #define thirtieth (1.000e0 / 30.000e0)
40 #define fourth (0.250e0)
41 #define third (1.000e0 / 3.000e0)
42 #define half (0.500e0)
43 #define two3rd (2.000e0 / 3.000e0)
44 #define Pi (3.14159265358979323846264338327950288e0)
45 
46 #define ZERO (0.0E0)
47 #define ONE (1.0E0)
48 #define TWO (2.0E0)
49 #define THREE (3.0E0)
50 #define FOUR (4.0E0)
51 #define FIVE (5.0E0)
52 #define SIX (6.0E0)
53 #define SEVEN (7.0E0)
54 #define EIGHT (8.0E0)
55 #define NINE (9.0E0)
56 #define TEN (10.0E0)
57 #define TWELVE (12.0E0)
58 #define FIFTEEN (15.0E0)
59 #define SIXTEEN (16.0E0)
60 #define TWENTY (20.0E0)
61 #define THIRTY (30.0E0)
62 #define TENTH (0.100E0)
63 #define EIGHTH (0.125E0)
64 #define SIXTH (1.000E0 / 6.000E0)
65 #define TWELFTH (1.000E0 / 12.000E0)
66 #define THIRTIETH (1.000E0 / 30.000E0)
67 #define FOURTH (0.250E0)
68 #define THIRD (1.000E0 / 3.000E0)
69 #define HALF (0.500E0)
70 #define TWO3RD (2.000E0 / 3.000E0)
71 #define PI (3.14159265358979323846264338327950288E0)
72 
73 #elif defined(CH_USE_DOUBLE) && !defined(CH_LANG_CC)
74 
75 #define zero (0.0d0)
76 #define one (1.0d0)
77 #define two (2.0d0)
78 #define three (3.0d0)
79 #define four (4.0d0)
80 #define five (5.0d0)
81 #define six (6.0d0)
82 #define seven (7.0d0)
83 #define eight (8.0d0)
84 #define nine (9.0d0)
85 #define ten (10.0d0)
86 #define twelve (12.0d0)
87 #define fifteen (15.0d0)
88 #define sixteen (16.0d0)
89 #define twenty (20.0d0)
90 #define thirty (30.0d0)
91 #define tenth (0.100d0)
92 #define eighth (0.125d0)
93 #define sixth (1.000d0 / 6.000d0)
94 #define twelfth (1.000d0 / 12.000d0)
95 #define thirtieth (1.000d0 / 30.000d0)
96 #define fourth (0.250d0)
97 #define third (1.000d0 / 3.000d0)
98 #define half (0.500d0)
99 #define two3rd (2.000d0 / 3.000d0)
100 #define Pi (3.14159265358979323846264338327950288d0)
101 
102 #define ZERO (0.0D0)
103 #define ONE (1.0D0)
104 #define TWO (2.0D0)
105 #define THREE (3.0D0)
106 #define FOUR (4.0D0)
107 #define FIVE (5.0D0)
108 #define SIX (6.0D0)
109 #define SEVEN (7.0D0)
110 #define EIGHT (8.0D0)
111 #define NINE (9.0D0)
112 #define TEN (10.0D0)
113 #define TWELVE (12.0D0)
114 #define FIFTEEN (15.0D0)
115 #define SIXTEEN (16.0D0)
116 #define TWENTY (20.0D0)
117 #define THIRTY (30.0D0)
118 #define TENTH (0.100D0)
119 #define EIGHTH (0.125D0)
120 #define SIXTH (1.000D0 / 6.000D0)
121 #define TWELFTH (1.000D0 / 12.000D0)
122 #define THIRTIETH (1.000D0 / 30.000D0)
123 #define FOURTH (0.250D0)
124 #define THIRD (1.000D0 / 3.000D0)
125 #define HALF (0.500D0)
126 #define TWO3RD (2.000D0 / 3.000D0)
127 #define PI (3.14159265358979323846264338327950288D0)
128 
129 #else
130 
131 #error One of CH_USE_(FLOAT,DOUBLE) must be defined
132 
133 #endif
134 
135 #include "BaseNamespaceFooter.H"
136 #endif /*CH_CONSTANTS_H*/