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