OGS
MeshLib::PyramidRule13 Class Reference

Detailed Description

This class represents a 3d pyramid element. The following sketch shows the node and edge numbering.

4
//|\
// | \
11// | \10
// |9 \
// | \
3/.... |.....2
./ | 7 /
./12 | /
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. More...
 
- Public Types inherited from MeshLib::PyramidRule5
using EdgeReturn = MeshLib::LinearEdgeReturn
 Returns the i-th edge of the element. More...
 

Static Public Member Functions

static const ElementgetFace (const Element *e, unsigned i)
 Returns the i-th face of the element. More...
 
- Static Public Member Functions inherited from MeshLib::PyramidRule5
static const ElementgetFace (const Element *e, unsigned i)
 Returns the i-th face of the element. More...
 
static bool isPntInElement (Node const *const *nodes, MathLib::Point3d const &pnt, double eps)
 
static ElementErrorCode validate (const Element *e)
 
static unsigned identifyFace (Node const *const *, Node const *nodes[3])
 Returns the ID of a face given an array of nodes. More...
 
static double computeVolume (Node const *const *_nodes)
 Calculates the volume of a convex hexahedron by partitioning it into six tetrahedra. More...
 
- 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. More...
 
static const CellType cell_type = CellType::PYRAMID13
 Constant: The FEM type of the element. More...
 
static const unsigned face_nodes [5][8]
 Constant: Local node index table for faces. More...
 
static const unsigned edge_nodes [8][3]
 Constant: Local node index table for edge. More...
 
static const unsigned n_face_nodes [5] = {6, 6, 6, 6, 8}
 Constant: Table for the number of nodes for each face. More...
 
- Static Public Attributes inherited from MeshLib::PyramidRule5
static const unsigned n_base_nodes = 5u
 Constant: The number of base nodes for this element. More...
 
static const unsigned n_all_nodes = 5u
 Constant: The number of all nodes for this element. More...
 
static const MeshElemType mesh_elem_type = MeshElemType::PYRAMID
 Constant: The geometric type of the element. More...
 
static const CellType cell_type = CellType::PYRAMID5
 Constant: The FEM type of the element. More...
 
static const unsigned n_faces = 5
 Constant: The number of faces. More...
 
static const unsigned n_edges = 8
 Constant: The number of edges. More...
 
static const unsigned n_neighbors = 5
 Constant: The number of neighbors. More...
 
static const unsigned face_nodes [5][4]
 Constant: Local node index table for faces. More...
 
static const unsigned edge_nodes [8][2]
 Constant: Local node index table for edge. More...
 
static const unsigned n_face_nodes [5] = {3, 3, 3, 3, 4}
 Constant: Table for the number of nodes for each face. More...
 
- Static Public Attributes inherited from MeshLib::CellRule
static const unsigned dimension = 3u
 Constant: Dimension of this mesh element. More...
 

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 < e->getNumberOfFaces())
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(char const *fmt, Args const &... args)
Definition: Logging.h:42
static const unsigned n_face_nodes[5]
Constant: Table for the number of nodes for each face.
Definition: PyramidRule13.h:59
static const unsigned face_nodes[5][8]
Constant: Local node index table for faces.
Definition: PyramidRule13.h:53
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(), and n_face_nodes.

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},
{0, 3, 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: