CoMD
A Mini-app for Co-Design of Classical Molecular Dynamics.
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
mytype.h
Go to the documentation of this file.
1 /// \file
2 /// Frequently needed typedefs.
3 
4 #ifndef __MYTYPE_H_
5 #define __MYTYPE_H_
6 
7 /// \def SINGLE determines whether single or double precision is built
8 #ifdef SINGLE
9 typedef float real_t; //!< define native type for CoMD as single precision
10  #define FMT1 "%g" //!< /def format argument for floats
11  #define EMT1 "%e" //!< /def format argument for eng floats
12 #else
13 typedef double real_t; //!< define native type for CoMD as double precision
14  #define FMT1 "%lg" //!< \def format argument for doubles
15  #define EMT1 "%le" //!< \def format argument for eng doubles
16 #endif
17 
18 typedef real_t real3[3]; //!< a convenience vector with three real_t
19 
20 static void zeroReal3(real3 a)
21 {
22  a[0] = 0.0;
23  a[1] = 0.0;
24  a[2] = 0.0;
25 }
26 
27 #define screenOut stdout
28 
29 #endif