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;
177 for (
size_t z = 0, index = 0; z < npts; ++z)
179 for (
size_t y = 0; y < npts - z; ++y)
181 for (
size_t x = 0; x < npts - z - y; ++x, ++index)
184 if (isVertex(x, y, z, npts))
187 vertex.push_back(index);
189 else if (isEdge(x, y, z, npts))
192 if (isEdge_01(x, y, z, npts))
195 iEdge_01.push_back(index);
197 else if (isEdge_12(x, y, z, npts))
200 iEdge_12.push_back(index);
202 else if (isEdge_20(x, y, z, npts))
205 iEdge_20.insert(iEdge_20.begin(), index);
207 else if (isEdge_03(x, y, z, npts))
210 iEdge_03.push_back(index);
212 else if (isEdge_13(x, y, z, npts))
215 iEdge_13.push_back(index);
217 else if (isEdge_23(x, y, z, npts))
220 iEdge_23.push_back(index);
223 else if (isFace(x, y, z, npts))
226 if (isFace_012(x, y, z, npts))
229 iFace_012.push_back(index);
231 else if (isFace_013(x, y, z, npts))
234 iFace_013.push_back(index);
236 else if (isFace_123(x, y, z, npts))
239 iFace_123.push_back(index);
241 else if (isFace_203(x, y, z, npts))
244 iFace_203.push_back(index);
250 interiorVolumePoints.push_back(index);
258 for (
size_t n = 0; n < vertex.size(); ++n)
261 map.push_back(vertex[n]);
264 for (
size_t n = 0; n < iEdge_01.size(); ++n)
267 map.push_back(iEdge_01[n]);
270 for (
size_t n = 0; n < iEdge_12.size(); ++n)
273 map.push_back(iEdge_12[n]);
276 for (
size_t n = 0; n < iEdge_20.size(); ++n)
279 map.push_back(iEdge_20[n]);
282 for (
size_t n = 0; n < iEdge_03.size(); ++n)
285 map.push_back(iEdge_03[n]);
288 for (
size_t n = 0; n < iEdge_13.size(); ++n)
291 map.push_back(iEdge_13[n]);
294 for (
size_t n = 0; n < iEdge_23.size(); ++n)
297 map.push_back(iEdge_23[n]);
300 for (
size_t n = 0; n < iFace_012.size(); ++n)
303 map.push_back(iFace_012[n]);
306 for (
size_t n = 0; n < iFace_013.size(); ++n)
309 map.push_back(iFace_013[n]);
312 for (
size_t n = 0; n < iFace_123.size(); ++n)
315 map.push_back(iFace_123[n]);
318 for (
size_t n = 0; n < iFace_203.size(); ++n)
321 map.push_back(iFace_203[n]);
324 for (
size_t n = 0; n < interiorVolumePoints.size(); ++n)
327 map.push_back(interiorVolumePoints[n]);
334 for (
size_t index = 0; index < map.size(); ++index)
337 points[0][index] =
m_points[0][index];
338 points[1][index] =
m_points[1][index];
339 points[2][index] =
m_points[2][index];
342 for (
size_t index = 0; index < map.size(); ++index)
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]];