OGS
LineRule.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 "EdgeRule.h"
7#include "Element.h"
8#include "MeshLib/MeshEnums.h"
9
10namespace MeshLib
11{
15class LineRule : public EdgeRule
16{
17public:
19 static const unsigned n_base_nodes = 2u;
20
23
25 static const unsigned n_neighbors = 2;
26
31 static bool isPntInElement(Node const* const* nodes,
32 MathLib::Point3d const& pnt, double eps);
33
37 static ElementErrorCode validate(const Element* e);
38
40 static unsigned identifyFace(Node const* const* /*element_nodes*/,
41 Node const* nodes[1]);
42
44 static double computeVolume(Node const* const* element_nodes);
45};
46} // namespace MeshLib
Collects error flags for mesh elements.
static unsigned identifyFace(Node const *const *, Node const *nodes[1])
Returns the ID of a face given an array of nodes.
Definition LineRule.cpp:49
static ElementErrorCode validate(const Element *e)
Definition LineRule.cpp:63
static double computeVolume(Node const *const *element_nodes)
Calculates the length of a line.
Definition LineRule.cpp:11
static const unsigned n_neighbors
Constant: The number of neighbors.
Definition LineRule.h:25
static const unsigned n_base_nodes
Constant: The number of base nodes for this element.
Definition LineRule.h:19
static const MeshElemType mesh_elem_type
Constant: The geometric type of the element.
Definition LineRule.h:22
static bool isPntInElement(Node const *const *nodes, MathLib::Point3d const &pnt, double eps)
Definition LineRule.cpp:16
MeshElemType
Types of mesh elements supported by OpenGeoSys. Values are from VTKCellType enum.
Definition MeshEnums.h:37