OGS
MeshLib::PrismRule6 Class Reference

Detailed Description

This class represents a 3d prism element with 6 nodes. The following sketch shows the node and edge numbering.

5
/ \
/ : \
8/ : \7
/ :5 \
/ : 6 \
3-----------4
| : |
| 2 |
| . . |
3| . . |4
| 2. .1 |
| . . |
|. .|
0-----------1
0

Definition at line 44 of file PrismRule6.h.

#include <PrismRule6.h>

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

Public Types

using EdgeReturn = MeshLib::LinearEdgeReturn
 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::PrismRule
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 = 6u
 Constant: The number of all nodes for this element.
 
static const CellType cell_type = CellType::PRISM6
 Constant: The FEM type of the element.
 
static const unsigned face_nodes [5][4]
 Constant: Local node index table for faces.
 
static const unsigned edge_nodes [9][2]
 Constant: Local node index table for edge.
 
static const unsigned n_face_nodes [5] = {3, 4, 4, 4, 3}
 Constant: Table for the number of nodes for each face.
 
- Static Public Attributes inherited from MeshLib::PrismRule
static const unsigned n_base_nodes = 6u
 Constant: The number of base nodes for this element.
 
static const MeshElemType mesh_elem_type = MeshElemType::PRISM
 Constant: The geometric type of the element.
 
static const unsigned n_faces = 5
 Constant: The number of faces.
 
static const unsigned n_edges = 9
 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 63 of file PrismRule6.h.

Member Function Documentation

◆ getFace()

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

Returns the i-th face of the element.

Definition at line 42 of file PrismRule6.cpp.

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

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

◆ identifyFace()

static unsigned MeshLib::PrismRule6::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 69 of file PrismRule6.h.

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

Member Data Documentation

◆ cell_type

const CellType MeshLib::PrismRule6::cell_type = CellType::PRISM6
static

Constant: The FEM type of the element.

Definition at line 51 of file PrismRule6.h.

◆ edge_nodes

const unsigned MeshLib::PrismRule6::edge_nodes
static
Initial value:
= {
{0, 1},
{1, 2},
{0, 2},
{0, 3},
{1, 4},
{2, 5},
{3, 4},
{4, 5},
{3, 5}
}

Constant: Local node index table for edge.

Definition at line 57 of file PrismRule6.h.

◆ face_nodes

const unsigned MeshLib::PrismRule6::face_nodes
static
Initial value:
= {
{0, 2, 1, 99},
{0, 1, 4, 3},
{1, 2, 5, 4},
{2, 0, 3, 5},
{3, 4, 5, 99}
}

Constant: Local node index table for faces.

Definition at line 54 of file PrismRule6.h.

Referenced by getFace().

◆ n_all_nodes

const unsigned MeshLib::PrismRule6::n_all_nodes = 6u
static

Constant: The number of all nodes for this element.

Definition at line 48 of file PrismRule6.h.

◆ n_face_nodes

const unsigned MeshLib::PrismRule6::n_face_nodes = {3, 4, 4, 4, 3}
static

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

Definition at line 60 of file PrismRule6.h.

Referenced by getFace().


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