OGS
TriRule.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 "Element.h"
7#include "FaceRule.h"
8#include "MeshLib/MeshEnums.h"
9
10namespace MeshLib
11{
15class TriRule : public FaceRule
16{
17public:
19 static const unsigned n_base_nodes = 3u;
20
23
25 static const unsigned n_edges = 3;
26
28 static const unsigned n_neighbors = 3;
29
34 static bool isPntInElement(Node const* const* nodes,
35 MathLib::Point3d const& pnt, double eps);
36
40 static ElementErrorCode validate(const Element* e);
41
43 static double computeVolume(Node const* const* element_nodes);
44};
45} // namespace MeshLib
Collects error flags for mesh elements.
static const MeshElemType mesh_elem_type
Constant: The geometric type of the element.
Definition TriRule.h:22
static ElementErrorCode validate(const Element *e)
Definition TriRule.cpp:24
static double computeVolume(Node const *const *element_nodes)
Calculates the area of the triangle with straight edges.
Definition TriRule.cpp:11
static bool isPntInElement(Node const *const *nodes, MathLib::Point3d const &pnt, double eps)
Definition TriRule.cpp:17
static const unsigned n_edges
Constant: The number of edges.
Definition TriRule.h:25
static const unsigned n_neighbors
Constant: The number of neighbors.
Definition TriRule.h:28
static const unsigned n_base_nodes
Constant: The number of base nodes for this element.
Definition TriRule.h:19
MeshElemType
Types of mesh elements supported by OpenGeoSys. Values are from VTKCellType enum.
Definition MeshEnums.h:37