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 43 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 77 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 22 of file PyramidRule13.cpp.

23{
24 if (i < n_faces)
25 {
26 unsigned nFaceNodes(PyramidRule13::n_face_nodes[i]);
27 auto** nodes = new Node*[nFaceNodes];
28 for (unsigned j = 0; j < nFaceNodes; j++)
29 {
30 nodes[j] = const_cast<Node*>(e->getNode(face_nodes[i][j]));
31 }
32
33 if (i < 4)
34 {
35 return new Tri6(nodes, e->getID());
36 }
37
38 return new Quad8(nodes, e->getID());
39 }
40 ERR("Error in MeshLib::Element::getFace() - Index {:d} does not exist.", i);
41 return nullptr;
42}
void ERR(fmt::format_string< Args... > fmt, Args &&... args)
Definition Logging.h:45
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:30
TemplateElement< MeshLib::QuadRule8 > Quad8
Definition Quad.h:29
TemplateElement< MeshLib::TriRule6 > Tri6
Definition Tri.h:27

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

◆ identifyFace()

static 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 83 of file PyramidRule13.h.

85 {
86 return CellRule::identifyFace<PyramidRule13>(element_nodes, nodes);
87 }
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:39

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 50 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 62 of file PyramidRule13.h.

62 {
63 {0, 1, 5}, // Edge 0
64 {1, 2, 6}, // Edge 1
65 {2, 3, 7}, // Edge 2
66 {3, 0, 8}, // Edge 3
67 {0, 4, 9}, // Edge 4
68 {1, 4, 10}, // Edge 5
69 {2, 4, 11}, // Edge 6
70 {3, 4, 12} // Edge 7
71 };

◆ 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 53 of file PyramidRule13.h.

53 {
54 {0, 1, 4, 5, 10, 9, 99, 99}, // Face 0
55 {1, 2, 4, 6, 11, 10, 99, 99}, // Face 1
56 {2, 3, 4, 7, 12, 11, 99, 99}, // Face 2
57 {3, 0, 4, 8, 9, 12, 99, 99}, // Face 3
58 {0, 3, 2, 1, 8, 7, 6, 5} // Face 4
59 };

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 47 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 74 of file PyramidRule13.h.

Referenced by getFace().


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