OGS
PyramidRule5.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 "Element.h"
8#include "PyramidRule.h"
9
10namespace MeshLib
11{
12
37{
38public:
40 static const unsigned n_all_nodes = 5u;
41
44
46 constexpr static const unsigned face_nodes[5][4] = {
47 {0, 1, 4, 99}, // Face 0
48 {1, 2, 4, 99}, // Face 1
49 {2, 3, 4, 99}, // Face 2
50 {3, 0, 4, 99}, // Face 3
51 {0, 3, 2, 1} // Face 4
52 };
53
55 constexpr static const unsigned edge_nodes[8][2] = {
56 {0, 1}, // Edge 0
57 {1, 2}, // Edge 1
58 {2, 3}, // Edge 2
59 {0, 3}, // Edge 3
60 {0, 4}, // Edge 4
61 {1, 4}, // Edge 5
62 {2, 4}, // Edge 6
63 {3, 4} // Edge 7
64 };
65
67 static const unsigned n_face_nodes[5];
68
71
73 static const Element* getFace(const Element* e, unsigned i);
74
76 static unsigned identifyFace(Node const* const* element_nodes,
77 Node const* nodes[3])
78 {
79 return CellRule::identifyFace<PyramidRule5>(element_nodes, nodes);
80 }
81}; /* class */
82
83} // 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
Returns linear order edge.
Definition EdgeReturn.h:24
MeshLib::LinearEdgeReturn EdgeReturn
Returns the i-th edge of the element.
static const unsigned n_face_nodes[5]
Constant: Table for the number of nodes for each face.
static unsigned identifyFace(Node const *const *element_nodes, Node const *nodes[3])
Returns the ID of a face given an array of nodes.
static constexpr const unsigned face_nodes[5][4]
Constant: Local node index table for faces.
static const unsigned n_all_nodes
Constant: The number of all nodes for this element.
static const Element * getFace(const Element *e, unsigned i)
Returns the i-th face of the element.
static const CellType cell_type
Constant: The FEM type of the element.
static constexpr const unsigned edge_nodes[8][2]
Constant: Local node index table for edge.
CellType
Types of mesh elements supported by OpenGeoSys.
Definition MeshEnums.h:53