OGS
PrismRule6.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 
44 class PrismRule6 : public CellRule
45 {
46 public:
48  static const unsigned n_base_nodes = 6u;
49 
51  static const unsigned n_all_nodes = 6u;
52 
55 
58 
60  static const unsigned n_faces = 5;
61 
63  static const unsigned n_edges = 9;
64 
66  static const unsigned n_neighbors = 5;
67 
69  static const unsigned face_nodes[5][4];
70 
72  static const unsigned edge_nodes[9][2];
73 
75  static const unsigned n_face_nodes[5];
76 
79 
81  static const Element* getFace(const Element* e, unsigned i);
82 
87  static bool isPntInElement(Node const* const* nodes,
88  MathLib::Point3d const& pnt, double eps);
89 
93  static ElementErrorCode validate(const Element* e);
94 
96  static unsigned identifyFace(Node const* const* /*_nodes*/,
97  Node const* nodes[3]);
98 
100  static double computeVolume(Node const* const* _nodes);
101 
102 }; /* class */
103 
104 } // 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 ElementErrorCode validate(const Element *e)
Definition: PrismRule6.cpp:112
static const unsigned n_all_nodes
Constant: The number of all nodes for this element.
Definition: PrismRule6.h:51
static const unsigned face_nodes[5][4]
Constant: Local node index table for faces.
Definition: PrismRule6.h:69
static const unsigned n_faces
Constant: The number of faces.
Definition: PrismRule6.h:60
static const unsigned n_face_nodes[5]
Constant: Table for the number of nodes for each face.
Definition: PrismRule6.h:75
static const unsigned edge_nodes[9][2]
Constant: Local node index table for edge.
Definition: PrismRule6.h:72
static const MeshElemType mesh_elem_type
Constant: The geometric type of the element.
Definition: PrismRule6.h:54
static double computeVolume(Node const *const *_nodes)
Calculates the volume of a convex hexahedron by partitioning it into six tetrahedra.
Definition: PrismRule6.cpp:65
static bool isPntInElement(Node const *const *nodes, MathLib::Point3d const &pnt, double eps)
Definition: PrismRule6.cpp:75
static const unsigned n_base_nodes
Constant: The number of base nodes for this element.
Definition: PrismRule6.h:48
static const unsigned n_edges
Constant: The number of edges.
Definition: PrismRule6.h:63
static const Element * getFace(const Element *e, unsigned i)
Returns the i-th face of the element.
Definition: PrismRule6.cpp:43
static const unsigned n_neighbors
Constant: The number of neighbors.
Definition: PrismRule6.h:66
static unsigned identifyFace(Node const *const *, Node const *nodes[3])
Returns the ID of a face given an array of nodes.
Definition: PrismRule6.cpp:87
static const CellType cell_type
Constant: The FEM type of the element.
Definition: PrismRule6.h:57
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