159{
161 using std::vector;
162 vector<int> vertex;
163 vector<int> iEdge_01;
164 vector<int> iEdge_12;
165 vector<int> iEdge_20;
166 vector<int> iEdge_03;
167 vector<int> iEdge_13;
168 vector<int> iEdge_23;
169 vector<int> iFace_012;
170 vector<int> iFace_013;
171 vector<int> iFace_123;
172 vector<int> iFace_203;
173 vector<int> interiorVolumePoints;
174 vector<int> map;
175
176
177 for (
size_t z = 0, index = 0;
z < npts; ++
z)
178 {
179 for (
size_t y = 0; y < npts -
z; ++y)
180 {
181 for (
size_t x = 0; x < npts -
z - y; ++x, ++index)
182 {
183
184 if (isVertex(x, y,
z, npts))
185 {
186
187 vertex.push_back(index);
188 }
189 else if (isEdge(x, y,
z, npts))
190 {
191
192 if (isEdge_01(x, y,
z, npts))
193 {
194
195 iEdge_01.push_back(index);
196 }
197 else if (isEdge_12(x, y,
z, npts))
198 {
199
200 iEdge_12.push_back(index);
201 }
202 else if (isEdge_20(x, y,
z, npts))
203 {
204
205 iEdge_20.insert(iEdge_20.begin(), index);
206 }
207 else if (isEdge_03(x, y,
z, npts))
208 {
209
210 iEdge_03.push_back(index);
211 }
212 else if (isEdge_13(x, y,
z, npts))
213 {
214
215 iEdge_13.push_back(index);
216 }
217 else if (isEdge_23(x, y,
z, npts))
218 {
219
220 iEdge_23.push_back(index);
221 }
222 }
223 else if (isFace(x, y,
z, npts))
224 {
225
226 if (isFace_012(x, y,
z, npts))
227 {
228
229 iFace_012.push_back(index);
230 }
231 else if (isFace_013(x, y,
z, npts))
232 {
233
234 iFace_013.push_back(index);
235 }
236 else if (isFace_123(x, y,
z, npts))
237 {
238
239 iFace_123.push_back(index);
240 }
241 else if (isFace_203(x, y,
z, npts))
242 {
243
244 iFace_203.push_back(index);
245 }
246 }
247 else
248 {
249
250 interiorVolumePoints.push_back(index);
251 }
252 }
253 }
254 }
255
256
257
258 for (size_t n = 0; n < vertex.size(); ++n)
259 {
260
261 map.push_back(vertex[n]);
262 }
263
264 for (size_t n = 0; n < iEdge_01.size(); ++n)
265 {
266
267 map.push_back(iEdge_01[n]);
268 }
269
270 for (size_t n = 0; n < iEdge_12.size(); ++n)
271 {
272
273 map.push_back(iEdge_12[n]);
274 }
275
276 for (size_t n = 0; n < iEdge_20.size(); ++n)
277 {
278
279 map.push_back(iEdge_20[n]);
280 }
281
282 for (size_t n = 0; n < iEdge_03.size(); ++n)
283 {
284
285 map.push_back(iEdge_03[n]);
286 }
287
288 for (size_t n = 0; n < iEdge_13.size(); ++n)
289 {
290
291 map.push_back(iEdge_13[n]);
292 }
293
294 for (size_t n = 0; n < iEdge_23.size(); ++n)
295 {
296
297 map.push_back(iEdge_23[n]);
298 }
299
300 for (size_t n = 0; n < iFace_012.size(); ++n)
301 {
302
303 map.push_back(iFace_012[n]);
304 }
305
306 for (size_t n = 0; n < iFace_013.size(); ++n)
307 {
308
309 map.push_back(iFace_013[n]);
310 }
311
312 for (size_t n = 0; n < iFace_123.size(); ++n)
313 {
314
315 map.push_back(iFace_123[n]);
316 }
317
318 for (size_t n = 0; n < iFace_203.size(); ++n)
319 {
320
321 map.push_back(iFace_203[n]);
322 }
323
324 for (size_t n = 0; n < interiorVolumePoints.size(); ++n)
325 {
326
327 map.push_back(interiorVolumePoints[n]);
328 }
329
330 Array<OneD, NekDouble> points[3];
334 for (size_t index = 0; index < map.size(); ++index)
335 {
336
337 points[0][index] =
m_points[0][index];
338 points[1][index] =
m_points[1][index];
339 points[2][index] =
m_points[2][index];
340 }
341
342 for (size_t index = 0; index < map.size(); ++index)
343 {
344
345 m_points[0][index] = points[0][map[index]];
346 m_points[1][index] = points[1][map[index]];
347 m_points[2][index] = points[2][map[index]];
348 }
349}
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)