OGS
TriRule3.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 "TriRule.h"
9
10namespace MeshLib
11{
12
32class TriRule3 : public TriRule
33{
34public:
36 static const unsigned n_all_nodes = 3u;
37
40
42 constexpr static const unsigned edge_nodes[3][2] = {
43 {0, 1}, // Edge 0
44 {1, 2}, // Edge 1
45 {2, 0}, // Edge 2
46 };
47
50
52 static unsigned identifyFace(Node const* const* element_nodes,
53 Node const* nodes[2])
54 {
55 return FaceRule::identifyFace<TriRule3>(element_nodes, nodes);
56 }
57
58}; /* class */
59
60} // namespace MeshLib
static unsigned identifyFace(Node const *const *element_nodes, Node const *nodes[ElementRule::dimension])
Returns the ID of an edge given an array of nodes.
Definition FaceRule.h:41
Returns linear order edge.
Definition EdgeReturn.h:24
MeshLib::LinearEdgeReturn EdgeReturn
Returns the i-th edge of the element.
Definition TriRule3.h:49
static const unsigned n_all_nodes
Constant: The number of all nodes for this element.
Definition TriRule3.h:36
static const CellType cell_type
Constant: The FEM type of the element.
Definition TriRule3.h:39
static unsigned identifyFace(Node const *const *element_nodes, Node const *nodes[2])
Returns the ID of a face given an array of nodes.
Definition TriRule3.h:52
static constexpr const unsigned edge_nodes[3][2]
Constant: Local node index table for edge.
Definition TriRule3.h:42
CellType
Types of mesh elements supported by OpenGeoSys.
Definition MeshEnums.h:53