PABLO  0.1
PArallel Balanced Linear Octree
 All Classes Functions Variables Pages
Class_Global_3D.tpp
1 #ifndef CLASS_GLOBAL_3D_TPP
2 #define CLASS_GLOBAL_3D_TPP
3 
20 // =================================================================================== //
21 // CLASS SPECIALIZATION //
22 // =================================================================================== //
23 template<>
24 class Class_Global<3>
25 {
26 public:
27  Class_Global() : max_length (uint32_t(pow(2.0,MAX_LEVEL_3D))),
28  nchildren(8),
29  nfaces(6),
30  nnodes(8),
31  nedges(12),
32  nnodesperface(4),
33  octantBytes(uint8_t(sizeof(uint32_t)*3 + sizeof(uint8_t) + sizeof(int8_t) + (16)*sizeof(bool))),
34  globalIndexBytes(uint8_t(sizeof(uint64_t))),
35  markerBytes(sizeof(int8_t)),
36  levelBytes(sizeof(uint8_t)),
37  boolBytes(sizeof(bool))
38 {
39  oppface[0] = 1;
40  oppface[1] = 0;
41  oppface[2] = 3;
42  oppface[3] = 2;
43  oppface[4] = 5;
44  oppface[5] = 4;
45 
46  nodeface[0][0] = 0;
47  nodeface[0][1] = 2;
48  nodeface[0][2] = 4;
49  nodeface[1][0] = 1;
50  nodeface[1][1] = 2;
51  nodeface[1][2] = 4;
52  nodeface[2][0] = 0;
53  nodeface[2][1] = 3;
54  nodeface[2][2] = 4;
55  nodeface[3][0] = 1;
56  nodeface[3][1] = 3;
57  nodeface[3][2] = 4;
58  nodeface[4][0] = 0;
59  nodeface[4][1] = 2;
60  nodeface[4][2] = 5;
61  nodeface[5][0] = 1;
62  nodeface[5][1] = 2;
63  nodeface[5][2] = 5;
64  nodeface[6][0] = 0;
65  nodeface[6][1] = 3;
66  nodeface[6][2] = 5;
67  nodeface[7][0] = 1;
68  nodeface[7][1] = 3;
69  nodeface[7][2] = 5;
70 
71  facenode[0][0] = 0;
72  facenode[0][1] = 2;
73  facenode[0][2] = 4;
74  facenode[0][3] = 6;
75  facenode[1][0] = 1;
76  facenode[1][1] = 3;
77  facenode[1][2] = 5;
78  facenode[1][3] = 7;
79  facenode[2][0] = 0;
80  facenode[2][1] = 1;
81  facenode[2][2] = 4;
82  facenode[2][3] = 5;
83  facenode[3][0] = 2;
84  facenode[3][1] = 3;
85  facenode[3][2] = 6;
86  facenode[3][3] = 7;
87  facenode[4][0] = 0;
88  facenode[4][1] = 1;
89  facenode[4][2] = 2;
90  facenode[4][3] = 3;
91  facenode[5][0] = 4;
92  facenode[5][1] = 5;
93  facenode[5][2] = 6;
94  facenode[5][3] = 7;
95 
96  edgeface[0][0] = 0;
97  edgeface[0][1] = 4;
98  edgeface[1][0] = 1;
99  edgeface[1][1] = 4;
100  edgeface[2][0] = 2;
101  edgeface[2][1] = 4;
102  edgeface[3][0] = 3;
103  edgeface[3][1] = 4;
104  edgeface[4][0] = 0;
105  edgeface[4][1] = 2;
106  edgeface[5][0] = 1;
107  edgeface[5][1] = 2;
108  edgeface[6][0] = 0;
109  edgeface[6][1] = 3;
110  edgeface[7][0] = 1;
111  edgeface[7][1] = 3;
112  edgeface[8][0] = 0;
113  edgeface[8][1] = 5;
114  edgeface[9][0] = 1;
115  edgeface[9][1] = 5;
116  edgeface[10][0] = 2;
117  edgeface[10][1] = 5;
118  edgeface[11][0] = 3;
119  edgeface[11][1] = 5;
120 
121  normals[0][0] = -1;
122  normals[0][1] = 0;
123  normals[0][2] = 0;
124  normals[1][0] = 1;
125  normals[1][1] = 0;
126  normals[1][2] = 0;
127  normals[2][0] = 0;
128  normals[2][1] = -1;
129  normals[2][2] = 0;
130  normals[3][0] = 0;
131  normals[3][1] = 1;
132  normals[3][2] = 0;
133  normals[4][0] = 0;
134  normals[4][1] = 0;
135  normals[4][2] = -1;
136  normals[5][0] = 0;
137  normals[5][1] = 0;
138  normals[5][2] = 1;
139 
140  edgecoeffs[0][0] = -1;
141  edgecoeffs[0][1] = 0;
142  edgecoeffs[0][2] = -1;
143  edgecoeffs[1][0] = 1;
144  edgecoeffs[1][1] = 0;
145  edgecoeffs[1][2] = -1;
146  edgecoeffs[2][0] = 0;
147  edgecoeffs[2][1] = -1;
148  edgecoeffs[2][2] = -1;
149  edgecoeffs[3][0] = 0;
150  edgecoeffs[3][1] = 1;
151  edgecoeffs[3][2] = -1;
152  edgecoeffs[4][0] = -1;
153  edgecoeffs[4][1] = -1;
154  edgecoeffs[4][2] = 0;
155  edgecoeffs[5][0] = 1;
156  edgecoeffs[5][1] = -1;
157  edgecoeffs[5][2] = 0;
158  edgecoeffs[6][0] = -1;
159  edgecoeffs[6][1] = 1;
160  edgecoeffs[6][2] = 0;
161  edgecoeffs[7][0] = 1;
162  edgecoeffs[7][1] = 1;
163  edgecoeffs[7][2] = 0;
164  edgecoeffs[8][0] = -1;
165  edgecoeffs[8][1] = 0;
166  edgecoeffs[8][2] = 1;
167  edgecoeffs[9][0] = 1;
168  edgecoeffs[9][1] = 0;
169  edgecoeffs[9][2] = 1;
170  edgecoeffs[10][0] = 0;
171  edgecoeffs[10][1] = -1;
172  edgecoeffs[10][2] = 1;
173  edgecoeffs[11][0] = 0;
174  edgecoeffs[11][1] = 1;
175  edgecoeffs[11][2] = 1;
176 };
177 
178 
179  uint32_t max_length;
180  uint8_t nchildren;
181  uint8_t nfaces;
182  uint8_t nedges;
183  uint8_t nnodes;
184  uint8_t nnodesperface;
185  uint8_t octantBytes;
187  uint8_t markerBytes;
188  uint8_t levelBytes;
189  uint8_t boolBytes;
190  uint8_t oppface[6];
191  uint8_t nodeface[8][3];
192  uint8_t facenode[6][4];
193  uint8_t edgeface[12][2];
194  int8_t normals[6][3];
195  int8_t edgecoeffs[12][3];
197 };
198 
199 #endif
200 
201 
202 
Global variables used in PABLO.