OGS
TriRule3.h
Go to the documentation of this file.
1 
11 #pragma once
12 
13 #include "MeshLib/MeshEnums.h"
14 #include "Element.h"
15 #include "FaceRule.h"
16 #include "EdgeReturn.h"
17 
18 namespace MeshLib
19 {
20 
38 class TriRule3 : public FaceRule
39 {
40 public:
42  static const unsigned n_base_nodes = 3u;
43 
45  static const unsigned n_all_nodes = 3u;
46 
49 
52 
54  static const unsigned n_edges = 3;
55 
57  static const unsigned n_neighbors = 3;
58 
60  static const unsigned edge_nodes[3][2];
61 
64 
69  static bool isPntInElement(Node const* const* nodes,
70  MathLib::Point3d const& pnt, double eps);
71 
75  static ElementErrorCode validate(const Element* e);
76 
78  static unsigned identifyFace(Node const* const* /*_nodes*/,
79  Node const* nodes[3]);
80 
82  static double computeVolume(Node const* const* _nodes);
83 
84 }; /* class */
85 
86 } // namespace MeshLib
Definition of the Element class.
Definition of mesh-related Enumerations.
Collects error flags for mesh elements.
Returns linear order edge.
Definition: EdgeReturn.h:31
static const unsigned n_all_nodes
Constant: The number of all nodes for this element.
Definition: TriRule3.h:45
static const unsigned n_neighbors
Constant: The number of neighbors.
Definition: TriRule3.h:57
static const MeshElemType mesh_elem_type
Constant: The geometric type of the element.
Definition: TriRule3.h:48
static ElementErrorCode validate(const Element *e)
Definition: TriRule3.cpp:59
static const unsigned n_edges
Constant: The number of edges.
Definition: TriRule3.h:54
static bool isPntInElement(Node const *const *nodes, MathLib::Point3d const &pnt, double eps)
Definition: TriRule3.cpp:29
static const CellType cell_type
Constant: The FEM type of the element.
Definition: TriRule3.h:51
static unsigned identifyFace(Node const *const *, Node const *nodes[3])
Returns the ID of a face given an array of nodes.
Definition: TriRule3.cpp:36
static double computeVolume(Node const *const *_nodes)
Calculates the volume of a convex hexahedron by partitioning it into six tetrahedra.
Definition: TriRule3.cpp:24
static const unsigned n_base_nodes
Constant: The number of base nodes for this element.
Definition: TriRule3.h:42
static const unsigned edge_nodes[3][2]
Constant: Local node index table for edge.
Definition: TriRule3.h:60
CellType
Types of mesh elements supported by OpenGeoSys.
Definition: MeshEnums.h:43
MeshElemType
Types of mesh elements supported by OpenGeoSys. Values are from VTKCellType enum.
Definition: MeshEnums.h:27