OGS
HexRule8.h
Go to the documentation of this file.
1// SPDX-FileCopyrightText: Copyright (c) OpenGeoSys Community (opengeosys.org)
2// SPDX-License-Identifier: BSD-3-Clause
3
4#pragma once
5
6#include "EdgeReturn.h"
7#include "HexRule.h"
8
9namespace MeshLib
10{
36class HexRule8 : public HexRule
37{
38public:
40 static const unsigned n_all_nodes = 8u;
41
44
46 constexpr static const unsigned face_nodes[6][4] = {
47 {0, 3, 2, 1}, // Face 0
48 {0, 1, 5, 4}, // Face 1
49 {1, 2, 6, 5}, // Face 2
50 {2, 3, 7, 6}, // Face 3
51 {3, 0, 4, 7}, // Face 4
52 {4, 5, 6, 7} // Face 5
53 };
54
56 constexpr static const unsigned edge_nodes[12][2] = {
57 {0, 1}, // Edge 0
58 {1, 2}, // Edge 1
59 {2, 3}, // Edge 2
60 {0, 3}, // Edge 3
61 {4, 5}, // Edge 4
62 {5, 6}, // Edge 5
63 {6, 7}, // Edge 6
64 {4, 7}, // Edge 7
65 {0, 4}, // Edge 8
66 {1, 5}, // Edge 9
67 {2, 6}, // Edge 10
68 {3, 7} // Edge 11
69 };
70
73
75 static const Element* getFace(const Element* e, unsigned i);
76
78 static unsigned identifyFace(Node const* const* element_nodes,
79 Node const* nodes[3])
80 {
81 return CellRule::identifyFace<HexRule8>(element_nodes, nodes);
82 }
83}; /* class */
84
85} // 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:32
static const Element * getFace(const Element *e, unsigned i)
Returns the i-th face of the element.
Definition HexRule8.cpp:16
static const unsigned n_all_nodes
Constant: The number of all nodes for this element.
Definition HexRule8.h:40
static constexpr const unsigned face_nodes[6][4]
Constant: Local node index table for faces.
Definition HexRule8.h:46
static constexpr const unsigned edge_nodes[12][2]
Constant: Local node index table for edge.
Definition HexRule8.h:56
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:78
static const CellType cell_type
Constant: The FEM type of the element.
Definition HexRule8.h:43
MeshLib::LinearEdgeReturn EdgeReturn
Returns the i-th edge of the element.
Definition HexRule8.h:72
Returns linear order edge.
Definition EdgeReturn.h:24
CellType
Types of mesh elements supported by OpenGeoSys.
Definition MeshEnums.h:53