OGS
MeshLib::HexRule8 Class Reference

Detailed Description

A 8-nodes Hexahedron Element.

6
7-----------6
/: /|
/ : / |
7/ : /5 |
/ 11: / | 10
/ : 4 / |
4-----------5 |
| : | 2 |
| 3.....|.....2
| . | /
8 | . |9 /
| 3. | / 1
| . | /
|. |/
0-----------1
0
TemplateElement< MeshLib::HexRule8 > Hex
Definition Hex.h:25

Definition at line 43 of file HexRule8.h.

#include <HexRule8.h>

Inheritance diagram for MeshLib::HexRule8:
[legend]
Collaboration diagram for MeshLib::HexRule8:
[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::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 = 8u
 Constant: The number of all nodes for this element.
 
static const CellType cell_type = CellType::HEX8
 Constant: The FEM type of the element.
 
static const unsigned face_nodes [6][4]
 Constant: Local node index table for faces.
 
static const unsigned edge_nodes [12][2]
 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 59 of file HexRule8.h.

Member Function Documentation

◆ getFace()

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

Returns the i-th face of the element.

Definition at line 47 of file HexRule8.cpp.

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

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

◆ identifyFace()

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

67 {
68 return CellRule::identifyFace<HexRule8>(element_nodes, nodes);
69 }

Member Data Documentation

◆ cell_type

const CellType MeshLib::HexRule8::cell_type = CellType::HEX8
static

Constant: The FEM type of the element.

Definition at line 50 of file HexRule8.h.

◆ edge_nodes

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

Constant: Local node index table for edge.

Definition at line 56 of file HexRule8.h.

◆ face_nodes

const unsigned MeshLib::HexRule8::face_nodes
static
Initial value:
= {
{0, 3, 2, 1},
{0, 1, 5, 4},
{1, 2, 6, 5},
{2, 3, 7, 6},
{3, 0, 4, 7},
{4, 5, 6, 7}
}

Constant: Local node index table for faces.

Definition at line 53 of file HexRule8.h.

Referenced by getFace().

◆ n_all_nodes

const unsigned MeshLib::HexRule8::n_all_nodes = 8u
static

Constant: The number of all nodes for this element.

Definition at line 47 of file HexRule8.h.


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