SPH
Globals.h
Go to the documentation of this file.
1 #pragma once
2 
7 
8 #include "objects/Object.h"
9 
11 
13 using Float = double;
14 
16 using Size = uint32_t;
17 
19 using SignedSize = int32_t;
20 
22 constexpr int DIMENSIONS = 3;
23 
25 constexpr int PRECISION = std::is_same<Float, double>::value ? 12 : 6;
26 
28 INLINE constexpr Float operator"" _f(const long double v) {
29  return Float(v);
30 }
31 
32 constexpr char CODE_NAME[] = "OpenSPH";
33 
NAMESPACE_SPH_BEGIN
Definition: BarnesHut.cpp:13
constexpr char CODE_NAME[]
Definition: Globals.h:32
uint32_t Size
Integral type used to index arrays (by default).
Definition: Globals.h:16
int32_t SignedSize
Signed integral type, used where negative numbers are necessary. Should match Size.
Definition: Globals.h:19
double Float
Precision used withing the code. Use Float instead of float or double where precision is important.
Definition: Globals.h:13
constexpr int PRECISION
Number of valid digits of numbers on output.
Definition: Globals.h:25
constexpr int DIMENSIONS
Number of spatial dimensions in the code.
Definition: Globals.h:22
Common macros and basic objects.
#define INLINE
Macros for conditional compilation based on selected compiler.
Definition: Object.h:31
#define NAMESPACE_SPH_END
Definition: Object.h:12