Chombo + EB  3.0
REAL.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 _REAL_H_
13 #define _REAL_H_
14 
15 #ifdef CH_USE_FLOAT /* precision */
16 # undef CH_USE_DOUBLE
17 # undef CH_USE_FLOAT
18 # define CH_USE_FLOAT 1
19 #else /* precision */
20 # undef CH_USE_FLOAT
21 # undef CH_USE_DOUBLE
22 # define CH_USE_DOUBLE 1
23 #endif /* precision */
24 
25 #if !defined(CH_LANG_FORT) /* language */
26 # ifdef CH_USE_FLOAT /* precision */
27  typedef float Real;
28 # define MPI_CH_REAL MPI_FLOAT
29 # define H5T_NATIVE_REAL H5T_NATIVE_FLOAT
30 # define BASEFAB_REAL_SETVAL 1.23456789e+30
31 # define CH_BADVAL (Real)1.0e30
32 # else /* precision */
33  typedef double Real;
34 # define MPI_CH_REAL MPI_DOUBLE
35 # define H5T_NATIVE_REAL H5T_NATIVE_DOUBLE
36 # define BASEFAB_REAL_SETVAL 1.23456789e+300
37 # define CH_BADVAL (Real)1.0e99
38 # endif /* precision */
39 
40 #else /* language */
41 
42 # ifdef CH_USE_FLOAT /* precision */
43 # define REAL_T REAL
44 # define COMPLEX_T COMPLEX
45 # else /* precision */
46 # if defined(CH_CRAY)
47 # define REAL_T REAL
48 # define COMPLEX_T COMPLEX
49 # else /*cray */
50 # define REAL_T REAL*8
51 # define COMPLEX_T COMPLEX*16
52 # endif /*cray*/
53 # endif /* precision */
54 
55 #endif /* language */
56 
57 #if defined(CH_LANG_FORT)
58 # define Real_T REAL_T
59 # define Real_t REAL_T
60 # define real_t REAL_T
61 # define Complex_T COMPLEX_T
62 # define complex_T COMPLEX_T
63 # define complex_t COMPLEX_T
64 #endif
65 
66 #if !defined(CH_USE_FLOAT) && !defined(CH_USE_DOUBLE)
67 #error Exactly one of CH_USE_FLOAT or CH_USE_DOUBLE must be defined
68 #endif
69 
70 #endif
double Real
Definition: REAL.H:33