OGS
TetRule4.h
Go to the documentation of this file.
1 
11 #pragma once
12 
13 #include "MeshLib/MeshEnums.h"
14 #include "Element.h"
15 #include "EdgeReturn.h"
16 #include "CellRule.h"
17 
18 namespace MeshLib
19 {
20 
41 class TetRule4 : public CellRule
42 {
43 public:
45  static const unsigned n_base_nodes = 4u;
46 
48  static const unsigned n_all_nodes = 4u;
49 
52 
55 
57  static const unsigned n_faces = 4;
58 
60  static const unsigned n_edges = 6;
61 
63  static const unsigned n_neighbors = 4;
64 
66  static const unsigned face_nodes[4][3];
67 
69  static const unsigned edge_nodes[6][2];
70 
73 
75  static const Element* getFace(const Element* e, unsigned i);
76 
81  static bool isPntInElement(Node const* const* nodes,
82  MathLib::Point3d const& pnt, double eps);
83 
87  static ElementErrorCode validate(const Element* e);
88 
90  static unsigned identifyFace(Node const* const* /*_nodes*/,
91  Node const* nodes[3]);
92 
94  static double computeVolume(Node const* const* _nodes);
95 
96 }; /* class */
97 
98 } // 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 MeshElemType mesh_elem_type
Constant: The geometric type of the element.
Definition: TetRule4.h:51
static const unsigned face_nodes[4][3]
Constant: Local node index table for faces.
Definition: TetRule4.h:66
static bool isPntInElement(Node const *const *nodes, MathLib::Point3d const &pnt, double eps)
Definition: TetRule4.cpp:60
static double computeVolume(Node const *const *_nodes)
Calculates the volume of the element.
Definition: TetRule4.cpp:54
static const unsigned n_faces
Constant: The number of faces.
Definition: TetRule4.h:57
static const CellType cell_type
Constant: The FEM type of the element.
Definition: TetRule4.h:54
static const unsigned n_neighbors
Constant: The number of neighbors.
Definition: TetRule4.h:63
static const unsigned edge_nodes[6][2]
Constant: Local node index table for edge.
Definition: TetRule4.h:69
static const Element * getFace(const Element *e, unsigned i)
Returns the i-th face of the element.
Definition: TetRule4.cpp:39
static const unsigned n_edges
Constant: The number of edges.
Definition: TetRule4.h:60
static const unsigned n_base_nodes
Constant: The number of base nodes for this element.
Definition: TetRule4.h:45
static ElementErrorCode validate(const Element *e)
Definition: TetRule4.cpp:90
static unsigned identifyFace(Node const *const *, Node const *nodes[3])
Returns the ID of a face given an array of nodes.
Definition: TetRule4.cpp:67
static const unsigned n_all_nodes
Constant: The number of all nodes for this element.
Definition: TetRule4.h:48
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