/home/runner/work/spades/spades/Source/Constants.H Source File

SPADES API: /home/runner/work/spades/spades/Source/Constants.H Source File
SPADES API
Constants.H
Go to the documentation of this file.
1#ifndef CONSTANTS_H
2#define CONSTANTS_H
3
4#include <AMReX_REAL.H>
10static constexpr int N_STATES = 2;
11
13static constexpr int LVT_IDX = 0;
14
16static constexpr int RLB_IDX = 1;
17
19static constexpr amrex::Real LOW_NUM = static_cast<amrex::Real>(
20 std::numeric_limits<amrex::Real>::lowest() * 1e-10);
21
23static constexpr amrex::Real SMALL_NUM = static_cast<amrex::Real>(
24 std::numeric_limits<amrex::Real>::epsilon() * 1e10);
25
27static constexpr amrex::Real EPS =
28 static_cast<amrex::Real>(std::numeric_limits<amrex::Real>::epsilon());
29
31static constexpr amrex::Real TOL = 1e-6;
32
34static constexpr amrex::Real LARGE_NUM =
35 static_cast<amrex::Real>(std::numeric_limits<amrex::Real>::max() * 1e-10);
36
37static constexpr amrex::Real HALF = 0.5;
38
39static constexpr int TWO_TO_EIGHT = 256;
40
42static constexpr int FILE_NAME_DIGITS = 5;
43
45static constexpr int RNG_FILE_NAME_DIGITS = 10;
46
48static constexpr int HEADER_FILE_PRECISION = 17;
49
51static constexpr int MAX_ROLLBACK_ITERS = 20;
52
53#if (AMREX_SPACEDIM == 1)
55static constexpr int I_NBITS = 28;
56
58static constexpr int J_NBITS = 0;
59
61static constexpr int K_NBITS = 0;
62
63#elif (AMREX_SPACEDIM == 2)
65static constexpr int I_NBITS = 14;
66
68static constexpr int J_NBITS = 14;
69
71static constexpr int K_NBITS = 0;
72
73#elif (AMREX_SPACEDIM == 3)
75static constexpr int I_NBITS = 10;
76
78static constexpr int J_NBITS = 9;
79
81static constexpr int K_NBITS = 9;
82#endif
83
85static constexpr int TYPE_NBITS = 4;
86
88static constexpr int TIMESTAMP_NBITS = 32;
89
91static constexpr int TOTAL_NBITS = 64;
92
93} // namespace spades::constants
94
95#endif
SPADES constants.
Definition Constants.H:8
static constexpr int MAX_ROLLBACK_ITERS
Maximum number of rollback iterations allowed.
Definition Constants.H:51
static constexpr amrex::Real EPS
A number very close to zero.
Definition Constants.H:27
static constexpr amrex::Real LARGE_NUM
A large number.
Definition Constants.H:34
static constexpr int FILE_NAME_DIGITS
Number of digits to use in output file names.
Definition Constants.H:42
static constexpr int HEADER_FILE_PRECISION
Precision to use in header files.
Definition Constants.H:48
static constexpr amrex::Real LOW_NUM
A large negative number.
Definition Constants.H:19
static constexpr int TIMESTAMP_NBITS
Bits to encode the timestamp.
Definition Constants.H:88
static constexpr int RLB_IDX
Index of the rollback counts.
Definition Constants.H:16
static constexpr amrex::Real TOL
A tolerance.
Definition Constants.H:31
static constexpr int RNG_FILE_NAME_DIGITS
Number of digits to use in random seed file names.
Definition Constants.H:45
static constexpr int TOTAL_NBITS
Bits to encode the full representation.
Definition Constants.H:91
static constexpr int TWO_TO_EIGHT
Definition Constants.H:39
static constexpr int TYPE_NBITS
Bits to encode the type.
Definition Constants.H:85
static constexpr int LVT_IDX
Index of the local virtual time.
Definition Constants.H:13
static constexpr amrex::Real SMALL_NUM
A number close to zero.
Definition Constants.H:23
static constexpr int N_STATES
Number of states.
Definition Constants.H:10
static constexpr amrex::Real HALF
Definition Constants.H:37