OGS
LineRule2.h
Go to the documentation of this file.
1 
11 #pragma once
12 
13 #include "MeshLib/MeshEnums.h"
14 #include "Element.h"
15 #include "EdgeRule.h"
16 #include "EdgeReturn.h"
17 
18 namespace MeshLib
19 {
20 
27 class LineRule2 : public EdgeRule
28 {
29 public:
31  static const unsigned n_base_nodes = 2u;
32 
34  static const unsigned n_all_nodes = 2u;
35 
38 
41 
43  static const unsigned n_neighbors = 2;
44 
46  static const unsigned edge_nodes[1][2];
47 
50 
55  static bool isPntInElement(Node const* const* nodes,
56  MathLib::Point3d const& pnt, double eps);
57 
61  static ElementErrorCode validate(const Element* e);
62 
64  static unsigned identifyFace(Node const* const* /*_nodes*/,
65  Node const* nodes[1]);
66 
68  static double computeVolume(Node const* const* _nodes);
69 
70 }; /* class */
71 
72 } // namespace MeshLib
Definition of the Element class.
Definition of mesh-related Enumerations.
Collects error flags for mesh elements.
static bool isPntInElement(Node const *const *nodes, MathLib::Point3d const &pnt, double eps)
Definition: LineRule2.cpp:27
static const unsigned n_neighbors
Constant: The number of neighbors.
Definition: LineRule2.h:43
static const CellType cell_type
Constant: The FEM type of the element.
Definition: LineRule2.h:40
static ElementErrorCode validate(const Element *e)
Definition: LineRule2.cpp:51
static const unsigned edge_nodes[1][2]
Constant: Local node index table for edge.
Definition: LineRule2.h:46
static double computeVolume(Node const *const *_nodes)
Calculates the length of a line.
Definition: LineRule2.cpp:22
static const unsigned n_all_nodes
Constant: The number of all nodes for this element.
Definition: LineRule2.h:34
static const unsigned n_base_nodes
Constant: The number of base nodes for this element.
Definition: LineRule2.h:31
static unsigned identifyFace(Node const *const *, Node const *nodes[1])
Returns the ID of a face given an array of nodes.
Definition: LineRule2.cpp:37
static const MeshElemType mesh_elem_type
Constant: The geometric type of the element.
Definition: LineRule2.h:37
Returns linear order edge.
Definition: EdgeReturn.h:31
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