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 39 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 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 60 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 27 of file ShapeHex8-impl.h.

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

◆ 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 14 of file ShapeHex8-impl.h.

15{
16 N[0] = (1.0 - r[0]) * (1.0 - r[1]) * (1.0 - r[2]) * 0.125;
17 N[1] = (1.0 + r[0]) * (1.0 - r[1]) * (1.0 - r[2]) * 0.125;
18 N[2] = (1.0 + r[0]) * (1.0 + r[1]) * (1.0 - r[2]) * 0.125;
19 N[3] = (1.0 - r[0]) * (1.0 + r[1]) * (1.0 - r[2]) * 0.125;
20 N[4] = (1.0 - r[0]) * (1.0 - r[1]) * (1.0 + r[2]) * 0.125;
21 N[5] = (1.0 + r[0]) * (1.0 - r[1]) * (1.0 + r[2]) * 0.125;
22 N[6] = (1.0 + r[0]) * (1.0 + r[1]) * (1.0 + r[2]) * 0.125;
23 N[7] = (1.0 - r[0]) * (1.0 + r[1]) * (1.0 + r[2]) * 0.125;
24}

References NumLib::N.

Member Data Documentation

◆ DIM

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

Definition at line 61 of file ShapeHex8.h.

◆ NPOINTS

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

Definition at line 62 of file ShapeHex8.h.

◆ ORDER

constexpr int NumLib::ShapeHex8::ORDER = 1
staticconstexpr

Definition at line 63 of file ShapeHex8.h.


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