OGS
PrismRule6.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 "PrismRule.h"
9
10namespace MeshLib
11{
12
37class PrismRule6 : public PrismRule
38{
39public:
41 static const unsigned n_all_nodes = 6u;
42
45
47 constexpr static const unsigned face_nodes[5][4] = {
48 {0, 2, 1, 99}, // Face 0
49 {0, 1, 4, 3}, // Face 1
50 {1, 2, 5, 4}, // Face 2
51 {2, 0, 3, 5}, // Face 3
52 {3, 4, 5, 99} // Face 4
53 };
54
56 constexpr static const unsigned edge_nodes[9][2] = {
57 {0, 1}, // Edge 0
58 {1, 2}, // Edge 1
59 {0, 2}, // Edge 2
60 {0, 3}, // Edge 3
61 {1, 4}, // Edge 4
62 {2, 5}, // Edge 5
63 {3, 4}, // Edge 6
64 {4, 5}, // Edge 7
65 {3, 5} // Edge 8
66 };
67
69 static const unsigned n_face_nodes[5];
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<PrismRule6>(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
Returns linear order edge.
Definition EdgeReturn.h:24
static const unsigned n_all_nodes
Constant: The number of all nodes for this element.
Definition PrismRule6.h:41
MeshLib::LinearEdgeReturn EdgeReturn
Returns the i-th edge of the element.
Definition PrismRule6.h:72
static const unsigned n_face_nodes[5]
Constant: Table for the number of nodes for each face.
Definition PrismRule6.h:69
static constexpr const unsigned edge_nodes[9][2]
Constant: Local node index table for edge.
Definition PrismRule6.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 PrismRule6.h:78
static const Element * getFace(const Element *e, unsigned i)
Returns the i-th face of the element.
static constexpr const unsigned face_nodes[5][4]
Constant: Local node index table for faces.
Definition PrismRule6.h:47
static const CellType cell_type
Constant: The FEM type of the element.
Definition PrismRule6.h:44
CellType
Types of mesh elements supported by OpenGeoSys.
Definition MeshEnums.h:53