OGS
MeshLib::PyramidRule13 Class Reference

Detailed Description

This class represents a 3d pyramid element with 13 nodes. The following sketch shows the node numbering.

4
//|\
// | \
12 // | \11
// |10 \
// | \
3/.... |.....2
./ | 7 /
./9 | /
8./ | /6
./ | /
./ |/
0------------1
5

Definition at line 36 of file PyramidRule13.h.

#include <PyramidRule13.h>

Inheritance diagram for MeshLib::PyramidRule13:
[legend]
Collaboration diagram for MeshLib::PyramidRule13:
[legend]

Public Types

using EdgeReturn = MeshLib::QuadraticEdgeReturn
 Returns the i-th edge of the element.

Static Public Member Functions

static const ElementgetFace (const Element *e, unsigned i)
 Returns the i-th face of the element.
static unsigned identifyFace (Node const *const *element_nodes, Node const *nodes[3])
 Returns the ID of a face given an array of nodes.
Static Public Member Functions inherited from MeshLib::PyramidRule
static bool isPntInElement (Node const *const *nodes, MathLib::Point3d const &pnt, double eps)
static ElementErrorCode validate (const Element *e)
static double computeVolume (Node const *const *element_nodes)
Static Public Member Functions inherited from MeshLib::CellRule
static bool testElementNodeOrder (Element const &e)

Static Public Attributes

static const unsigned n_all_nodes = 13u
 Constant: The number of all nodes for this element.
static const CellType cell_type = CellType::PYRAMID13
 Constant: The FEM type of the element.
static constexpr const unsigned face_nodes [5][8]
 Constant: Local node index table for faces.
static constexpr const unsigned edge_nodes [8][3]
 Constant: Local node index table for edge.
static const unsigned n_face_nodes [5] = {6, 6, 6, 6, 8}
 Constant: Table for the number of nodes for each face.
Static Public Attributes inherited from MeshLib::PyramidRule
static const unsigned n_base_nodes = 5u
 Constant: The number of base nodes for this element.
static const MeshElemType mesh_elem_type = MeshElemType::PYRAMID
 Constant: The geometric type of the element.
static const unsigned n_faces = 5
 Constant: The number of faces.
static const unsigned n_edges = 8
 Constant: The number of edges.
static const unsigned n_neighbors = 5
 Constant: The number of neighbors.
Static Public Attributes inherited from MeshLib::CellRule
static const unsigned dimension = 3u
 Constant: Dimension of this mesh element.

Additional Inherited Members

Static Protected Member Functions inherited from MeshLib::CellRule
template<typename ElementRule>
static unsigned identifyFace (Node const *const *element_nodes, Node const *nodes[ElementRule::dimension])
 Returns the ID of a face given an array of nodes.

Member Typedef Documentation

◆ EdgeReturn

Returns the i-th edge of the element.

Definition at line 70 of file PyramidRule13.h.

Member Function Documentation

◆ getFace()

const Element * MeshLib::PyramidRule13::getFace ( const Element * e,
unsigned i )
static

Returns the i-th face of the element.

Definition at line 15 of file PyramidRule13.cpp.

16{
17 if (i < n_faces)
18 {
19 unsigned nFaceNodes(PyramidRule13::n_face_nodes[i]);
20 auto** nodes = new Node*[nFaceNodes];
21 for (unsigned j = 0; j < nFaceNodes; j++)
22 {
23 nodes[j] = const_cast<Node*>(e->getNode(face_nodes[i][j]));
24 }
25
26 if (i < 4)
27 {
28 return new Tri6(nodes, e->getID());
29 }
30
31 return new Quad8(nodes, e->getID());
32 }
33 ERR("Error in MeshLib::Element::getFace() - Index {:d} does not exist.", i);
34 return nullptr;
35}
void ERR(fmt::format_string< Args... > fmt, Args &&... args)
Definition Logging.h:40
static constexpr const unsigned face_nodes[5][8]
Constant: Local node index table for faces.
static const unsigned n_face_nodes[5]
Constant: Table for the number of nodes for each face.
static const unsigned n_faces
Constant: The number of faces.
Definition PyramidRule.h:23
TemplateElement< MeshLib::QuadRule8 > Quad8
Definition Quad.h:18
TemplateElement< MeshLib::TriRule6 > Tri6
Definition Tri.h:16

References ERR(), face_nodes, MeshLib::Element::getID(), MeshLib::Element::getNode(), n_face_nodes, and MeshLib::PyramidRule::n_faces.

◆ identifyFace()

unsigned MeshLib::PyramidRule13::identifyFace ( Node const *const * element_nodes,
Node const * nodes[3] )
inlinestatic

Returns the ID of a face given an array of nodes.

Definition at line 76 of file PyramidRule13.h.

78 {
79 return CellRule::identifyFace<PyramidRule13>(element_nodes, nodes);
80 }
static unsigned identifyFace(Node const *const *element_nodes, Node const *nodes[ElementRule::dimension])
Returns the ID of a face given an array of nodes.
Definition CellRule.h:32

References MeshLib::CellRule::identifyFace().

Member Data Documentation

◆ cell_type

const CellType MeshLib::PyramidRule13::cell_type = CellType::PYRAMID13
static

Constant: The FEM type of the element.

Definition at line 43 of file PyramidRule13.h.

◆ edge_nodes

const unsigned MeshLib::PyramidRule13::edge_nodes[8][3]
staticconstexpr
Initial value:
= {
{0, 1, 5},
{1, 2, 6},
{2, 3, 7},
{3, 0, 8},
{0, 4, 9},
{1, 4, 10},
{2, 4, 11},
{3, 4, 12}
}

Constant: Local node index table for edge.

Definition at line 55 of file PyramidRule13.h.

55 {
56 {0, 1, 5}, // Edge 0
57 {1, 2, 6}, // Edge 1
58 {2, 3, 7}, // Edge 2
59 {3, 0, 8}, // Edge 3
60 {0, 4, 9}, // Edge 4
61 {1, 4, 10}, // Edge 5
62 {2, 4, 11}, // Edge 6
63 {3, 4, 12} // Edge 7
64 };

◆ face_nodes

const unsigned MeshLib::PyramidRule13::face_nodes[5][8]
staticconstexpr
Initial value:
= {
{0, 1, 4, 5, 10, 9, 99, 99},
{1, 2, 4, 6, 11, 10, 99, 99},
{2, 3, 4, 7, 12, 11, 99, 99},
{3, 0, 4, 8, 9, 12, 99, 99},
{0, 3, 2, 1, 8, 7, 6, 5}
}

Constant: Local node index table for faces.

Definition at line 46 of file PyramidRule13.h.

46 {
47 {0, 1, 4, 5, 10, 9, 99, 99}, // Face 0
48 {1, 2, 4, 6, 11, 10, 99, 99}, // Face 1
49 {2, 3, 4, 7, 12, 11, 99, 99}, // Face 2
50 {3, 0, 4, 8, 9, 12, 99, 99}, // Face 3
51 {0, 3, 2, 1, 8, 7, 6, 5} // Face 4
52 };

Referenced by getFace().

◆ n_all_nodes

const unsigned MeshLib::PyramidRule13::n_all_nodes = 13u
static

Constant: The number of all nodes for this element.

Definition at line 40 of file PyramidRule13.h.

◆ n_face_nodes

const unsigned MeshLib::PyramidRule13::n_face_nodes = {6, 6, 6, 6, 8}
static

Constant: Table for the number of nodes for each face.

Definition at line 67 of file PyramidRule13.h.

Referenced by getFace().


The documentation for this class was generated from the following files: