OGS
HexRule20.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{
11
37class HexRule20 : public HexRule
38{
39public:
41 static const unsigned n_all_nodes = 20u;
42
45
47 constexpr static const unsigned face_nodes[6][8] = {
48 {0, 3, 2, 1, 11, 10, 9, 8}, // Face 0
49 {0, 1, 5, 4, 8, 17, 12, 16}, // Face 1
50 {1, 2, 6, 5, 9, 18, 13, 17}, // Face 2
51 {2, 3, 7, 6, 10, 19, 14, 18}, // Face 3
52 {3, 0, 4, 7, 11, 16, 15, 19}, // Face 4
53 {4, 5, 6, 7, 12, 13, 14, 15} // Face 5
54 };
55
57 constexpr static const unsigned edge_nodes[12][3] = {
58 {0, 1, 8}, // Edge 0
59 {1, 2, 9}, // Edge 1
60 {2, 3, 10}, // Edge 2
61 {0, 3, 11}, // Edge 3
62 {4, 5, 12}, // Edge 4
63 {5, 6, 13}, // Edge 5
64 {6, 7, 14}, // Edge 6
65 {4, 7, 15}, // Edge 7
66 {0, 4, 16}, // Edge 8
67 {1, 5, 17}, // Edge 9
68 {2, 6, 18}, // Edge 10
69 {3, 7, 19} // Edge 11
70 };
71
74
76 static const Element* getFace(const Element* e, unsigned i);
77
79 static unsigned identifyFace(Node const* const* element_nodes,
80 Node const* nodes[3])
81 {
82 return CellRule::identifyFace<HexRule20>(element_nodes, nodes);
83 }
84}; /* class */
85
86} // 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 constexpr const unsigned edge_nodes[12][3]
Constant: Local node index table for edge.
Definition HexRule20.h:57
MeshLib::QuadraticEdgeReturn EdgeReturn
Returns the i-th edge of the element.
Definition HexRule20.h:73
static constexpr const unsigned face_nodes[6][8]
Constant: Local node index table for faces.
Definition HexRule20.h:47
static const Element * getFace(const Element *e, unsigned i)
Returns the i-th face of the element.
Definition HexRule20.cpp:16
static const unsigned n_all_nodes
Constant: The number of all nodes for this element.
Definition HexRule20.h:41
static unsigned identifyFace(Node const *const *element_nodes, Node const *nodes[3])
Returns the ID of a face given an array of nodes.
Definition HexRule20.h:79
static const CellType cell_type
Constant: The FEM type of the element.
Definition HexRule20.h:44
Returns quadratic order edge.
Definition EdgeReturn.h:32
CellType
Types of mesh elements supported by OpenGeoSys.
Definition MeshEnums.h:53