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 const unsigned face_nodes [5][8]
 Constant: Local node index table for faces.
 
static 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 62 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 41 of file PyramidRule13.cpp.

42{
43 if (i < n_faces)
44 {
45 unsigned nFaceNodes(PyramidRule13::n_face_nodes[i]);
46 auto** nodes = new Node*[nFaceNodes];
47 for (unsigned j = 0; j < nFaceNodes; j++)
48 {
49 nodes[j] = const_cast<Node*>(e->getNode(face_nodes[i][j]));
50 }
51
52 if (i < 4)
53 {
54 return new Tri6(nodes, e->getID());
55 }
56
57 return new Quad8(nodes, e->getID());
58 }
59 ERR("Error in MeshLib::Element::getFace() - Index {:d} does not exist.", i);
60 return nullptr;
61}
void ERR(fmt::format_string< Args... > fmt, Args &&... args)
Definition Logging.h:45
static const unsigned n_face_nodes[5]
Constant: Table for the number of nodes for each face.
static const unsigned face_nodes[5][8]
Constant: Local node index table for faces.
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 68 of file PyramidRule13.h.

70 {
71 return CellRule::identifyFace<PyramidRule13>(element_nodes, nodes);
72 }

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

◆ face_nodes

const unsigned MeshLib::PyramidRule13::face_nodes
static
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.

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

Referenced by getFace().


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