Nektar++
Loading...
Searching...
No Matches
Classes | Typedefs | Functions | Variables
Nektar::FaceOrientationTests Namespace Reference

Classes

struct  Parts
 Storage for one built element; the parts must outlive it. More...
 
struct  ShapeDef
 A shape, as the vertices of each of its faces and of each of its edges. The edge table is only needed by the shapes that can be built with their vertices stated outright. More...
 

Typedefs

typedef std::array< NekDouble, 3 > Pt
 

Functions

static StdRegions::Orientation ReferenceOrient (const std::vector< Pt > &ev, const std::vector< Pt > &fv, int base)
 The orientation of a face, recovered from coordinates.
 
static void Build (Parts &p, const ShapeDef &shape, const std::vector< Pt > &x, const std::vector< int > &rot, bool statedVerts=false)
 Build shape, with the vertices of face f started at its rot[f]'th vertex.
 
static void CheckElement (const ShapeDef &shape, const std::vector< Pt > &x, const std::vector< int > &rot, std::set< StdRegions::Orientation > &seen, bool statedVerts)
 Check every face of one built element against the reference algorithm.
 
static void SweepRotations (const ShapeDef &shape, const std::vector< Pt > &x, bool statedVerts=false)
 Check every way of starting each face at a different one of its vertices.
 
 BOOST_AUTO_TEST_CASE (TestTetFaceOrientation)
 
 BOOST_AUTO_TEST_CASE (TestTetFaceOrientationStatedVerts)
 The same sweep over an element built the way NekMesh builds one.
 
 BOOST_AUTO_TEST_CASE (TestPrismFaceOrientationStatedVerts)
 
 BOOST_AUTO_TEST_CASE (TestPyrFaceOrientation)
 
 BOOST_AUTO_TEST_CASE (TestPrismFaceOrientation)
 
 BOOST_AUTO_TEST_CASE (TestHexFaceOrientation)
 
 BOOST_AUTO_TEST_CASE (TestHexFaceOrientationStatedVerts)
 The hexahedron built the way NekMesh builds one.
 

Variables

static const ShapeDef kTet
 The face-vertex tables the geometry classes use, with the padding entry the triangular faces of a prism and a pyramid carry in the source removed.
 
static const ShapeDef kPyr
 
static const ShapeDef kPrism
 
static const ShapeDef kHex
 

Typedef Documentation

◆ Pt

Definition at line 58 of file TestFaceOrientation.cpp.

Function Documentation

◆ BOOST_AUTO_TEST_CASE() [1/7]

Nektar::FaceOrientationTests::BOOST_AUTO_TEST_CASE ( TestHexFaceOrientation  )

Definition at line 558 of file TestFaceOrientation.cpp.

559{
560 SweepRotations(kHex,
561 {Pt{0.0, 0.0, 0.0}, Pt{1.0, 0.0, 0.0}, Pt{1.0, 1.0, 0.0},
562 Pt{0.0, 1.0, 0.0}, Pt{0.0, 0.0, 1.0}, Pt{1.0, 0.0, 1.0},
563 Pt{1.0, 1.0, 1.0}, Pt{0.0, 1.0, 1.0}});
564}
std::array< NekDouble, 3 > Pt
static void SweepRotations(const ShapeDef &shape, const std::vector< Pt > &x, bool statedVerts=false)
Check every way of starting each face at a different one of its vertices.

References kHex, and SweepRotations().

◆ BOOST_AUTO_TEST_CASE() [2/7]

Nektar::FaceOrientationTests::BOOST_AUTO_TEST_CASE ( TestHexFaceOrientationStatedVerts  )

The hexahedron built the way NekMesh builds one.

Of the three element types NekMesh hands over with their vertices stated, this was the one never checked that way. It confirms rather than extends: both constructors reach all 32768 arrangements and all eight orientations, where the tetrahedron's reach 16 of 1296 and 81 of 1296 respectively, which is the gap its bug sat in. All six faces are quadrilateral, and every quadrilateral orientation can be represented, so there is nothing here for a face to fall into the way a triangular one can.

Definition at line 577 of file TestFaceOrientation.cpp.

578{
579 SweepRotations(kHex,
580 {Pt{0.0, 0.0, 0.0}, Pt{1.0, 0.0, 0.0}, Pt{1.0, 1.0, 0.0},
581 Pt{0.0, 1.0, 0.0}, Pt{0.0, 0.0, 1.0}, Pt{1.0, 0.0, 1.0},
582 Pt{1.0, 1.0, 1.0}, Pt{0.0, 1.0, 1.0}},
583 true);
584}

References kHex, and SweepRotations().

◆ BOOST_AUTO_TEST_CASE() [3/7]

Nektar::FaceOrientationTests::BOOST_AUTO_TEST_CASE ( TestPrismFaceOrientation  )

Definition at line 551 of file TestFaceOrientation.cpp.

552{
553 SweepRotations(kPrism,
554 {Pt{0.0, 0.0, 0.0}, Pt{1.0, 0.0, 0.0}, Pt{1.0, 1.0, 0.0},
555 Pt{0.0, 1.0, 0.0}, Pt{0.0, 0.0, 1.0}, Pt{1.0, 0.0, 1.0}});
556}

References kPrism, and SweepRotations().

◆ BOOST_AUTO_TEST_CASE() [4/7]

Nektar::FaceOrientationTests::BOOST_AUTO_TEST_CASE ( TestPrismFaceOrientationStatedVerts  )

Definition at line 536 of file TestFaceOrientation.cpp.

537{
538 SweepRotations(kPrism,
539 {Pt{0.0, 0.0, 0.0}, Pt{1.0, 0.0, 0.0}, Pt{1.0, 1.0, 0.0},
540 Pt{0.0, 1.0, 0.0}, Pt{0.0, 0.0, 1.0}, Pt{1.0, 0.0, 1.0}},
541 true);
542}

References kPrism, and SweepRotations().

◆ BOOST_AUTO_TEST_CASE() [5/7]

Nektar::FaceOrientationTests::BOOST_AUTO_TEST_CASE ( TestPyrFaceOrientation  )

Definition at line 544 of file TestFaceOrientation.cpp.

545{
546 SweepRotations(kPyr,
547 {Pt{0.0, 0.0, 0.0}, Pt{1.0, 0.0, 0.0}, Pt{1.0, 1.0, 0.0},
548 Pt{0.0, 1.0, 0.0}, Pt{0.5, 0.5, 1.0}});
549}

References kPyr, and SweepRotations().

◆ BOOST_AUTO_TEST_CASE() [6/7]

Nektar::FaceOrientationTests::BOOST_AUTO_TEST_CASE ( TestTetFaceOrientation  )

Definition at line 511 of file TestFaceOrientation.cpp.

512{
513 SweepRotations(kTet, {Pt{0.0, 0.0, 0.0}, Pt{1.0, 0.0, 0.0},
514 Pt{0.0, 1.0, 0.0}, Pt{0.0, 0.0, 1.0}});
515}

References kTet, and SweepRotations().

◆ BOOST_AUTO_TEST_CASE() [7/7]

Nektar::FaceOrientationTests::BOOST_AUTO_TEST_CASE ( TestTetFaceOrientationStatedVerts  )

The same sweep over an element built the way NekMesh builds one.

NekMesh orients an element itself and hands the result over, so a face can be presented to it started at any of its vertices – including the third, which the constructor that works the vertices out from the faces can never produce. Reading the orientation off the first vertex alone is enough for what that constructor reaches and not for this, which is how a tetrahedron whose face started at the third vertex came to be rejected outright while two arrangements that have no valid orientation at all were accepted.

Definition at line 528 of file TestFaceOrientation.cpp.

529{
530 SweepRotations(kTet,
531 {Pt{0.0, 0.0, 0.0}, Pt{1.0, 0.0, 0.0}, Pt{0.0, 1.0, 0.0},
532 Pt{0.0, 0.0, 1.0}},
533 true);
534}

References kTet, and SweepRotations().

◆ Build()

static void Nektar::FaceOrientationTests::Build ( Parts &  p,
const ShapeDef &  shape,
const std::vector< Pt > &  x,
const std::vector< int > &  rot,
bool  statedVerts = false 
)
static

Build shape, with the vertices of face f started at its rot[f]'th vertex.

Rotating the edges a face is built from rotates the vertices the face geometry reports, which is what varies the orientation the element then has to recover. The edges themselves are shared between faces, as they are in a real mesh, so the element still sees one edge where two faces meet.

With statedVerts the element is built through the constructor that is given its vertices and edges outright, which is the one NekMesh uses: it reorients an element itself and then says what it arrived at. The other constructor works the vertices out from the faces instead, which ties the element's numbering to theirs and so cannot reach every arrangement a mesh can present.

Definition at line 242 of file TestFaceOrientation.cpp.

244{
245 for (int i = 0; i < shape.nVerts; ++i)
246 {
247 p.verts.push_back(PointGeomUniquePtr(
248 new PointGeom(3u, i, x[i][0], x[i][1], x[i][2])));
249 }
250
251 // Collect the edges from the faces, so only the face tables are stated.
252 std::map<std::pair<int, int>, int> edgeId;
253 auto edgeOf = [&](int a, int b) {
254 auto key = std::minmax(a, b);
255 auto it = edgeId.find({key.first, key.second});
256 if (it != edgeId.end())
257 {
258 return it->second;
259 }
260 int id = (int)p.edges.size();
261 std::array<PointGeom *, 2> ev = {p.verts[key.first].get(),
262 p.verts[key.second].get()};
263 p.edges.push_back(SegGeomUniquePtr(new SegGeom(id, 3, ev)));
264 edgeId[{key.first, key.second}] = id;
265 return id;
266 };
267
268 std::vector<Geometry2D *> faces;
269 for (size_t f = 0; f < shape.faces.size(); ++f)
270 {
271 const std::vector<int> &fv = shape.faces[f];
272 const int n = (int)fv.size();
273
274 // The face's edges, started at vertex rot[f] % n and traversed either
275 // way round. Reversing keeps local edge 0 the same while swapping the
276 // vertices the face reports, which is how the element on the far side
277 // of a shared face sees it.
278 const int start = rot[f] % n;
279 const bool flip = rot[f] >= n;
280 std::vector<SegGeom *> fe(n);
281 for (int j = 0; j < n; ++j)
282 {
283 const int k = flip ? ((start - j) % n + n) % n : (start + j) % n;
284 fe[j] = p.edges[edgeOf(fv[k], fv[(k + 1) % n])].get();
285 }
286
287 if (n == 3)
288 {
289 std::array<SegGeom *, 3> e = {fe[0], fe[1], fe[2]};
290 p.tris.push_back(TriGeomUniquePtr(new TriGeom((int)f, e)));
291 faces.push_back(p.tris.back().get());
292 }
293 else
294 {
295 std::array<SegGeom *, 4> e = {fe[0], fe[1], fe[2], fe[3]};
296 p.quads.push_back(QuadGeomUniquePtr(new QuadGeom((int)f, e)));
297 faces.push_back(p.quads.back().get());
298 }
299 }
300
301 // The element's own edges, in its local edge order.
302 std::vector<SegGeom *> elmtEdges;
303 for (const std::vector<int> &ev : shape.edges)
304 {
305 elmtEdges.push_back(p.edges[edgeOf(ev[0], ev[1])].get());
306 }
307
308 std::vector<PointGeom *> elmtVerts;
309 for (int i = 0; i < shape.nVerts; ++i)
310 {
311 elmtVerts.push_back(p.verts[i].get());
312 }
313
314 if (shape.nVerts == 4)
315 {
316 std::array<TriGeom *, 4> f;
317 for (int i = 0; i < 4; ++i)
318 {
319 f[i] = static_cast<TriGeom *>(faces[i]);
320 }
321
322 if (statedVerts)
323 {
324 std::array<SegGeom *, 6> e;
325 std::array<PointGeom *, 4> v;
326 std::copy(elmtEdges.begin(), elmtEdges.end(), e.begin());
327 std::copy(elmtVerts.begin(), elmtVerts.end(), v.begin());
328 p.tet = TetGeomUniquePtr(new TetGeom(0, f, e, v));
329 }
330 else
331 {
332 p.tet = TetGeomUniquePtr(new TetGeom(0, f));
333 }
334 p.elmt = p.tet.get();
335 }
336 else if (shape.nVerts == 5)
337 {
338 std::array<Geometry2D *, 5> f;
339 std::copy(faces.begin(), faces.end(), f.begin());
340 p.pyr = PyrGeomUniquePtr(new PyrGeom(0, f));
341 p.elmt = p.pyr.get();
342 }
343 else if (shape.nVerts == 6)
344 {
345 std::array<Geometry2D *, 5> f;
346 std::copy(faces.begin(), faces.end(), f.begin());
347
348 if (statedVerts)
349 {
350 std::array<SegGeom *, 9> e;
351 std::array<PointGeom *, 6> v;
352 std::copy(elmtEdges.begin(), elmtEdges.end(), e.begin());
353 std::copy(elmtVerts.begin(), elmtVerts.end(), v.begin());
354 p.prism = PrismGeomUniquePtr(new PrismGeom(0, f, e, v));
355 }
356 else
357 {
358 p.prism = PrismGeomUniquePtr(new PrismGeom(0, f));
359 }
360 p.elmt = p.prism.get();
361 }
362 else
363 {
364 std::array<QuadGeom *, 6> f;
365 for (int i = 0; i < 6; ++i)
366 {
367 f[i] = static_cast<QuadGeom *>(faces[i]);
368 }
369
370 if (statedVerts)
371 {
372 std::array<SegGeom *, 12> e;
373 std::array<PointGeom *, 8> v;
374 std::copy(elmtEdges.begin(), elmtEdges.end(), e.begin());
375 std::copy(elmtVerts.begin(), elmtVerts.end(), v.begin());
376 p.hex = HexGeomUniquePtr(new HexGeom(0, f, e, v));
377 }
378 else
379 {
380 p.hex = HexGeomUniquePtr(new HexGeom(0, f));
381 }
382 p.elmt = p.hex.get();
383 }
384}
int64_t id
unique_ptr_objpool< HexGeom > HexGeomUniquePtr
Definition MeshGraph.h:77
unique_ptr_objpool< QuadGeom > QuadGeomUniquePtr
Definition MeshGraph.h:73
unique_ptr_objpool< PyrGeom > PyrGeomUniquePtr
Definition MeshGraph.h:75
unique_ptr_objpool< PrismGeom > PrismGeomUniquePtr
Definition MeshGraph.h:76
unique_ptr_objpool< SegGeom > SegGeomUniquePtr
Definition MeshGraph.h:71
unique_ptr_objpool< PointGeom > PointGeomUniquePtr
Definition Geometry.h:60
unique_ptr_objpool< TriGeom > TriGeomUniquePtr
Definition MeshGraph.h:72
unique_ptr_objpool< TetGeom > TetGeomUniquePtr
Definition MeshGraph.h:74
std::vector< double > p(NPUPPER)
std::vector< std::vector< int > > faces

References Nektar::FaceOrientationTests::ShapeDef::edges, Nektar::FaceOrientationTests::ShapeDef::faces, id, and Nektar::FaceOrientationTests::ShapeDef::nVerts.

Referenced by CheckElement().

◆ CheckElement()

static void Nektar::FaceOrientationTests::CheckElement ( const ShapeDef &  shape,
const std::vector< Pt > &  x,
const std::vector< int > &  rot,
std::set< StdRegions::Orientation > &  seen,
bool  statedVerts 
)
static

Check every face of one built element against the reference algorithm.

Definition at line 387 of file TestFaceOrientation.cpp.

391{
392 Parts p;
393 Build(p, shape, x, rot, statedVerts);
394
395 for (size_t f = 0; f < shape.faces.size(); ++f)
396 {
397 const std::vector<int> &fvIdx = shape.faces[f];
398 Geometry2D *face = p.elmt->GetFace((int)f);
399
400 std::vector<Pt> ev, fv;
401 int base = -1;
402 for (size_t j = 0; j < fvIdx.size(); ++j)
403 {
404 PointGeom *v = p.elmt->GetVertex(fvIdx[j]);
405 ev.push_back(Pt{(*v)(0), (*v)(1), (*v)(2)});
406 if (v->GetGlobalID() == face->GetVid(0))
407 {
408 base = (int)j;
409 }
410 }
411 BOOST_REQUIRE_MESSAGE(base >= 0, "face geometry does not start at any "
412 "vertex the element has for it");
413
414 for (size_t j = 0; j < fvIdx.size(); ++j)
415 {
416 PointGeom *v = face->GetVertex((int)j);
417 fv.push_back(Pt{(*v)(0), (*v)(1), (*v)(2)});
418 }
419
420 const StdRegions::Orientation expected = ReferenceOrient(ev, fv, base);
421 const StdRegions::Orientation actual = p.elmt->GetForient((int)f);
422 seen.insert(actual);
423
424 std::ostringstream where;
425 where << shape.name << " face " << f << ", rotations [";
426 for (size_t i = 0; i < rot.size(); ++i)
427 {
428 where << rot[i] << (i + 1 < rot.size() ? " " : "");
429 }
430 where << "]: coordinate algorithm gives "
431 << StdRegions::OrientationMap[expected] << ", geometry gives "
432 << StdRegions::OrientationMap[actual];
433
434 BOOST_CHECK_MESSAGE(expected == actual, where.str());
435 }
436}
2D geometry information
Definition Geometry2D.h:50
static void Build(Parts &p, const ShapeDef &shape, const std::vector< Pt > &x, const std::vector< int > &rot, bool statedVerts=false)
Build shape, with the vertices of face f started at its rot[f]'th vertex.
static StdRegions::Orientation ReferenceOrient(const std::vector< Pt > &ev, const std::vector< Pt > &fv, int base)
The orientation of a face, recovered from coordinates.
Storage for one built element; the parts must outlive it.

References Build(), Nektar::FaceOrientationTests::ShapeDef::faces, Nektar::FaceOrientationTests::ShapeDef::name, Nektar::StdRegions::OrientationMap, and ReferenceOrient().

Referenced by SweepRotations().

◆ ReferenceOrient()

static StdRegions::Orientation Nektar::FaceOrientationTests::ReferenceOrient ( const std::vector< Pt > &  ev,
const std::vector< Pt > &  fv,
int  base 
)
static

The orientation of a face, recovered from coordinates.

This is the algorithm the geometry classes used before orientation was read off the vertex permutation, kept so that the two can be compared. It builds the two local axes of the face as the element sees them and as the face geometry itself sees them, and decides the orientation from the signs of the dot products, transposing when the axes do not line up.

Parameters
evPositions of the element's vertices for this face, in the order its face-vertex table gives them.
fvPositions of the face geometry's own vertices, in its order.
baseIndex into ev of the vertex the face geometry starts at.

Definition at line 74 of file TestFaceOrientation.cpp.

77{
78 const bool tri = ev.size() == 3;
79
80 auto sub = [](const Pt &a, const Pt &b) {
81 return Pt{a[0] - b[0], a[1] - b[1], a[2] - b[2]};
82 };
83 auto dot = [](const Pt &a, const Pt &b) {
84 return a[0] * b[0] + a[1] * b[1] + a[2] * b[2];
85 };
86 auto len = [&](const Pt &a) { return std::sqrt(dot(a, a)); };
87
88 // The element's two axes, anchored on whichever vertex the face starts at.
89 Pt eA, eB;
90 if (tri)
91 {
92 switch (base)
93 {
94 case 0:
95 eA = sub(ev[1], ev[0]);
96 eB = sub(ev[2], ev[0]);
97 break;
98 case 1:
99 eA = sub(ev[1], ev[0]);
100 eB = sub(ev[2], ev[1]);
101 break;
102 default:
103 eA = sub(ev[1], ev[2]);
104 eB = sub(ev[2], ev[0]);
105 break;
106 }
107 }
108 else
109 {
110 switch (base)
111 {
112 case 0:
113 eA = sub(ev[1], ev[0]);
114 eB = sub(ev[3], ev[0]);
115 break;
116 case 1:
117 eA = sub(ev[1], ev[0]);
118 eB = sub(ev[2], ev[1]);
119 break;
120 case 2:
121 eA = sub(ev[2], ev[3]);
122 eB = sub(ev[2], ev[1]);
123 break;
124 default:
125 eA = sub(ev[2], ev[3]);
126 eB = sub(ev[3], ev[0]);
127 break;
128 }
129 }
130
131 // The face's own axes.
132 const Pt fA = sub(fv[1], fv[0]);
133 const Pt fB = sub(fv[tri ? 2 : 3], fv[0]);
134
135 unsigned int orientation = 0;
136 NekDouble d1 = dot(eA, fA);
137 NekDouble norm = std::fabs(d1) / len(eA) / len(fA);
138
139 if (std::fabs(norm - 1.0) < NekConstants::kNekZeroTol)
140 {
141 if (d1 < 0.0)
142 {
143 orientation += 2;
144 }
145 if (dot(eB, fB) < 0.0)
146 {
147 orientation++;
148 }
149 }
150 else
151 {
152 // The axes are swapped: compare each against the other.
153 orientation = 4;
154 if (dot(eA, fB) < 0.0)
155 {
156 orientation += 2;
157 }
158 if (dot(eB, fA) < 0.0)
159 {
160 orientation++;
161 }
162 }
163
164 return static_cast<StdRegions::Orientation>(orientation + 5);
165}
void sub(LibUtilities::MemoryRegion< TData > &x, LibUtilities::MemoryRegion< TData > &y, LibUtilities::MemoryRegion< TData > &z)
Definition Math.hpp:809

References Nektar::NekConstants::kNekZeroTol.

Referenced by CheckElement().

◆ SweepRotations()

static void Nektar::FaceOrientationTests::SweepRotations ( const ShapeDef &  shape,
const std::vector< Pt > &  x,
bool  statedVerts = false 
)
static

Check every way of starting each face at a different one of its vertices.

Not every combination describes a consistent element and the constructors reject those, so the sweep reports how many it managed in order that a change which quietly made them all invalid cannot pass as a clean run.

Definition at line 446 of file TestFaceOrientation.cpp.

448{
449 const size_t nf = shape.faces.size();
450 std::vector<int> rot(nf, 0);
451
452 size_t total = 1;
453 for (size_t f = 0; f < nf; ++f)
454 {
455 total *= 2 * shape.faces[f].size();
456 }
457
458 // Enough to cover the shapes with few faces exhaustively, and to sample
459 // the hexahedron's quarter of a million arrangements densely.
460 const size_t kMaxCases = 30000;
461 const size_t stride = total > kMaxCases ? total / kMaxCases : 1;
462
463 // The rejections are expected, so keep them out of the test log.
464 std::ostringstream discard;
465 ErrorUtil::SetErrorStream(discard);
466
467 size_t built = 0;
468 std::set<StdRegions::Orientation> seen;
469 size_t tried = 0;
470 for (size_t n = 0; n < total; n += stride)
471 {
472 ++tried;
473 size_t r = n;
474 for (size_t f = 0; f < nf; ++f)
475 {
476 const size_t m = 2 * shape.faces[f].size();
477 rot[f] = (int)(r % m);
478 r /= m;
479 }
480
481 try
482 {
483 CheckElement(shape, x, rot, seen, statedVerts);
484 ++built;
485 }
486 catch (const ErrorUtil::NekError &)
487 {
488 discard.str("");
489 continue;
490 }
491 }
492
493 ErrorUtil::SetErrorStream(std::cerr);
494
495 BOOST_TEST_MESSAGE(std::string(shape.name) +
496 (statedVerts ? " (vertices stated)" : "") + ": " +
497 std::to_string(built) + " of " + std::to_string(tried) +
498 " rotations built, covering " +
499 std::to_string(seen.size()) + " distinct orientations");
500
501 // A sweep that built nothing, or that only ever saw one orientation, would
502 // agree with anything and is not a test of this at all.
503 BOOST_CHECK_MESSAGE(built > 0, std::string(shape.name) +
504 ": no rotation produced an element");
505 BOOST_CHECK_MESSAGE(seen.size() > 1,
506 std::string(shape.name) +
507 ": only one orientation ever occurred, so the "
508 "comparison proves nothing");
509}
STL namespace.

References CheckElement(), Nektar::FaceOrientationTests::ShapeDef::faces, Nektar::FaceOrientationTests::ShapeDef::name, and Nektar::ErrorUtil::SetErrorStream().

Referenced by BOOST_AUTO_TEST_CASE(), BOOST_AUTO_TEST_CASE(), BOOST_AUTO_TEST_CASE(), BOOST_AUTO_TEST_CASE(), BOOST_AUTO_TEST_CASE(), BOOST_AUTO_TEST_CASE(), and BOOST_AUTO_TEST_CASE().

Variable Documentation

◆ kHex

const ShapeDef Nektar::FaceOrientationTests::kHex
static
Initial value:
= {"hexahedron",
8,
{{0, 1, 2, 3},
{0, 1, 5, 4},
{1, 2, 6, 5},
{3, 2, 6, 7},
{0, 3, 7, 4},
{4, 5, 6, 7}},
{{0, 1},
{1, 2},
{2, 3},
{3, 0},
{0, 4},
{1, 5},
{2, 6},
{3, 7},
{4, 5},
{5, 6},
{6, 7},
{7, 4}}}

Definition at line 191 of file TestFaceOrientation.cpp.

191 {"hexahedron",
192 8,
193 {{0, 1, 2, 3},
194 {0, 1, 5, 4},
195 {1, 2, 6, 5},
196 {3, 2, 6, 7},
197 {0, 3, 7, 4},
198 {4, 5, 6, 7}},
199 {{0, 1},
200 {1, 2},
201 {2, 3},
202 {3, 0},
203 {0, 4},
204 {1, 5},
205 {2, 6},
206 {3, 7},
207 {4, 5},
208 {5, 6},
209 {6, 7},
210 {7, 4}}};

Referenced by BOOST_AUTO_TEST_CASE(), and BOOST_AUTO_TEST_CASE().

◆ kPrism

const ShapeDef Nektar::FaceOrientationTests::kPrism
static
Initial value:
= {
"prism",
6,
{{0, 1, 2, 3}, {0, 1, 4}, {1, 2, 5, 4}, {3, 2, 5}, {0, 3, 5, 4}},
{{0, 1}, {1, 2}, {3, 2}, {0, 3}, {0, 4}, {1, 4}, {2, 5}, {3, 5}, {4, 5}}}

Definition at line 186 of file TestFaceOrientation.cpp.

186 {
187 "prism",
188 6,
189 {{0, 1, 2, 3}, {0, 1, 4}, {1, 2, 5, 4}, {3, 2, 5}, {0, 3, 5, 4}},
190 {{0, 1}, {1, 2}, {3, 2}, {0, 3}, {0, 4}, {1, 4}, {2, 5}, {3, 5}, {4, 5}}};

Referenced by BOOST_AUTO_TEST_CASE(), and BOOST_AUTO_TEST_CASE().

◆ kPyr

const ShapeDef Nektar::FaceOrientationTests::kPyr
static
Initial value:
= {
"pyramid", 5, {{0, 1, 2, 3}, {0, 1, 4}, {1, 2, 4}, {3, 2, 4}, {0, 3, 4}}}

Definition at line 184 of file TestFaceOrientation.cpp.

184 {
185 "pyramid", 5, {{0, 1, 2, 3}, {0, 1, 4}, {1, 2, 4}, {3, 2, 4}, {0, 3, 4}}};

Referenced by BOOST_AUTO_TEST_CASE().

◆ kTet

const ShapeDef Nektar::FaceOrientationTests::kTet
static
Initial value:
= {"tetrahedron",
4,
{{0, 1, 2}, {0, 1, 3}, {1, 2, 3}, {0, 2, 3}},
{{0, 1}, {1, 2}, {0, 2}, {0, 3}, {1, 3}, {2, 3}}}

The face-vertex tables the geometry classes use, with the padding entry the triangular faces of a prism and a pyramid carry in the source removed.

Definition at line 180 of file TestFaceOrientation.cpp.

180 {"tetrahedron",
181 4,
182 {{0, 1, 2}, {0, 1, 3}, {1, 2, 3}, {0, 2, 3}},
183 {{0, 1}, {1, 2}, {0, 2}, {0, 3}, {1, 3}, {2, 3}}};

Referenced by BOOST_AUTO_TEST_CASE(), and BOOST_AUTO_TEST_CASE().