OGS
NumLib::ShapeHex8 Class Reference

Detailed Description

Shape function for a 8-nodes hex element in natural coordinates

*       (-1, 1, 1) 7-----------6 ( 1, 1, 1)
*                 /:          /|
*                / :         / |
*               /  :        /  |
*              /   :       /   |
*             /    :      /    |
* (-1,-1, 1) 4-----------5 ( 1,-1, 1)
*            |     :     |     |
*       (-1, 1,-1) 3.....|.....2 ( 1, 1,-1)
*            |    .      |    /
*            |   .       |   /
*            |  .        |  /
*            | .         | /
*            |.          |/
* (-1,-1,-1) 0-----------1 ( 1,-1,-1)
*          0
* 

Definition at line 34 of file ShapeHex8.h.

#include <ShapeHex8.h>

Public Types

using MeshElement = MeshLib::Hex

Static Public Member Functions

template<class T_X, class T_N>
static void computeShapeFunction (const T_X &r, T_N &N)
template<class T_X, class T_N>
static void computeGradShapeFunction (const T_X &r, T_N &dN)

Static Public Attributes

static constexpr std::array reference_element_centre = {0.0, 0.0, 0.0}
static const unsigned DIM = MeshElement::dimension
static const unsigned NPOINTS = MeshElement::n_all_nodes
static constexpr int ORDER = 1

Member Typedef Documentation

◆ MeshElement

Definition at line 57 of file ShapeHex8.h.

Member Function Documentation

◆ computeGradShapeFunction()

template<class T_X, class T_N>
void NumLib::ShapeHex8::computeGradShapeFunction ( const T_X & r,
T_N & dN )
static

Evaluate derivatives of the shape function at the given point

Parameters
[in]rnatural coordinates (r,s,t)
[out]dNa matrix of the derivatives

Definition at line 20 of file ShapeHex8-impl.h.

21{
22 // dN/dx
23 dN[0] = -(1.0 - r[1]) * (1.0 - r[2]) * 0.125;
24 dN[1] = -dN[0];
25 dN[2] = +(1.0 + r[1]) * (1.0 - r[2]) * 0.125;
26 dN[3] = -dN[2];
27 dN[4] = -(1.0 - r[1]) * (1.0 + r[2]) * 0.125;
28 dN[5] = -dN[4];
29 dN[6] = +(1.0 + r[1]) * (1.0 + r[2]) * 0.125;
30 dN[7] = -dN[6];
31
32 // dN/dy
33 dN[8] = -(1.0 - r[0]) * (1.0 - r[2]) * 0.125;
34 dN[9] = -(1.0 + r[0]) * (1.0 - r[2]) * 0.125;
35 dN[10] = -dN[9];
36 dN[11] = -dN[8];
37 dN[12] = -(1.0 - r[0]) * (1.0 + r[2]) * 0.125;
38 dN[13] = -(1.0 + r[0]) * (1.0 + r[2]) * 0.125;
39 dN[14] = -dN[13];
40 dN[15] = -dN[12];
41
42 // dN/dz
43 dN[16] = -(1.0 - r[0]) * (1.0 - r[1]) * 0.125;
44 dN[17] = -(1.0 + r[0]) * (1.0 - r[1]) * 0.125;
45 dN[18] = -(1.0 + r[0]) * (1.0 + r[1]) * 0.125;
46 dN[19] = -(1.0 - r[0]) * (1.0 + r[1]) * 0.125;
47 dN[20] = -dN[16];
48 dN[21] = -dN[17];
49 dN[22] = -dN[18];
50 dN[23] = -dN[19];
51}

◆ computeShapeFunction()

template<class T_X, class T_N>
void NumLib::ShapeHex8::computeShapeFunction ( const T_X & r,
T_N & N )
static

Evaluate the shape function at the given point

Parameters
[in]rnatural coordinates (r,s,t)
[out]Na vector of calculated shape functions

Definition at line 7 of file ShapeHex8-impl.h.

8{
9 N[0] = (1.0 - r[0]) * (1.0 - r[1]) * (1.0 - r[2]) * 0.125;
10 N[1] = (1.0 + r[0]) * (1.0 - r[1]) * (1.0 - r[2]) * 0.125;
11 N[2] = (1.0 + r[0]) * (1.0 + r[1]) * (1.0 - r[2]) * 0.125;
12 N[3] = (1.0 - r[0]) * (1.0 + r[1]) * (1.0 - r[2]) * 0.125;
13 N[4] = (1.0 - r[0]) * (1.0 - r[1]) * (1.0 + r[2]) * 0.125;
14 N[5] = (1.0 + r[0]) * (1.0 - r[1]) * (1.0 + r[2]) * 0.125;
15 N[6] = (1.0 + r[0]) * (1.0 + r[1]) * (1.0 + r[2]) * 0.125;
16 N[7] = (1.0 - r[0]) * (1.0 + r[1]) * (1.0 + r[2]) * 0.125;
17}

References NumLib::N.

Member Data Documentation

◆ DIM

const unsigned NumLib::ShapeHex8::DIM = MeshElement::dimension
static

Definition at line 58 of file ShapeHex8.h.

◆ NPOINTS

const unsigned NumLib::ShapeHex8::NPOINTS = MeshElement::n_all_nodes
static

Definition at line 59 of file ShapeHex8.h.

◆ ORDER

int NumLib::ShapeHex8::ORDER = 1
staticconstexpr

Definition at line 60 of file ShapeHex8.h.

◆ reference_element_centre

std::array NumLib::ShapeHex8::reference_element_centre = {0.0, 0.0, 0.0}
staticconstexpr

Definition at line 55 of file ShapeHex8.h.

55{0.0, 0.0, 0.0};

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