OGS
PointRule1.h
Go to the documentation of this file.
1// SPDX-FileCopyrightText: Copyright (c) OpenGeoSys Community (opengeosys.org)
2// SPDX-License-Identifier: BSD-3-Clause
3
4#pragma once
5
6#include "MeshLib/MeshEnums.h"
7#include "Element.h"
8#include "VertexRule.h"
9#include "EdgeReturn.h"
10
11namespace MeshLib
12{
13
15class PointRule1 : public VertexRule
16{
17public:
19 static const unsigned n_base_nodes = 1u;
20
22 static const unsigned n_all_nodes = 1u;
23
26
29
31 static const unsigned n_neighbors = 2;
32
34 static const unsigned edge_nodes[1][1];
35
38
45 static bool isPntInElement(Node const* const* nodes,
46 MathLib::Point3d const& pnt, double eps);
47
49 static ElementErrorCode validate(const Element* e);
50
52 static unsigned identifyFace(Node const* const* /*element_nodes*/,
53 Node const* nodes[1]);
54
56 static double computeVolume(Node const* const* element_nodes);
57};
58} // namespace MeshLib
Collects error flags for mesh elements.
Returns always null pointer.
Definition EdgeReturn.h:13
A 0d point element.
Definition PointRule1.h:16
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 const MeshElemType mesh_elem_type
Constant: The geometric type of the element.
Definition PointRule1.h:25
static const unsigned edge_nodes[1][1]
Constant: Local node index table for edge.
Definition PointRule1.h:34
static unsigned identifyFace(Node const *const *, Node const *nodes[1])
Returns the ID of a face given an array of nodes.
static const CellType cell_type
Constant: The FEM type of the element.
Definition PointRule1.h:28
MeshLib::NoEdgeReturn EdgeReturn
Edge rule.
Definition PointRule1.h:37
static const unsigned n_base_nodes
Constant: The number of base nodes for this element.
Definition PointRule1.h:19
static const unsigned n_neighbors
Constant: The number of neighbors.
Definition PointRule1.h:31
static double computeVolume(Node const *const *element_nodes)
Calculates the length of a line.
static const unsigned n_all_nodes
Constant: The number of all nodes for this element.
Definition PointRule1.h:22
CellType
Types of mesh elements supported by OpenGeoSys.
Definition MeshEnums.h:53
MeshElemType
Types of mesh elements supported by OpenGeoSys. Values are from VTKCellType enum.
Definition MeshEnums.h:37