OGS
MeshLib::TetRule10 Class Reference

Detailed Description

This class represents a 3d tetrahedron element with 10 nodes. The following sketch shows the node and edge numbering.

3
/|\
/ | \
7/ | \9
/ |8 \
/ | \
0.....|.....2
\ | 2 /
\ | /
4\ | /5
\ | /
\|/
1

Definition at line 41 of file TetRule10.h.

#include <TetRule10.h>

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

Public Types

using EdgeReturn = MeshLib::QuadraticEdgeReturn
 Returns the i-th edge of the element.
 

Static Public Member Functions

static const ElementgetFace (const Element *e, unsigned i)
 Returns the i-th face of the element.
 
static unsigned identifyFace (Node const *const *element_nodes, Node const *nodes[3])
 Returns the ID of a face given an array of nodes.
 
- Static Public Member Functions inherited from MeshLib::TetRule
static bool isPntInElement (Node const *const *nodes, MathLib::Point3d const &pnt, double eps)
 
static ElementErrorCode validate (const Element *e)
 
static double computeVolume (Node const *const *element_nodes)
 Calculates the volume of a tetrahedron.
 
- Static Public Member Functions inherited from MeshLib::CellRule
static bool testElementNodeOrder (Element const &e)
 

Static Public Attributes

static const unsigned n_all_nodes = 10u
 Constant: The number of all nodes for this element.
 
static const CellType cell_type = CellType::TET10
 Constant: The FEM type of the element.
 
static const unsigned face_nodes [4][6]
 Constant: Local node index table for faces.
 
static const unsigned edge_nodes [6][3]
 Constant: Local node index table for edge.
 
- Static Public Attributes inherited from MeshLib::TetRule
static const unsigned n_base_nodes = 4u
 Constant: The number of base nodes for this element.
 
static const MeshElemType mesh_elem_type = MeshElemType::TETRAHEDRON
 Constant: The geometric type of the element.
 
static const unsigned n_faces = 4
 Constant: The number of faces.
 
static const unsigned n_edges = 6
 Constant: The number of edges.
 
static const unsigned n_neighbors = 4
 Constant: The number of neighbors.
 
- Static Public Attributes inherited from MeshLib::CellRule
static const unsigned dimension = 3u
 Constant: Dimension of this mesh element.
 

Additional Inherited Members

- Static Protected Member Functions inherited from MeshLib::CellRule
template<typename ElementRule >
static unsigned identifyFace (Node const *const *element_nodes, Node const *nodes[ElementRule::dimension])
 Returns the ID of a face given an array of nodes.
 

Member Typedef Documentation

◆ EdgeReturn

Returns the i-th edge of the element.

Definition at line 57 of file TetRule10.h.

Member Function Documentation

◆ getFace()

const Element * MeshLib::TetRule10::getFace ( const Element * e,
unsigned i )
static

Returns the i-th face of the element.

Definition at line 37 of file TetRule10.cpp.

38{
39 if (i < n_faces)
40 {
41 std::array<Node*, 6> nodes{};
42 for (unsigned j = 0; j < 6; j++)
43 {
44 nodes[j] = const_cast<Node*>(e->getNode(face_nodes[i][j]));
45 }
46 return new Tri6(nodes, e->getID());
47 }
48 ERR("Error in MeshLib::Element::getFace() - Index {:d} does not exist.", i);
49 return nullptr;
50}
void ERR(fmt::format_string< Args... > fmt, Args &&... args)
Definition Logging.h:45
static const unsigned face_nodes[4][6]
Constant: Local node index table for faces.
Definition TetRule10.h:51
static const unsigned n_faces
Constant: The number of faces.
Definition TetRule.h:30
TemplateElement< MeshLib::TriRule6 > Tri6
Definition Tri.h:27

References ERR(), face_nodes, MeshLib::Element::getID(), MeshLib::Element::getNode(), and MeshLib::TetRule::n_faces.

◆ identifyFace()

static unsigned MeshLib::TetRule10::identifyFace ( Node const *const * element_nodes,
Node const * nodes[3] )
inlinestatic

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

Definition at line 63 of file TetRule10.h.

65 {
66 return CellRule::identifyFace<TetRule10>(element_nodes, nodes);
67 }
static unsigned identifyFace(Node const *const *element_nodes, Node const *nodes[ElementRule::dimension])
Returns the ID of a face given an array of nodes.
Definition CellRule.h:39

References MeshLib::CellRule::identifyFace().

Member Data Documentation

◆ cell_type

const CellType MeshLib::TetRule10::cell_type = CellType::TET10
static

Constant: The FEM type of the element.

Definition at line 48 of file TetRule10.h.

◆ edge_nodes

const unsigned MeshLib::TetRule10::edge_nodes
static
Initial value:
= {
{0, 1, 4},
{1, 2, 5},
{0, 2, 6},
{0, 3, 7},
{1, 3, 8},
{2, 3, 9}
}

Constant: Local node index table for edge.

Definition at line 54 of file TetRule10.h.

◆ face_nodes

const unsigned MeshLib::TetRule10::face_nodes
static
Initial value:
= {
{0, 2, 1, 6, 5, 4},
{0, 1, 3, 4, 8, 7},
{1, 2, 3, 5, 9, 8},
{2, 0, 3, 6, 7, 9}
}

Constant: Local node index table for faces.

Definition at line 51 of file TetRule10.h.

Referenced by getFace().

◆ n_all_nodes

const unsigned MeshLib::TetRule10::n_all_nodes = 10u
static

Constant: The number of all nodes for this element.

Definition at line 45 of file TetRule10.h.


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