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 constexpr const unsigned face_nodes [6][8]
 Constant: Local node index table for faces.
 
static constexpr 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 80 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 23 of file HexRule20.cpp.

24{
25 if (i < n_faces)
26 {
27 std::array<Node*, 8> nodes{};
28 for (unsigned j = 0; j < 8; j++)
29 {
30 nodes[j] = const_cast<Node*>(e->getNode(face_nodes[i][j]));
31 }
32 return new Quad8(nodes, e->getID());
33 }
34 ERR("Error in MeshLib::Element::getFace() - Index {:d} does not exist.", i);
35 return nullptr;
36}
void ERR(fmt::format_string< Args... > fmt, Args &&... args)
Definition Logging.h:45
static constexpr 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 86 of file HexRule20.h.

88 {
89 return CellRule::identifyFace<HexRule20>(element_nodes, nodes);
90 }
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[12][3]
staticconstexpr
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 64 of file HexRule20.h.

64 {
65 {0, 1, 8}, // Edge 0
66 {1, 2, 9}, // Edge 1
67 {2, 3, 10}, // Edge 2
68 {0, 3, 11}, // Edge 3
69 {4, 5, 12}, // Edge 4
70 {5, 6, 13}, // Edge 5
71 {6, 7, 14}, // Edge 6
72 {4, 7, 15}, // Edge 7
73 {0, 4, 16}, // Edge 8
74 {1, 5, 17}, // Edge 9
75 {2, 6, 18}, // Edge 10
76 {3, 7, 19} // Edge 11
77 };

◆ face_nodes

const unsigned MeshLib::HexRule20::face_nodes[6][8]
staticconstexpr
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.

54 {
55 {0, 3, 2, 1, 11, 10, 9, 8}, // Face 0
56 {0, 1, 5, 4, 8, 17, 12, 16}, // Face 1
57 {1, 2, 6, 5, 9, 18, 13, 17}, // Face 2
58 {2, 3, 7, 6, 10, 19, 14, 18}, // Face 3
59 {3, 0, 4, 7, 11, 16, 15, 19}, // Face 4
60 {4, 5, 6, 7, 12, 13, 14, 15} // Face 5
61 };

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: