OGS
MeshLib::PointRule1 Class Reference

Detailed Description

A 0d point element.

Definition at line 22 of file PointRule1.h.

#include <PointRule1.h>

Inheritance diagram for MeshLib::PointRule1:
[legend]
Collaboration diagram for MeshLib::PointRule1:
[legend]

Public Types

using EdgeReturn = MeshLib::NoEdgeReturn
 Edge rule.
 

Static Public Member Functions

static bool isPntInElement (Node const *const *nodes, MathLib::Point3d const &pnt, double eps)
 
static ElementErrorCode validate (const Element *e)
 Tests if the element is geometrically valid.
 
static unsigned identifyFace (Node const *const *, Node const *nodes[1])
 Returns the ID of a face given an array of nodes.
 
static double computeVolume (Node const *const *element_nodes)
 Calculates the length of a line.
 
- Static Public Member Functions inherited from MeshLib::VertexRule
static const ElementgetFace (const Element *, unsigned)
 Returns the i-th face of the element.
 
static bool testElementNodeOrder (Element const &)
 

Static Public Attributes

static const unsigned n_base_nodes = 1u
 Constant: The number of base nodes for this element.
 
static const unsigned n_all_nodes = 1u
 Constant: The number of all nodes for this element.
 
static const MeshElemType mesh_elem_type = MeshElemType::POINT
 Constant: The geometric type of the element.
 
static const CellType cell_type = CellType::POINT1
 Constant: The FEM type of the element.
 
static const unsigned n_neighbors = 2
 Constant: The number of neighbors.
 
static const unsigned edge_nodes [1][1] = {{0}}
 Constant: Local node index table for edge.
 
- Static Public Attributes inherited from MeshLib::VertexRule
static const unsigned dimension = 0u
 Constant: Dimension of this mesh element.
 
static const unsigned n_faces = 0
 Constant: The number of faces.
 
static const unsigned n_edges = 0
 Constant: The number of edges.
 

Member Typedef Documentation

◆ EdgeReturn

Edge rule.

Definition at line 44 of file PointRule1.h.

Member Function Documentation

◆ computeVolume()

double MeshLib::PointRule1::computeVolume ( Node const *const * element_nodes)
static

Calculates the length of a line.

Definition at line 20 of file PointRule1.cpp.

21{
22 return 0;
23}

◆ identifyFace()

unsigned MeshLib::PointRule1::identifyFace ( Node const *const * element_nodes,
Node const * nodes[1] )
static

Returns the ID of a face given an array of nodes.

Definition at line 32 of file PointRule1.cpp.

34{
35 if (nodes[0] == element_nodes[0])
36 {
37 return 0;
38 }
39 return std::numeric_limits<unsigned>::max();
40}

◆ isPntInElement()

bool MeshLib::PointRule1::isPntInElement ( Node const *const * nodes,
MathLib::Point3d const & pnt,
double eps )
static

Checks if a point is inside the element.

Parameters
pnta 3D MathLib::Point3d object
epstolerance for numerical algorithm used or computing the property
Returns
true if the point is not outside the element, false otherwise

Specifically this function tests if the squared euclidean distance between the points nodes and pnt is less then eps.

Parameters
nodesthe nodes of the element.

Definition at line 25 of file PointRule1.cpp.

27{
28 double const dist = MathLib::sqrDist(*nodes[0], pnt);
29 return (dist < eps);
30}
double sqrDist(MathLib::Point3d const &p0, MathLib::Point3d const &p1)
Definition Point3d.cpp:26

References MathLib::sqrDist().

◆ validate()

ElementErrorCode MeshLib::PointRule1::validate ( const Element * e)
static

Tests if the element is geometrically valid.

Definition at line 42 of file PointRule1.cpp.

43{
44 ElementErrorCode error_code;
46 return error_code;
47}
Collects error flags for mesh elements.
bool hasZeroVolume(MeshLib::Element const &element)
Returns true if the element has zero length/area/volume.
Definition Element.cpp:119

References MeshLib::hasZeroVolume(), and ZeroVolume.

Member Data Documentation

◆ cell_type

const CellType MeshLib::PointRule1::cell_type = CellType::POINT1
static

Constant: The FEM type of the element.

Definition at line 35 of file PointRule1.h.

◆ edge_nodes

const unsigned MeshLib::PointRule1::edge_nodes = {{0}}
static

Constant: Local node index table for edge.

Definition at line 41 of file PointRule1.h.

◆ mesh_elem_type

const MeshElemType MeshLib::PointRule1::mesh_elem_type = MeshElemType::POINT
static

Constant: The geometric type of the element.

Definition at line 32 of file PointRule1.h.

◆ n_all_nodes

const unsigned MeshLib::PointRule1::n_all_nodes = 1u
static

Constant: The number of all nodes for this element.

Definition at line 29 of file PointRule1.h.

◆ n_base_nodes

const unsigned MeshLib::PointRule1::n_base_nodes = 1u
static

Constant: The number of base nodes for this element.

Definition at line 26 of file PointRule1.h.

◆ n_neighbors

const unsigned MeshLib::PointRule1::n_neighbors = 2
static

Constant: The number of neighbors.

Definition at line 38 of file PointRule1.h.


The documentation for this class was generated from the following files: