OGS
HexRule8.h
Go to the documentation of this file.
1
11#pragma once
12
13#include "EdgeReturn.h"
14#include "HexRule.h"
15
16namespace MeshLib
17{
43class HexRule8 : public HexRule
44{
45public:
47 static const unsigned n_all_nodes = 8u;
48
51
53 constexpr static const unsigned face_nodes[6][4] = {
54 {0, 3, 2, 1}, // Face 0
55 {0, 1, 5, 4}, // Face 1
56 {1, 2, 6, 5}, // Face 2
57 {2, 3, 7, 6}, // Face 3
58 {3, 0, 4, 7}, // Face 4
59 {4, 5, 6, 7} // Face 5
60 };
61
63 constexpr static const unsigned edge_nodes[12][2] = {
64 {0, 1}, // Edge 0
65 {1, 2}, // Edge 1
66 {2, 3}, // Edge 2
67 {0, 3}, // Edge 3
68 {4, 5}, // Edge 4
69 {5, 6}, // Edge 5
70 {6, 7}, // Edge 6
71 {4, 7}, // Edge 7
72 {0, 4}, // Edge 8
73 {1, 5}, // Edge 9
74 {2, 6}, // Edge 10
75 {3, 7} // Edge 11
76 };
77
80
82 static const Element* getFace(const Element* e, unsigned i);
83
85 static unsigned identifyFace(Node const* const* element_nodes,
86 Node const* nodes[3])
87 {
88 return CellRule::identifyFace<HexRule8>(element_nodes, nodes);
89 }
90}; /* class */
91
92} // namespace MeshLib
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
static const Element * getFace(const Element *e, unsigned i)
Returns the i-th face of the element.
Definition HexRule8.cpp:23
static const unsigned n_all_nodes
Constant: The number of all nodes for this element.
Definition HexRule8.h:47
static constexpr const unsigned face_nodes[6][4]
Constant: Local node index table for faces.
Definition HexRule8.h:53
static constexpr const unsigned edge_nodes[12][2]
Constant: Local node index table for edge.
Definition HexRule8.h:63
static unsigned identifyFace(Node const *const *element_nodes, Node const *nodes[3])
Returns the ID of a face given an array of nodes.
Definition HexRule8.h:85
static const CellType cell_type
Constant: The FEM type of the element.
Definition HexRule8.h:50
Returns linear order edge.
Definition EdgeReturn.h:31
CellType
Types of mesh elements supported by OpenGeoSys.
Definition MeshEnums.h:64