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