-
Notifications
You must be signed in to change notification settings - Fork 6
Expand file tree
/
Copy pathglobal_definitions.h
More file actions
117 lines (99 loc) · 3.4 KB
/
global_definitions.h
File metadata and controls
117 lines (99 loc) · 3.4 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
#pragma once
/* ---------------------------------- */
/* GMGPolar - Enumeration Definitions */
/* ---------------------------------- */
enum class StencilDistributionMethod
{
CPU_TAKE = 0,
CPU_GIVE = 1
};
/* Multigrid Cycle Types */
enum class MultigridCycleType
{
V_CYCLE = 0,
W_CYCLE = 1,
F_CYCLE = 2
};
/* Residual Norm Type */
enum class ResidualNormType
{
EUCLIDEAN = 0, // Corresponds to the L2 norm
WEIGHTED_EUCLIDEAN = 1, // Scaled L2 norm (sqrt(u^T * u / DoFs))
INFINITY_NORM = 2 // Corresponds to the L∞ norm
};
enum class ExtrapolationType
{
NONE = 0,
IMPLICIT_EXTRAPOLATION = 1,
IMPLICIT_FULL_GRID_SMOOTHING = 2,
COMBINED = 3,
};
/* Smoother Colors */
enum class SmootherColor
{
Black = 0,
White = 1,
};
/* -----------*/
/* Test Cases */
/* -----------*/
/* Geometry Types - domain_geometry */
enum class GeometryType
{
CIRCULAR = 0,
SHAFRANOV = 1,
CZARNY = 2,
CULHAM = 3
};
/* Test Problem Types - exact_solution */
enum class ProblemType
{
CARTESIAN_R2 = 0,
CARTESIAN_R6 = 1,
POLAR_R6 = 2,
REFINED_RADIUS = 3
};
/* Alpha Coefficient Types - profile_coefficient alpha */
enum class AlphaCoeff
{
POISSON = 0,
SONNENDRUCKER = 1,
ZONI = 2,
ZONI_SHIFTED = 3
};
/* Beta Coefficient Types - profile_coefficient beta */
enum class BetaCoeff
{
ZERO = 0,
ALPHA_INVERSE = 1
};
// --------------------------------------- //
// Function-like macros for LIKWID markers //
// --------------------------------------- //
#ifdef GMGPOLAR_USE_LIKWID
#include <likwid.h>
#include <likwid-marker.h>
#define LIKWID_INIT() LIKWID_MARKER_INIT
#define LIKWID_REGISTER(marker) \
_Pragma("omp parallel") \
{ \
LIKWID_MARKER_REGISTER(marker); \
}
#define LIKWID_START(marker) \
_Pragma("omp parallel") \
{ \
LIKWID_MARKER_START(marker); \
}
#define LIKWID_STOP(marker) \
_Pragma("omp parallel") \
{ \
LIKWID_MARKER_STOP(marker); \
}
#define LIKWID_CLOSE() LIKWID_MARKER_CLOSE
#else
#define LIKWID_INIT()
#define LIKWID_REGISTER(marker)
#define LIKWID_START(marker)
#define LIKWID_STOP(marker)
#define LIKWID_CLOSE()
#endif