OGS
MeshLib::PrismRule15 Class Reference

Detailed Description

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

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

Definition at line 44 of file PrismRule15.h.

#include <PrismRule15.h>

Inheritance diagram for MeshLib::PrismRule15:
[legend]
Collaboration diagram for MeshLib::PrismRule15:
[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::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 = 15u
 Constant: The number of all nodes for this element.
 
static const CellType cell_type = CellType::PRISM15
 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 [9][3]
 Constant: Local node index table for edge.
 
static const unsigned n_face_nodes [5] = {6, 8, 8, 8, 6}
 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 PrismRule15.h.

Member Function Documentation

◆ getFace()

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

Returns the i-th face of the element.

Definition at line 42 of file PrismRule15.cpp.

43{
44 if (i < n_faces)
45 {
46 unsigned nFaceNodes(PrismRule15::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 Tri6(nodes, e->getID());
56 }
57
58 return new Quad8(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][8]
Constant: Local node index table for faces.
Definition PrismRule15.h:54
static const unsigned n_face_nodes[5]
Constant: Table for the number of nodes for each face.
Definition PrismRule15.h:60
static const unsigned n_faces
Constant: The number of faces.
Definition PrismRule.h:29
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::PrismRule::n_faces.

◆ identifyFace()

static unsigned MeshLib::PrismRule15::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 PrismRule15.h.

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

Member Data Documentation

◆ cell_type

const CellType MeshLib::PrismRule15::cell_type = CellType::PRISM15
static

Constant: The FEM type of the element.

Definition at line 51 of file PrismRule15.h.

◆ edge_nodes

const unsigned MeshLib::PrismRule15::edge_nodes
static
Initial value:
= {
{0, 1, 6},
{1, 2, 7},
{0, 2, 8},
{0, 3, 12},
{1, 4, 13},
{2, 5, 14},
{3, 4, 9},
{4, 5, 10},
{3, 5, 11}
}

Constant: Local node index table for edge.

Definition at line 57 of file PrismRule15.h.

◆ face_nodes

const unsigned MeshLib::PrismRule15::face_nodes
static
Initial value:
= {
{0, 2, 1, 8, 7, 6, 99, 99},
{0, 1, 4, 3, 6, 13, 9, 12},
{1, 2, 5, 4, 7, 14, 10, 13},
{2, 0, 3, 5, 8, 12, 11, 14},
{3, 4, 5, 9, 10, 11, 99, 99}
}

Constant: Local node index table for faces.

Definition at line 54 of file PrismRule15.h.

Referenced by getFace().

◆ n_all_nodes

const unsigned MeshLib::PrismRule15::n_all_nodes = 15u
static

Constant: The number of all nodes for this element.

Definition at line 48 of file PrismRule15.h.

◆ n_face_nodes

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

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

Definition at line 60 of file PrismRule15.h.

Referenced by getFace().


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