189{
191 using std::vector;
192 vector<int> vertex;
193 vector<int> iEdge_01;
194 vector<int> iEdge_12;
195 vector<int> iEdge_23;
196 vector<int> iEdge_30;
197 vector<int> iEdge_04;
198 vector<int> iEdge_14;
199 vector<int> iEdge_24;
200 vector<int> iEdge_34;
201 vector<int> iFace_0123;
202 vector<int> iFace_014;
203 vector<int> iFace_124;
204 vector<int> iFace_234;
205 vector<int> iFace_034;
206 vector<int> interiorVolumePoints;
207 vector<int> map;
208
209
210
211
212
213 for (
size_t z = 0, index = 0;
z < npts; ++
z)
214 {
215 for (
size_t y = 0;
y < npts -
z; ++
y)
216 {
217 for (
size_t x = 0;
x < npts -
z; ++
x, ++index)
218 {
219 if (isVertex(x, y, z, npts))
220 {
221 vertex.push_back(index);
222 }
223 else if (isEdge(x, y, z, npts))
224 {
225 if (isEdge_01(x, y, z, npts))
226 {
227 iEdge_01.push_back(index);
228 }
229 else if (isEdge_12(x, y, z, npts))
230 {
231 iEdge_12.push_back(index);
232 }
233 else if (isEdge_23(x, y, z, npts))
234 {
235 iEdge_23.push_back(index);
236 }
237 else if (isEdge_30(x, y, z, npts))
238 {
239 iEdge_30.push_back(index);
240 }
241 else if (isEdge_04(x, y, z, npts))
242 {
243 iEdge_04.push_back(index);
244 }
245 else if (isEdge_14(x, y, z, npts))
246 {
247 iEdge_14.push_back(index);
248 }
249 else if (isEdge_24(x, y, z, npts))
250 {
251 iEdge_24.push_back(index);
252 }
253 else if (isEdge_34(x, y, z, npts))
254 {
255 iEdge_34.push_back(index);
256 }
257 }
258 else if (isFace(x, y, z, npts))
259 {
260 if (isFace_0123(x, y, z, npts))
261 {
262 iFace_0123.push_back(index);
263 }
264 else if (isFace_014(x, y, z, npts))
265 {
266 iFace_014.push_back(index);
267 }
268 else if (isFace_124(x, y, z, npts))
269 {
270 iFace_124.push_back(index);
271 }
272 else if (isFace_234(x, y, z, npts))
273 {
274 iFace_234.push_back(index);
275 }
276 else if (isFace_034(x, y, z, npts))
277 {
278 iFace_034.push_back(index);
279 }
280 }
281 else
282 {
283 interiorVolumePoints.push_back(index);
284 }
285 }
286 }
287 }
288
289
290
291
292 std::swap(vertex[2], vertex[3]);
293
294 for (size_t n = 0; n < vertex.size(); ++n)
295 {
296 map.push_back(vertex[n]);
297 }
298
299 for (size_t n = 0; n < iEdge_01.size(); ++n)
300 {
301 map.push_back(iEdge_01[n]);
302 }
303
304 for (size_t n = 0; n < iEdge_12.size(); ++n)
305 {
306 map.push_back(iEdge_12[n]);
307 }
308
309 for (size_t n = 0; n < iEdge_23.size(); ++n)
310 {
311 map.push_back(iEdge_23[n]);
312 }
313
314 for (size_t n = 0; n < iEdge_30.size(); ++n)
315 {
316 map.push_back(iEdge_30[n]);
317 }
318
319 for (size_t n = 0; n < iEdge_04.size(); ++n)
320 {
321 map.push_back(iEdge_04[n]);
322 }
323
324 for (size_t n = 0; n < iEdge_14.size(); ++n)
325 {
326 map.push_back(iEdge_14[n]);
327 }
328
329 for (size_t n = 0; n < iEdge_24.size(); ++n)
330 {
331 map.push_back(iEdge_24[n]);
332 }
333
334 for (size_t n = 0; n < iEdge_34.size(); ++n)
335 {
336 map.push_back(iEdge_34[n]);
337 }
338
339 for (size_t n = 0; n < iFace_0123.size(); ++n)
340 {
341 map.push_back(iFace_0123[n]);
342 }
343
344 for (size_t n = 0; n < iFace_014.size(); ++n)
345 {
346 map.push_back(iFace_014[n]);
347 }
348
349 for (size_t n = 0; n < iFace_124.size(); ++n)
350 {
351 map.push_back(iFace_124[n]);
352 }
353
354 for (size_t n = 0; n < iFace_234.size(); ++n)
355 {
356 map.push_back(iFace_234[n]);
357 }
358
359 for (size_t n = 0; n < iFace_034.size(); ++n)
360 {
361 map.push_back(iFace_034[n]);
362 }
363
364 for (size_t n = 0; n < interiorVolumePoints.size(); ++n)
365 {
366 map.push_back(interiorVolumePoints[n]);
367 }
368
369 Array<OneD, NekDouble> points[3];
373
374 for (size_t index = 0; index < map.size(); ++index)
375 {
376 points[0][index] =
m_points[0][index];
377 points[1][index] =
m_points[1][index];
378 points[2][index] =
m_points[2][index];
379 }
380
381 for (size_t index = 0; index < map.size(); ++index)
382 {
383 m_points[0][index] = points[0][map[index]];
384 m_points[1][index] = points[1][map[index]];
385 m_points[2][index] = points[2][map[index]];
386 }
387}
Array< OneD, DataType > m_points[3]
Storage for the point locations, allowing for up to a 3D points storage.
size_t GetNumPoints() const
size_t GetTotNumPoints() const