OGS
TetRule.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 "CellRule.h"
7#include "Element.h"
8#include "MeshLib/MeshEnums.h"
9
10namespace MeshLib
11{
12
13class TetRule : public CellRule
14{
15public:
17 static const unsigned n_base_nodes = 4u;
18
21
23 static const unsigned n_faces = 4;
24
26 static const unsigned n_edges = 6;
27
29 static const unsigned n_neighbors = 4;
30
35 static bool isPntInElement(Node const* const* nodes,
36 MathLib::Point3d const& pnt, double eps);
37
41 static ElementErrorCode validate(const Element* e);
42
44 static double computeVolume(Node const* const* element_nodes);
45};
46} // namespace MeshLib
Collects error flags for mesh elements.
static const unsigned n_edges
Constant: The number of edges.
Definition TetRule.h:26
static bool isPntInElement(Node const *const *nodes, MathLib::Point3d const &pnt, double eps)
Definition TetRule.cpp:17
static const MeshElemType mesh_elem_type
Constant: The geometric type of the element.
Definition TetRule.h:20
static const unsigned n_base_nodes
Constant: The number of base nodes for this element.
Definition TetRule.h:17
static const unsigned n_faces
Constant: The number of faces.
Definition TetRule.h:23
static double computeVolume(Node const *const *element_nodes)
Calculates the volume of a tetrahedron.
Definition TetRule.cpp:11
static ElementErrorCode validate(const Element *e)
Definition TetRule.cpp:24
static const unsigned n_neighbors
Constant: The number of neighbors.
Definition TetRule.h:29
MeshElemType
Types of mesh elements supported by OpenGeoSys. Values are from VTKCellType enum.
Definition MeshEnums.h:37