-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathmacrProc.h
68 lines (57 loc) · 1.45 KB
/
macrProc.h
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
/*
* @file macrProc.h
* @author Waine Jr. ([email protected])
* @brief Struct to process/treat macroscopics
* @version 0.3.0
* @date 16/12/2019
*/
#ifndef __MACR_PROC_H
#define __MACR_PROC_H
#include "../globalFunctions.h"
#include "macroscopics.h"
/*
* Struct for macroscopics processing in runtime.
* To evaluate values such as average rho, average velocity in a plan, etc.
*/
typedef struct macrProc{
Macroscopics* macrCurr; // current macroscopics to process
Macroscopics* macrOld; // old macroscopics if required (as is by residual)
int* step; // pointer to step value
// Treated values below
dfloat residual;
dfloat avgRho;
dfloat avgUzPlanXZ[NY]; // average Uz velocity in all XZ plans
/* Constructor */
__host__
macrProc()
{
macrCurr = nullptr;
macrOld = nullptr;
step = nullptr;
residual = 1;
avgRho = RHO_0;
for(int i = 0; i < NY; i++)
avgUzPlanXZ[i] = 0;
}
/* Destructor */
__host__
~macrProc()
{
macrCurr = nullptr;
macrOld = nullptr;
step = nullptr;
residual = 0;
avgRho = 0;
}
/* Allocate necessary variables, if required dynamic allocation */
__host__
void allocateMacrProc()
{
}
/* Free allocated variables, if required dynamic allocation */
__host__
void freeMacrProc()
{
}
}MacrProc;
#endif // !__MACR_PROC_H