OGS
MeshLib::HexRule20 Class Reference

Detailed Description

A 20-nodes Hexahedron Element.

Hex:
14
7-----------6
/: /|
/ : / |
15/ : /13|
/ 19: / | 18
/ : 12 / |
4-----------5 |
| : | 10 |
| 3.....|.....2
| . | /
16 | . |17 /
|11. | / 9
| . | /
|. |/
0-----------1
8
TemplateElement< MeshLib::HexRule8 > Hex
Definition Hex.h:25

Definition at line 44 of file HexRule20.h.

#include <HexRule20.h>

Inheritance diagram for MeshLib::HexRule20:
[legend]
Collaboration diagram for MeshLib::HexRule20:
[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::HexRule
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 = 20u
 Constant: The number of all nodes for this element.
 
static const CellType cell_type = CellType::HEX20
 Constant: The FEM type of the element.
 
static const unsigned face_nodes [6][8]
 Constant: Local node index table for faces.
 
static const unsigned edge_nodes [12][3]
 Constant: Local node index table for edge.
 
- Static Public Attributes inherited from MeshLib::HexRule
static const unsigned n_base_nodes = 8u
 Constant: The number of base nodes for this element.
 
static const MeshElemType mesh_elem_type = MeshElemType::HEXAHEDRON
 Constant: The geometric type of the element.
 
static const unsigned n_faces = 6
 Constant: The number of faces.
 
static const unsigned n_edges = 12
 Constant: The number of edges.
 
static const unsigned n_neighbors = 6
 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 60 of file HexRule20.h.

Member Function Documentation

◆ getFace()

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

Returns the i-th face of the element.

Definition at line 46 of file HexRule20.cpp.

47{
48 if (i < n_faces)
49 {
50 std::array<Node*, 8> nodes{};
51 for (unsigned j = 0; j < 8; j++)
52 {
53 nodes[j] = const_cast<Node*>(e->getNode(face_nodes[i][j]));
54 }
55 return new Quad8(nodes, e->getID());
56 }
57 ERR("Error in MeshLib::Element::getFace() - Index {:d} does not exist.", i);
58 return nullptr;
59}
void ERR(fmt::format_string< Args... > fmt, Args &&... args)
Definition Logging.h:45
static const unsigned face_nodes[6][8]
Constant: Local node index table for faces.
Definition HexRule20.h:54
static const unsigned n_faces
Constant: The number of faces.
Definition HexRule.h:29
TemplateElement< MeshLib::QuadRule8 > Quad8
Definition Quad.h:29

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

◆ identifyFace()

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

68 {
69 return CellRule::identifyFace<HexRule20>(element_nodes, nodes);
70 }
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::HexRule20::cell_type = CellType::HEX20
static

Constant: The FEM type of the element.

Definition at line 51 of file HexRule20.h.

◆ edge_nodes

const unsigned MeshLib::HexRule20::edge_nodes
static
Initial value:
= {
{0, 1, 8},
{1, 2, 9},
{2, 3, 10},
{0, 3, 11},
{4, 5, 12},
{5, 6, 13},
{6, 7, 14},
{4, 7, 15},
{0, 4, 16},
{1, 5, 17},
{2, 6, 18},
{3, 7, 19}
}

Constant: Local node index table for edge.

Definition at line 57 of file HexRule20.h.

◆ face_nodes

const unsigned MeshLib::HexRule20::face_nodes
static
Initial value:
= {
{0, 3, 2, 1, 11, 10, 9, 8},
{0, 1, 5, 4, 8, 17, 12, 16},
{1, 2, 6, 5, 9, 18, 13, 17},
{2, 3, 7, 6, 10, 19, 14, 18},
{3, 0, 4, 7, 11, 16, 15, 19},
{4, 5, 6, 7, 12, 13, 14, 15}
}

Constant: Local node index table for faces.

Definition at line 54 of file HexRule20.h.

Referenced by getFace().

◆ n_all_nodes

const unsigned MeshLib::HexRule20::n_all_nodes = 20u
static

Constant: The number of all nodes for this element.

Definition at line 48 of file HexRule20.h.


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