OGS
MeshLib::HexRule20 Class Reference

Detailed Description

A 20-nodes Hexahedron Element.

Hex:
14
7-----------6
/: /|
/ : / |
15/ : /13|
/ 19: / | 18
/ : 12 / |
4-----------5 |
| : | 10 |
| 3.....|.....2
| . | /
16 | . |17 /
|11. | / 9
| . | /
|. |/
0-----------1
8
TemplateElement< MeshLib::HexRule8 > Hex
Definition: Hex.h:25

Definition at line 46 of file HexRule20.h.

#include <HexRule20.h>

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

Public Types

using EdgeReturn = MeshLib::QuadraticEdgeReturn
 Returns the i-th edge of the element. More...
 
- Public Types inherited from MeshLib::HexRule8
using EdgeReturn = MeshLib::LinearEdgeReturn
 Returns the i-th edge of the element. More...
 

Static Public Member Functions

static const ElementgetFace (const Element *e, unsigned i)
 Returns the i-th face of the element. More...
 
- Static Public Member Functions inherited from MeshLib::HexRule8
static const ElementgetFace (const Element *e, unsigned i)
 Returns the i-th face of the element. More...
 
static bool isPntInElement (Node const *const *nodes, MathLib::Point3d const &pnt, double eps)
 
static ElementErrorCode validate (const Element *e)
 
static unsigned identifyFace (Node const *const *, Node const *nodes[3])
 Returns the ID of a face given an array of nodes. More...
 
static double computeVolume (Node const *const *_nodes)
 Calculates the volume of a convex hexahedron by partitioning it into six tetrahedra. More...
 
- Static Public Member Functions inherited from MeshLib::CellRule
static bool testElementNodeOrder (Element const &e)
 

Static Public Attributes

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

Member Typedef Documentation

◆ EdgeReturn

Returns the i-th edge of the element.

Definition at line 62 of file HexRule20.h.

Member Function Documentation

◆ getFace()

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

Returns the i-th face of the element.

Definition at line 46 of file HexRule20.cpp.

47 {
48  if (i < n_faces)
49  {
50  std::array<Node*, 8> nodes{};
51  for (unsigned j = 0; j < 8; j++)
52  {
53  nodes[j] = const_cast<Node*>(e->getNode(face_nodes[i][j]));
54  }
55  return new Quad8(nodes, e->getID());
56  }
57  ERR("Error in MeshLib::Element::getFace() - Index {:d} does not exist.", i);
58  return nullptr;
59 }
void ERR(char const *fmt, Args const &... args)
Definition: Logging.h:42
static const unsigned face_nodes[6][8]
Constant: Local node index table for faces.
Definition: HexRule20.h:56
static const unsigned n_faces
Constant: The number of faces.
Definition: HexRule8.h:62
TemplateElement< MeshLib::QuadRule8 > Quad8
Definition: Quad.h:29

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

Member Data Documentation

◆ cell_type

const CellType MeshLib::HexRule20::cell_type = CellType::HEX20
static

Constant: The FEM type of the element.

Definition at line 53 of file HexRule20.h.

◆ edge_nodes

const unsigned MeshLib::HexRule20::edge_nodes
static
Initial value:
= {
{0, 1, 8},
{1, 2, 9},
{2, 3, 10},
{0, 3, 11},
{4, 5, 12},
{5, 6, 13},
{6, 7, 14},
{4, 7, 15},
{0, 4, 16},
{1, 5, 17},
{2, 6, 18},
{3, 7, 19}
}

Constant: Local node index table for edge.

Definition at line 59 of file HexRule20.h.

◆ face_nodes

const unsigned MeshLib::HexRule20::face_nodes
static
Initial value:
= {
{0, 3, 2, 1, 11, 10, 9, 8},
{0, 1, 5, 4, 8, 17, 12, 16},
{1, 2, 6, 5, 9, 18, 13, 17},
{2, 3, 7, 6, 10, 19, 14, 18},
{3, 0, 4, 7, 11, 16, 15, 19},
{4, 5, 6, 7, 12, 13, 14, 15}
}

Constant: Local node index table for faces.

Definition at line 56 of file HexRule20.h.

Referenced by getFace().

◆ n_all_nodes

const unsigned MeshLib::HexRule20::n_all_nodes = 20u
static

Constant: The number of all nodes for this element.

Definition at line 50 of file HexRule20.h.


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