PABLO  0.1
PArallel Balanced Linear Octree
 All Classes Functions Variables Pages
Class_Global_2D.tpp
1 #ifndef CLASS_GLOBAL_2D_TPP
2 #define CLASS_GLOBAL_2D_TPP
3 
21 // =================================================================================== //
22 // CLASS SPECIALIZATION //
23 // =================================================================================== //
24 template<>
25 class Class_Global<2>
26 {
27 public:
28  Class_Global() :
29  max_length (uint32_t(pow(2.0,MAX_LEVEL_2D))),
30  nchildren(4),
31  nfaces(4),
32  nnodes(4),
33  nnodesperface(2),
34  octantBytes(uint8_t(sizeof(uint32_t)*2 + sizeof(uint8_t) + sizeof(int8_t) + (12)*sizeof(bool))),
35  globalIndexBytes(uint8_t(sizeof(uint64_t))),
36  markerBytes(sizeof(int8_t)),
37  levelBytes(sizeof(uint8_t)),
38  boolBytes(sizeof(bool))
39 {
40  oppface[0] = 1;
41  oppface[1] = 0;
42  oppface[2] = 3;
43  oppface[3] = 2;
44 
45  nodeface[0][0] = 0;
46  nodeface[0][1] = 2;
47  nodeface[1][0] = 1;
48  nodeface[1][1] = 2;
49  nodeface[2][0] = 0;
50  nodeface[2][1] = 3;
51  nodeface[3][0] = 1;
52  nodeface[3][1] = 3;
53 
54  facenode[0][0] = 0;
55  facenode[0][1] = 2;
56  facenode[1][0] = 1;
57  facenode[1][1] = 3;
58  facenode[2][0] = 0;
59  facenode[2][1] = 1;
60  facenode[3][0] = 2;
61  facenode[3][1] = 3;
62 
63  normals[0][0] = -1;
64  normals[0][1] = 0;
65  normals[0][2] = 0;
66  normals[1][0] = 1;
67  normals[1][1] = 0;
68  normals[1][2] = 0;
69  normals[2][0] = 0;
70  normals[2][1] = -1;
71  normals[2][2] = 0;
72  normals[3][0] = 0;
73  normals[3][1] = 1;
74  normals[3][2] = 0;
75 };
76 
77 
78  uint32_t max_length;
79  uint8_t nchildren;
80  uint8_t nfaces;
81  uint8_t nnodes;
82  uint8_t nnodesperface;
83  uint8_t octantBytes;
84  uint8_t globalIndexBytes;
85  uint8_t markerBytes;
86  uint8_t levelBytes;
87  uint8_t boolBytes;
88  uint8_t oppface[4];
89  uint8_t nodeface[4][2];
90  uint8_t facenode[4][2];
91  int8_t normals[4][3];
92 };
93 
94 #endif
Global variables used in PABLO.