|
Nektar++
|
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 std::array<NekDouble, 3> Nektar::FaceOrientationTests::Pt |
Definition at line 58 of file TestFaceOrientation.cpp.
| Nektar::FaceOrientationTests::BOOST_AUTO_TEST_CASE | ( | TestHexFaceOrientation | ) |
Definition at line 558 of file TestFaceOrientation.cpp.
References kHex, and SweepRotations().
| 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.
References kHex, and SweepRotations().
| Nektar::FaceOrientationTests::BOOST_AUTO_TEST_CASE | ( | TestPrismFaceOrientation | ) |
Definition at line 551 of file TestFaceOrientation.cpp.
References kPrism, and SweepRotations().
| Nektar::FaceOrientationTests::BOOST_AUTO_TEST_CASE | ( | TestPrismFaceOrientationStatedVerts | ) |
Definition at line 536 of file TestFaceOrientation.cpp.
References kPrism, and SweepRotations().
| Nektar::FaceOrientationTests::BOOST_AUTO_TEST_CASE | ( | TestPyrFaceOrientation | ) |
Definition at line 544 of file TestFaceOrientation.cpp.
References kPyr, and SweepRotations().
| Nektar::FaceOrientationTests::BOOST_AUTO_TEST_CASE | ( | TestTetFaceOrientation | ) |
Definition at line 511 of file TestFaceOrientation.cpp.
References kTet, and SweepRotations().
| 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.
References kTet, and SweepRotations().
|
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.
References Nektar::FaceOrientationTests::ShapeDef::edges, Nektar::FaceOrientationTests::ShapeDef::faces, id, and Nektar::FaceOrientationTests::ShapeDef::nVerts.
Referenced by CheckElement().
|
static |
Check every face of one built element against the reference algorithm.
Definition at line 387 of file TestFaceOrientation.cpp.
References Build(), Nektar::FaceOrientationTests::ShapeDef::faces, Nektar::FaceOrientationTests::ShapeDef::name, Nektar::StdRegions::OrientationMap, and ReferenceOrient().
Referenced by SweepRotations().
|
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.
| ev | Positions of the element's vertices for this face, in the order its face-vertex table gives them. |
| fv | Positions of the face geometry's own vertices, in its order. |
| base | Index into ev of the vertex the face geometry starts at. |
Definition at line 74 of file TestFaceOrientation.cpp.
References Nektar::NekConstants::kNekZeroTol.
Referenced by CheckElement().
|
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.
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().
|
static |
Definition at line 191 of file TestFaceOrientation.cpp.
Referenced by BOOST_AUTO_TEST_CASE(), and BOOST_AUTO_TEST_CASE().
|
static |
Definition at line 186 of file TestFaceOrientation.cpp.
Referenced by BOOST_AUTO_TEST_CASE(), and BOOST_AUTO_TEST_CASE().
|
static |
Definition at line 184 of file TestFaceOrientation.cpp.
Referenced by BOOST_AUTO_TEST_CASE().
|
static |
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.
Referenced by BOOST_AUTO_TEST_CASE(), and BOOST_AUTO_TEST_CASE().