191 vector<int> iEdge_01;
192 vector<int> iEdge_12;
193 vector<int> iEdge_23;
194 vector<int> iEdge_30;
195 vector<int> iEdge_04;
196 vector<int> iEdge_14;
197 vector<int> iEdge_25;
198 vector<int> iEdge_35;
199 vector<int> iEdge_45;
200 vector<int> iFace_0123;
201 vector<int> iFace_014;
202 vector<int> iFace_1254;
203 vector<int> iFace_325;
204 vector<int> iFace_0354;
205 vector<int> interiorVolumePoints;
209 for (
unsigned int y = 0, index = 0; y < npts; y++)
211 for (
unsigned int t = 0; t < npts * (npts + 1) / 2; t++, index++)
213 if (isVertex(t, y, npts))
215 vertex.push_back(index);
217 else if (isEdge(t, y, npts))
219 if (isEdge_01(t, y, npts))
221 iEdge_01.push_back(index);
223 else if (isEdge_12(t, y, npts))
225 iEdge_12.push_back(index);
227 else if (isEdge_23(t, y, npts))
229 iEdge_23.push_back(index);
231 else if (isEdge_30(t, y, npts))
233 iEdge_30.push_back(index);
235 else if (isEdge_04(t, y, npts))
237 iEdge_04.push_back(index);
239 else if (isEdge_14(t, y, npts))
241 iEdge_14.push_back(index);
243 else if (isEdge_25(t, y, npts))
245 iEdge_25.push_back(index);
247 else if (isEdge_35(t, y, npts))
249 iEdge_35.push_back(index);
251 else if (isEdge_45(t, y, npts))
253 iEdge_45.push_back(index);
256 else if (isFace(t, y, npts))
258 if (isFace_0123(t, y, npts))
260 iFace_0123.push_back(index);
262 else if (isFace_014(t, y, npts))
264 iFace_014.push_back(index);
266 else if (isFace_1254(t, y, npts))
268 iFace_1254.push_back(index);
270 else if (isFace_325(t, y, npts))
272 iFace_325.push_back(index);
274 else if (isFace_0354(t, y, npts))
276 iFace_0354.push_back(index);
281 interiorVolumePoints.push_back(index);
287 std::swap(vertex[2], vertex[4]);
289 std::reverse(iEdge_23.begin(), iEdge_23.end());
290 std::reverse(iEdge_30.begin(), iEdge_30.end());
291 std::reverse(iEdge_04.begin(), iEdge_04.end());
292 std::reverse(iEdge_35.begin(), iEdge_35.end());
295 for (
unsigned int i = 0; i < npts - 2; i++)
297 for (
unsigned int j = i + 1; j < npts - 2; j++)
299 std::swap(iFace_1254[i * (npts - 2) + j],
300 iFace_1254[j * (npts - 2) + i]);
303 for (
int i = 0; i < npts - 2; i++)
305 std::reverse(iFace_0354.begin() + (i * (npts - 2)),
306 iFace_0354.begin() + (i * (npts - 2) + npts - 2));
308 for (
unsigned int i = 0; i < npts - 2; i++)
310 for (
unsigned int j = i + 1; j < npts - 2; j++)
312 std::swap(iFace_0354[i * (npts - 2) + j],
313 iFace_0354[j * (npts - 2) + i]);
317 for (
unsigned int n = 0; n < vertex.size(); ++n)
319 map.push_back(vertex[n]);
322 for (
unsigned int n = 0; n < iEdge_01.size(); ++n)
324 map.push_back(iEdge_01[n]);
327 for (
unsigned int n = 0; n < iEdge_12.size(); ++n)
329 map.push_back(iEdge_12[n]);
332 for (
unsigned int n = 0; n < iEdge_23.size(); ++n)
334 map.push_back(iEdge_23[n]);
337 for (
unsigned int n = 0; n < iEdge_30.size(); ++n)
339 map.push_back(iEdge_30[n]);
342 for (
unsigned int n = 0; n < iEdge_04.size(); ++n)
344 map.push_back(iEdge_04[n]);
347 for (
unsigned int n = 0; n < iEdge_14.size(); ++n)
349 map.push_back(iEdge_14[n]);
352 for (
unsigned int n = 0; n < iEdge_25.size(); ++n)
354 map.push_back(iEdge_25[n]);
357 for (
unsigned int n = 0; n < iEdge_35.size(); ++n)
359 map.push_back(iEdge_35[n]);
362 for (
unsigned int n = 0; n < iEdge_45.size(); ++n)
364 map.push_back(iEdge_45[n]);
367 for (
unsigned int n = 0; n < iFace_0123.size(); ++n)
369 map.push_back(iFace_0123[n]);
372 for (
unsigned int n = 0; n < iFace_014.size(); ++n)
374 map.push_back(iFace_014[n]);
377 for (
unsigned int n = 0; n < iFace_1254.size(); ++n)
379 map.push_back(iFace_1254[n]);
382 for (
unsigned int n = 0; n < iFace_325.size(); ++n)
384 map.push_back(iFace_325[n]);
387 for (
unsigned int n = 0; n < iFace_0354.size(); ++n)
389 map.push_back(iFace_0354[n]);
392 for (
unsigned int n = 0; n < interiorVolumePoints.size(); ++n)
394 map.push_back(interiorVolumePoints[n]);
397 Array<OneD, NekDouble> points[3];
402 for (
unsigned int index = 0; index < map.size(); ++index)
404 points[0][index] =
m_points[0][index];
405 points[1][index] =
m_points[1][index];
406 points[2][index] =
m_points[2][index];
409 for (
unsigned int index = 0; index < map.size(); ++index)
411 m_points[0][index] = points[0][map[index]];
412 m_points[1][index] = points[1][map[index]];
413 m_points[2][index] = points[2][map[index]];
Array< OneD, DataType > m_points[3]
Storage for the point locations, allowing for up to a 3D points storage.
unsigned int GetNumPoints() const
unsigned int GetTotNumPoints() const