OGS
MeshLib::PrismRule15 Class Reference

Detailed Description

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

5
/ \
/ : \
11/ : \10
/ :14 \
/ : \
3------9----4
| : |
| 2 |
| . . |
12| . . |13
| 8. .7 |
| . . |
|. .|
0-----------1
6

Definition at line 44 of file PrismRule15.h.

#include <PrismRule15.h>

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

Public Types

using EdgeReturn = MeshLib::QuadraticEdgeReturn
 Returns the i-th edge of the element. More...
 
- Public Types inherited from MeshLib::PrismRule6
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::PrismRule6
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 = 15u
 Constant: The number of all nodes for this element. More...
 
static const CellType cell_type = CellType::PRISM15
 Constant: The FEM type of the element. More...
 
static const unsigned face_nodes [5][8]
 Constant: Local node index table for faces. More...
 
static const unsigned edge_nodes [9][3]
 Constant: Local node index table for edge. More...
 
static const unsigned n_face_nodes [5] = {6, 8, 8, 8, 6}
 Constant: Table for the number of nodes for each face. More...
 
- Static Public Attributes inherited from MeshLib::PrismRule6
static const unsigned n_base_nodes = 6u
 Constant: The number of base nodes for this element. More...
 
static const unsigned n_all_nodes = 6u
 Constant: The number of all nodes for this element. More...
 
static const MeshElemType mesh_elem_type = MeshElemType::PRISM
 Constant: The geometric type of the element. More...
 
static const CellType cell_type = CellType::PRISM6
 Constant: The FEM type of the element. More...
 
static const unsigned n_faces = 5
 Constant: The number of faces. More...
 
static const unsigned n_edges = 9
 Constant: The number of edges. More...
 
static const unsigned n_neighbors = 5
 Constant: The number of neighbors. More...
 
static const unsigned face_nodes [5][4]
 Constant: Local node index table for faces. More...
 
static const unsigned edge_nodes [9][2]
 Constant: Local node index table for edge. More...
 
static const unsigned n_face_nodes [5] = {3, 4, 4, 4, 3}
 Constant: Table for the number of nodes for each face. 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 63 of file PrismRule15.h.

Member Function Documentation

◆ getFace()

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

Returns the i-th face of the element.

Definition at line 42 of file PrismRule15.cpp.

43 {
44  if (i < n_faces)
45  {
46  unsigned nFaceNodes(PrismRule15::n_face_nodes[i]);
47  auto** nodes = new Node*[nFaceNodes];
48  for (unsigned j = 0; j < nFaceNodes; j++)
49  {
50  nodes[j] = const_cast<Node*>(e->getNode(face_nodes[i][j]));
51  }
52 
53  if (i == 0 || i == 4)
54  {
55  return new Tri6(nodes, e->getID());
56  }
57 
58  return new Quad8(nodes);
59  }
60  ERR("Error in MeshLib::Element::getFace() - Index {:d} does not exist.", i);
61  return nullptr;
62 }
void ERR(char const *fmt, Args const &... args)
Definition: Logging.h:42
static const unsigned face_nodes[5][8]
Constant: Local node index table for faces.
Definition: PrismRule15.h:54
static const unsigned n_face_nodes[5]
Constant: Table for the number of nodes for each face.
Definition: PrismRule15.h:60
static const unsigned n_faces
Constant: The number of faces.
Definition: PrismRule6.h:60
TemplateElement< MeshLib::QuadRule8 > Quad8
Definition: Quad.h:29
TemplateElement< MeshLib::TriRule6 > Tri6
Definition: Tri.h:27

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

Member Data Documentation

◆ cell_type

const CellType MeshLib::PrismRule15::cell_type = CellType::PRISM15
static

Constant: The FEM type of the element.

Definition at line 51 of file PrismRule15.h.

◆ edge_nodes

const unsigned MeshLib::PrismRule15::edge_nodes
static
Initial value:
= {
{0, 1, 6},
{1, 2, 7},
{0, 2, 8},
{0, 3, 9},
{1, 4, 10},
{2, 5, 11},
{3, 4, 12},
{4, 5, 13},
{3, 5, 14}
}

Constant: Local node index table for edge.

Definition at line 57 of file PrismRule15.h.

◆ face_nodes

const unsigned MeshLib::PrismRule15::face_nodes
static
Initial value:
= {
{0, 2, 1, 8, 7, 6, 99, 99},
{0, 1, 4, 3, 6, 10, 12, 9},
{1, 2, 5, 4, 7, 11, 13, 10},
{2, 0, 3, 5, 8, 9, 14, 11},
{3, 4, 5, 12, 13, 14, 99, 99}
}

Constant: Local node index table for faces.

Definition at line 54 of file PrismRule15.h.

Referenced by getFace().

◆ n_all_nodes

const unsigned MeshLib::PrismRule15::n_all_nodes = 15u
static

Constant: The number of all nodes for this element.

Definition at line 48 of file PrismRule15.h.

◆ n_face_nodes

const unsigned MeshLib::PrismRule15::n_face_nodes = {6, 8, 8, 8, 6}
static

Constant: Table for the number of nodes for each face.

Definition at line 60 of file PrismRule15.h.

Referenced by getFace().


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