191{
193 using std::vector;
194 vector<int> vertex;
195 vector<int> iEdge_01;
196 vector<int> iEdge_12;
197 vector<int> iEdge_23;
198 vector<int> iEdge_30;
199 vector<int> iEdge_04;
200 vector<int> iEdge_14;
201 vector<int> iEdge_25;
202 vector<int> iEdge_35;
203 vector<int> iEdge_45;
204 vector<int> iFace_0123;
205 vector<int> iFace_014;
206 vector<int> iFace_1254;
207 vector<int> iFace_325;
208 vector<int> iFace_0354;
209 vector<int> interiorVolumePoints;
210 vector<int> map;
211
212
213 for (
size_t z = 0, index = 0;
z < npts; ++
z)
214 {
215 for (size_t y = 0; y < npts; ++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_25(x, y,
z, npts))
250 {
251 iEdge_25.push_back(index);
252 }
253 else if (isEdge_35(x, y,
z, npts))
254 {
255 iEdge_35.push_back(index);
256 }
257 else if (isEdge_45(x, y,
z, npts))
258 {
259 iEdge_45.push_back(index);
260 }
261 }
262 else if (isFace(x, y,
z, npts))
263 {
264 if (isFace_0123(x, y,
z, npts))
265 {
266 iFace_0123.push_back(index);
267 }
268 else if (isFace_014(x, y,
z, npts))
269 {
270 iFace_014.push_back(index);
271 }
272 else if (isFace_1254(x, y,
z, npts))
273 {
274 iFace_1254.push_back(index);
275 }
276 else if (isFace_325(x, y,
z, npts))
277 {
278 iFace_325.push_back(index);
279 }
280 else if (isFace_0354(x, y,
z, npts))
281 {
282 iFace_0354.push_back(index);
283 }
284 }
285 else
286 {
287 interiorVolumePoints.push_back(index);
288 }
289 }
290 }
291 }
292
293 for (size_t n = 0; n < vertex.size(); ++n)
294 {
295 map.push_back(vertex[n]);
296 }
297
298 for (size_t n = 0; n < iEdge_01.size(); ++n)
299 {
300 map.push_back(iEdge_01[n]);
301 }
302
303 for (size_t n = 0; n < iEdge_12.size(); ++n)
304 {
305 map.push_back(iEdge_12[n]);
306 }
307
308 for (size_t n = 0; n < iEdge_23.size(); ++n)
309 {
310 map.push_back(iEdge_23[n]);
311 }
312
313 for (size_t n = 0; n < iEdge_30.size(); ++n)
314 {
315 map.push_back(iEdge_30[n]);
316 }
317
318 for (size_t n = 0; n < iEdge_04.size(); ++n)
319 {
320 map.push_back(iEdge_04[n]);
321 }
322
323 for (size_t n = 0; n < iEdge_14.size(); ++n)
324 {
325 map.push_back(iEdge_14[n]);
326 }
327
328 for (size_t n = 0; n < iEdge_25.size(); ++n)
329 {
330 map.push_back(iEdge_25[n]);
331 }
332
333 for (size_t n = 0; n < iEdge_35.size(); ++n)
334 {
335 map.push_back(iEdge_35[n]);
336 }
337
338 for (size_t n = 0; n < iEdge_45.size(); ++n)
339 {
340 map.push_back(iEdge_45[n]);
341 }
342
343 for (size_t n = 0; n < iFace_0123.size(); ++n)
344 {
345 map.push_back(iFace_0123[n]);
346 }
347
348 for (size_t n = 0; n < iFace_014.size(); ++n)
349 {
350 map.push_back(iFace_014[n]);
351 }
352
353 for (size_t n = 0; n < iFace_1254.size(); ++n)
354 {
355 map.push_back(iFace_1254[n]);
356 }
357
358 for (size_t n = 0; n < iFace_325.size(); ++n)
359 {
360 map.push_back(iFace_325[n]);
361 }
362
363 for (size_t n = 0; n < iFace_0354.size(); ++n)
364 {
365 map.push_back(iFace_0354[n]);
366 }
367
368 for (size_t n = 0; n < interiorVolumePoints.size(); ++n)
369 {
370 map.push_back(interiorVolumePoints[n]);
371 }
372
373 Array<OneD, NekDouble> points[3];
377
378 for (size_t index = 0; index < map.size(); ++index)
379 {
380 points[0][index] =
m_points[0][index];
381 points[1][index] =
m_points[1][index];
382 points[2][index] =
m_points[2][index];
383 }
384
385 for (size_t index = 0; index < map.size(); ++index)
386 {
387 m_points[0][index] = points[0][map[index]];
388 m_points[1][index] = points[1][map[index]];
389 m_points[2][index] = points[2][map[index]];
390 }
391}
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
std::vector< double > z(NPUPPER)