192 vector<int> iEdge_01;
193 vector<int> iEdge_12;
194 vector<int> iEdge_23;
195 vector<int> iEdge_30;
196 vector<int> iEdge_04;
197 vector<int> iEdge_14;
198 vector<int> iEdge_25;
199 vector<int> iEdge_35;
200 vector<int> iEdge_45;
201 vector<int> iFace_0123;
202 vector<int> iFace_014;
203 vector<int> iFace_1254;
204 vector<int> iFace_325;
205 vector<int> iFace_0354;
206 vector<int> interiorVolumePoints;
210 for (
unsigned int y = 0, index = 0; y < npts; y++)
212 for (
unsigned int t = 0; t < npts * (npts + 1) / 2; t++, index++)
214 if (isVertex(t, y, npts))
216 vertex.push_back(index);
218 else if (isEdge(t, y, npts))
220 if (isEdge_01(t, y, npts))
222 iEdge_01.push_back(index);
224 else if (isEdge_12(t, y, npts))
226 iEdge_12.push_back(index);
228 else if (isEdge_23(t, y, npts))
230 iEdge_23.push_back(index);
232 else if (isEdge_30(t, y, npts))
234 iEdge_30.push_back(index);
236 else if (isEdge_04(t, y, npts))
238 iEdge_04.push_back(index);
240 else if (isEdge_14(t, y, npts))
242 iEdge_14.push_back(index);
244 else if (isEdge_25(t, y, npts))
246 iEdge_25.push_back(index);
248 else if (isEdge_35(t, y, npts))
250 iEdge_35.push_back(index);
252 else if (isEdge_45(t, y, npts))
254 iEdge_45.push_back(index);
257 else if (isFace(t, y, npts))
259 if (isFace_0123(t, y, npts))
261 iFace_0123.push_back(index);
263 else if (isFace_014(t, y, npts))
265 iFace_014.push_back(index);
267 else if (isFace_1254(t, y, npts))
269 iFace_1254.push_back(index);
271 else if (isFace_325(t, y, npts))
273 iFace_325.push_back(index);
275 else if (isFace_0354(t, y, npts))
277 iFace_0354.push_back(index);
282 interiorVolumePoints.push_back(index);
288 std::swap(vertex[2], vertex[4]);
290 std::reverse(iEdge_23.begin(), iEdge_23.end());
291 std::reverse(iEdge_30.begin(), iEdge_30.end());
292 std::reverse(iEdge_04.begin(), iEdge_04.end());
293 std::reverse(iEdge_35.begin(), iEdge_35.end());
296 for (
unsigned int i = 0; i < npts - 2; i++)
298 for (
unsigned int j = i + 1; j < npts - 2; j++)
300 std::swap(iFace_1254[i * (npts - 2) + j],
301 iFace_1254[j * (npts - 2) + i]);
304 for (
int i = 0; i < npts - 2; i++)
306 std::reverse(iFace_0354.begin() + (i * (npts - 2)),
307 iFace_0354.begin() + (i * (npts - 2) + npts - 2));
309 for (
unsigned int i = 0; i < npts - 2; i++)
311 for (
unsigned int j = i + 1; j < npts - 2; j++)
313 std::swap(iFace_0354[i * (npts - 2) + j],
314 iFace_0354[j * (npts - 2) + i]);
318 for (
unsigned int n = 0; n < vertex.size(); ++n)
320 map.push_back(vertex[n]);
323 for (
unsigned int n = 0; n < iEdge_01.size(); ++n)
325 map.push_back(iEdge_01[n]);
328 for (
unsigned int n = 0; n < iEdge_12.size(); ++n)
330 map.push_back(iEdge_12[n]);
333 for (
unsigned int n = 0; n < iEdge_23.size(); ++n)
335 map.push_back(iEdge_23[n]);
338 for (
unsigned int n = 0; n < iEdge_30.size(); ++n)
340 map.push_back(iEdge_30[n]);
343 for (
unsigned int n = 0; n < iEdge_04.size(); ++n)
345 map.push_back(iEdge_04[n]);
348 for (
unsigned int n = 0; n < iEdge_14.size(); ++n)
350 map.push_back(iEdge_14[n]);
353 for (
unsigned int n = 0; n < iEdge_25.size(); ++n)
355 map.push_back(iEdge_25[n]);
358 for (
unsigned int n = 0; n < iEdge_35.size(); ++n)
360 map.push_back(iEdge_35[n]);
363 for (
unsigned int n = 0; n < iEdge_45.size(); ++n)
365 map.push_back(iEdge_45[n]);
368 for (
unsigned int n = 0; n < iFace_0123.size(); ++n)
370 map.push_back(iFace_0123[n]);
373 for (
unsigned int n = 0; n < iFace_014.size(); ++n)
375 map.push_back(iFace_014[n]);
378 for (
unsigned int n = 0; n < iFace_1254.size(); ++n)
380 map.push_back(iFace_1254[n]);
383 for (
unsigned int n = 0; n < iFace_325.size(); ++n)
385 map.push_back(iFace_325[n]);
388 for (
unsigned int n = 0; n < iFace_0354.size(); ++n)
390 map.push_back(iFace_0354[n]);
393 for (
unsigned int n = 0; n < interiorVolumePoints.size(); ++n)
395 map.push_back(interiorVolumePoints[n]);
398 Array<OneD, NekDouble> points[3];
403 for (
unsigned int index = 0; index < map.size(); ++index)
405 points[0][index] =
m_points[0][index];
406 points[1][index] =
m_points[1][index];
407 points[2][index] =
m_points[2][index];
410 for (
unsigned int index = 0; index < map.size(); ++index)
412 m_points[0][index] = points[0][map[index]];
413 m_points[1][index] = points[1][map[index]];
414 m_points[2][index] = points[2][map[index]];