Namespace ae108::elements::shape
Namespace List > ae108 > elements > shape
Compute the values, gradients, and support points of a set of shape functions. More...
Classes
Type | Name |
---|---|
struct | AutomaticGradientTrait <class Shape_> |
struct | GradientTrait <class Shape> |
struct | Hexa8 |
struct | PointTrait <class Shape> Contains a member value that defines the points of the shape. |
struct | Quad4 |
struct | Seg2 |
class | ShapeBase <class SizeType_, class ValueType_, Dimension_, Size_> |
struct | Tet10 |
struct | Tet4 |
struct | Tri3 |
struct | Tri6 |
struct | ValueTrait <class Shape> |
Public Functions
Type | Name |
---|---|
AE108_ELEMENTS_SHAPE_DEFINE_GRADIENTS (Hexa8, {{ {{-.125 *(xi[1] - 1.) *(xi[2] - 1.), -.125 *(xi[0] - 1.) *(xi[2] - 1.), -.125 *(xi[0] - 1.) *(xi[1] - 1.)}}, {{.125 *(xi[1] - 1.) *(xi[2] - 1.),.125 *(xi[0]+1.) *(xi[2] - 1.),.125 *(xi[0]+1.) *(xi[1] - 1.)}}, {{-.125 *(xi[1]+1.) *(xi[2] - 1.), -.125 *(xi[0]+1.) *(xi[2] - 1.), -.125 *(xi[0]+1.) *(xi[1]+1.)}}, {{.125 *(xi[1]+1.) *(xi[2] - 1.),.125 *(xi[0] - 1.) *(xi[2] - 1.),.125 *(xi[0] - 1.) *(xi[1]+1.)}}, {{.125 *(xi[1] - 1.) *(xi[2]+1.),.125 *(xi[0] - 1.) *(xi[2]+1.),.125 *(xi[0] - 1.) *(xi[1] - 1.)}}, {{-.125 *(xi[1] - 1.) *(xi[2]+1.), -.125 *(xi[0]+1.) *(xi[2]+1.), -.125 *(xi[0]+1.) *(xi[1] - 1.)}}, {{.125 *(xi[1]+1.) *(xi[2]+1.),.125 *(xi[0]+1.) *(xi[2]+1.),.125 *(xi[0]+1.) *(xi[1]+1.)}}, {{-.125 *(xi[1]+1.) *(xi[2]+1.), -.125 *(xi[0] - 1.) *(xi[2]+1.), -.125 *(xi[0] - 1.) *(xi[1]+1.)}}, }}) |
|
AE108_ELEMENTS_SHAPE_DEFINE_GRADIENTS (Quad4, {{ {{.25 *(xi[1] - 1.),.25 *(xi[0] - 1.)}}, {{-.25 *(xi[1] - 1.), -.25 *(xi[0]+1.)}}, {{.25 *(xi[1]+1.),.25 *(xi[0]+1.)}}, {{-.25 *(xi[1]+1.), -.25 *(xi[0] - 1.)}}, }}) |
|
AE108_ELEMENTS_SHAPE_DEFINE_GRADIENTS (Seg2, {{ {{-.5}}, {{.5}}, }}) |
|
AE108_ELEMENTS_SHAPE_DEFINE_GRADIENTS (Tet10, {{ {{1. - 4. *(1 - xi[0] - xi[1] - xi[2]), 1. - 4. *(1 - xi[0] - xi[1] - xi[2]), 1. - 4. *(1 - xi[0] - xi[1] - xi[2])}}, {{-1.+4. *xi[0], 0., 0.}}, {{0., -1.+4. *xi[1], 0.}}, {{0., 0., -1.+4. *xi[2]}}, {{4. *((1 - xi[0] - xi[1] - xi[2]) - xi[0]), -4. *xi[0], -4. *xi[0]}}, {{4. *xi[1], 4. *xi[0], 0.}}, {{-4. *xi[1], 4. *((1 - xi[0] - xi[1] - xi[2]) - xi[1]), -4 *xi[1]}}, {{-4. *xi[2], -4. *xi[2], 4. *((1 - xi[0] - xi[1] - xi[2]) - xi[2])}}, {{4. *xi[2], 0., 4. *xi[0]}}, {{0., 4. *xi[2], 4. *xi[1]}}, }}) |
|
AE108_ELEMENTS_SHAPE_DEFINE_GRADIENTS (Tet4, {{ {{-1., -1., -1.}}, {{1., 0., 0.}}, {{0., 1., 0.}}, {{0., 0., 1.}}, }}) |
|
AE108_ELEMENTS_SHAPE_DEFINE_GRADIENTS (Tri3, {{ {{-1., -1.}}, {{1., 0.}}, {{0., 1.}}, }}) |
|
AE108_ELEMENTS_SHAPE_DEFINE_GRADIENTS (Tri6, {{ {{4. *(xi[0]+xi[1]) - 3., 4. *(xi[0]+xi[1]) - 3.}}, {{4. *xi[0] - 1., 0.}}, {{0., 4 *xi[1] - 1}}, {{4. *(1 - 2 *xi[0] - xi[1]), -4. *xi[0]}}, {{4. *xi[1], 4. *xi[0]}}, {{-4. *xi[1], 4. *(1 - xi[0] - 2. *xi[1])}}, }}) |
|
AE108_ELEMENTS_SHAPE_DEFINE_POINTS (Hexa8, {{ {{-1., -1., -1.}}, {{1., -1., -1.}}, {{1., 1., -1.}}, {{-1., 1., -1.}}, {{-1., -1., 1.}}, {{1., -1., 1.}}, {{1., 1., 1.}}, {{-1., 1., 1.}}, }}) |
|
AE108_ELEMENTS_SHAPE_DEFINE_POINTS (Quad4, {{ {{-1., -1.}}, {{1., -1.}}, {{1., 1.}}, {{-1., 1.}}, }}) |
|
AE108_ELEMENTS_SHAPE_DEFINE_POINTS (Seg2, {{ {{-1.}}, {{1.}}, }}) |
|
AE108_ELEMENTS_SHAPE_DEFINE_POINTS (Tet10, {{ {{0., 0., 0.}}, {{1., 0., 0.}}, {{0., 1., 0.}}, {{0., 0., 1.}}, {{.5, 0., 0.}}, {{.5,.5, 0.}}, {{0.,.5, 0.}}, {{0., 0.,.5}}, {{.5, 0.,.5}}, {{0.,.5,.5}}, }}) |
|
AE108_ELEMENTS_SHAPE_DEFINE_POINTS (Tet4, {{ {{0., 0., 0.}}, {{1., 0., 0.}}, {{0., 1., 0.}}, {{0., 0., 1.}}, }}) |
|
AE108_ELEMENTS_SHAPE_DEFINE_POINTS (Tri3, {{ {{0., 0.}}, {{1., 0.}}, {{0., 1.}}, }}) |
|
AE108_ELEMENTS_SHAPE_DEFINE_POINTS (Tri6, {{ {{0., 0.}}, {{1., 0.}}, {{0., 1.}}, {{0.5, 0.}}, {{0.5, 0.5}}, {{0., 0.5}}, }}) |
|
AE108_ELEMENTS_SHAPE_DEFINE_VALUE (Hexa8, {{ -.125 *(xi[0] - 1.) *(xi[1] - 1.) *(xi[2] - 1.),.125 *(xi[0]+1.) *(xi[1] - 1.) *(xi[2] - 1.), -.125 *(xi[0]+1.) *(xi[1]+1.) *(xi[2] - 1.),.125 *(xi[0] - 1.) *(xi[1]+1.) *(xi[2] - 1.),.125 *(xi[0] - 1.) *(xi[1] - 1.) *(xi[2]+1.), -.125 *(xi[0]+1.) *(xi[1] - 1.) *(xi[2]+1.),.125 *(xi[0]+1.) *(xi[1]+1.) *(xi[2]+1.), -.125 *(xi[0] - 1.) *(xi[1]+1.) *(xi[2]+1.), }}) |
|
AE108_ELEMENTS_SHAPE_DEFINE_VALUE (Quad4, {{ .25 *(xi[0] - 1.) *(xi[1] - 1.), -.25 *(xi[0]+1.) *(xi[1] - 1.),.25 *(xi[0]+1.) *(xi[1]+1.), -.25 *(xi[0] - 1.) *(xi[1]+1.), }}) |
|
AE108_ELEMENTS_SHAPE_DEFINE_VALUE (Seg2, {{ -.5 *(xi[0] - 1.),.5 *(xi[0]+1.), }}) |
|
AE108_ELEMENTS_SHAPE_DEFINE_VALUE (Tet10, {{ -(1. - xi[0] - xi[1] - xi[2]) *(1. - 2. *(1 - xi[0] - xi[1] - xi[2])), -xi[0] *(1 - 2. *xi[0]), -xi[1] *(1. - 2. *xi[1]), -xi[2] *(1. - 2. *xi[2]), 4. *xi[0] *(1 - xi[0] - xi[1] - xi[2]), 4. *xi[0] *xi[1], 4. *xi[1] *(1 - xi[0] - xi[1] - xi[2]), 4. *xi[2] *(1 - xi[0] - xi[1] - xi[2]), 4. *xi[0] *xi[2], 4. *xi[1] *xi[2], }}) |
|
AE108_ELEMENTS_SHAPE_DEFINE_VALUE (Tet4, {{ 1 - xi[0] - xi[1] - xi[2], xi[0], xi[1], xi[2], }}) |
|
AE108_ELEMENTS_SHAPE_DEFINE_VALUE (Tri3, {{ 1 - xi[0] - xi[1], xi[0], xi[1], }}) |
|
AE108_ELEMENTS_SHAPE_DEFINE_VALUE (Tri6, {{(1 - xi[0] - xi[1]) *(1 - 2 *xi[0] - 2 *xi[1]), xi[0] *(2 *xi[0] - 1), xi[1] *(2 *xi[1] - 1), 4 *xi[0] *(1 - xi[0] - xi[1]), 4 *xi[0] *xi[1], 4 *xi[1] *(1 - xi[0] - xi[1]), }}) |
|
Shape::template Collection< typename Shape::Gradient > | automatic_gradients (const typename Shape::Point & xi) Computes the gradients using numerical differentiation. |
Shape::template Collection< typename Shape::Gradient > | compute_gradients (const typename Shape::Point & xi) noexcept |
Shape::template Collection< typename Shape::value_type > | compute_values (const typename Shape::Point & xi) noexcept |
Shape::template Collection< typename Shape::Point > | get_points () noexcept |
Detailed Description
Provides traits to compute the values, gradients, and support points of a set of shape functions. Here, “support point” refers to a point where a shape function is equal to one whereas all other shape functions are equal to zero. There is also a trait to compute the gradients numerically.
The part includes three sets of shape functions for which these traits are implemented: @refHexa8, Quad4, and Seg2.
Public Functions Documentation
function AE108_ELEMENTS_SHAPE_DEFINE_GRADIENTS
ae108::elements::shape::AE108_ELEMENTS_SHAPE_DEFINE_GRADIENTS (
Hexa8,
{{ {{-.125 *(xi[1] - 1.) *(xi[2] - 1.), -.125 *(xi[0] - 1.) *(xi[2] - 1.), -.125 *(xi[0] - 1.) *(xi[1] - 1.)}}, {{.125 *(xi[1] - 1.) *(xi[2] - 1.),.125 *(xi[0]+1.) *(xi[2] - 1.),.125 *(xi[0]+1.) *(xi[1] - 1.)}}, {{-.125 *(xi[1]+1.) *(xi[2] - 1.), -.125 *(xi[0]+1.) *(xi[2] - 1.), -.125 *(xi[0]+1.) *(xi[1]+1.)}}, {{.125 *(xi[1]+1.) *(xi[2] - 1.),.125 *(xi[0] - 1.) *(xi[2] - 1.),.125 *(xi[0] - 1.) *(xi[1]+1.)}}, {{.125 *(xi[1] - 1.) *(xi[2]+1.),.125 *(xi[0] - 1.) *(xi[2]+1.),.125 *(xi[0] - 1.) *(xi[1] - 1.)}}, {{-.125 *(xi[1] - 1.) *(xi[2]+1.), -.125 *(xi[0]+1.) *(xi[2]+1.), -.125 *(xi[0]+1.) *(xi[1] - 1.)}}, {{.125 *(xi[1]+1.) *(xi[2]+1.),.125 *(xi[0]+1.) *(xi[2]+1.),.125 *(xi[0]+1.) *(xi[1]+1.)}}, {{-.125 *(xi[1]+1.) *(xi[2]+1.), -.125 *(xi[0] - 1.) *(xi[2]+1.), -.125 *(xi[0] - 1.) *(xi[1]+1.)}}, }}
)
function AE108_ELEMENTS_SHAPE_DEFINE_GRADIENTS
ae108::elements::shape::AE108_ELEMENTS_SHAPE_DEFINE_GRADIENTS (
Quad4,
{{ {{.25 *(xi[1] - 1.),.25 *(xi[0] - 1.)}}, {{-.25 *(xi[1] - 1.), -.25 *(xi[0]+1.)}}, {{.25 *(xi[1]+1.),.25 *(xi[0]+1.)}}, {{-.25 *(xi[1]+1.), -.25 *(xi[0] - 1.)}}, }}
)
function AE108_ELEMENTS_SHAPE_DEFINE_GRADIENTS
ae108::elements::shape::AE108_ELEMENTS_SHAPE_DEFINE_GRADIENTS (
Seg2,
{{ {{-.5}}, {{.5}}, }}
)
function AE108_ELEMENTS_SHAPE_DEFINE_GRADIENTS
ae108::elements::shape::AE108_ELEMENTS_SHAPE_DEFINE_GRADIENTS (
Tet10,
{{ {{1. - 4. *(1 - xi[0] - xi[1] - xi[2]), 1. - 4. *(1 - xi[0] - xi[1] - xi[2]), 1. - 4. *(1 - xi[0] - xi[1] - xi[2])}}, {{-1.+4. *xi[0], 0., 0.}}, {{0., -1.+4. *xi[1], 0.}}, {{0., 0., -1.+4. *xi[2]}}, {{4. *((1 - xi[0] - xi[1] - xi[2]) - xi[0]), -4. *xi[0], -4. *xi[0]}}, {{4. *xi[1], 4. *xi[0], 0.}}, {{-4. *xi[1], 4. *((1 - xi[0] - xi[1] - xi[2]) - xi[1]), -4 *xi[1]}}, {{-4. *xi[2], -4. *xi[2], 4. *((1 - xi[0] - xi[1] - xi[2]) - xi[2])}}, {{4. *xi[2], 0., 4. *xi[0]}}, {{0., 4. *xi[2], 4. *xi[1]}}, }}
)
function AE108_ELEMENTS_SHAPE_DEFINE_GRADIENTS
ae108::elements::shape::AE108_ELEMENTS_SHAPE_DEFINE_GRADIENTS (
Tet4,
{{ {{-1., -1., -1.}}, {{1., 0., 0.}}, {{0., 1., 0.}}, {{0., 0., 1.}}, }}
)
function AE108_ELEMENTS_SHAPE_DEFINE_GRADIENTS
ae108::elements::shape::AE108_ELEMENTS_SHAPE_DEFINE_GRADIENTS (
Tri3,
{{ {{-1., -1.}}, {{1., 0.}}, {{0., 1.}}, }}
)
function AE108_ELEMENTS_SHAPE_DEFINE_GRADIENTS
ae108::elements::shape::AE108_ELEMENTS_SHAPE_DEFINE_GRADIENTS (
Tri6,
{{ {{4. *(xi[0]+xi[1]) - 3., 4. *(xi[0]+xi[1]) - 3.}}, {{4. *xi[0] - 1., 0.}}, {{0., 4 *xi[1] - 1}}, {{4. *(1 - 2 *xi[0] - xi[1]), -4. *xi[0]}}, {{4. *xi[1], 4. *xi[0]}}, {{-4. *xi[1], 4. *(1 - xi[0] - 2. *xi[1])}}, }}
)
function AE108_ELEMENTS_SHAPE_DEFINE_POINTS
ae108::elements::shape::AE108_ELEMENTS_SHAPE_DEFINE_POINTS (
Hexa8,
{{ {{-1., -1., -1.}}, {{1., -1., -1.}}, {{1., 1., -1.}}, {{-1., 1., -1.}}, {{-1., -1., 1.}}, {{1., -1., 1.}}, {{1., 1., 1.}}, {{-1., 1., 1.}}, }}
)
function AE108_ELEMENTS_SHAPE_DEFINE_POINTS
ae108::elements::shape::AE108_ELEMENTS_SHAPE_DEFINE_POINTS (
Quad4,
{{ {{-1., -1.}}, {{1., -1.}}, {{1., 1.}}, {{-1., 1.}}, }}
)
function AE108_ELEMENTS_SHAPE_DEFINE_POINTS
ae108::elements::shape::AE108_ELEMENTS_SHAPE_DEFINE_POINTS (
Seg2,
{{ {{-1.}}, {{1.}}, }}
)
function AE108_ELEMENTS_SHAPE_DEFINE_POINTS
ae108::elements::shape::AE108_ELEMENTS_SHAPE_DEFINE_POINTS (
Tet10,
{{ {{0., 0., 0.}}, {{1., 0., 0.}}, {{0., 1., 0.}}, {{0., 0., 1.}}, {{.5, 0., 0.}}, {{.5,.5, 0.}}, {{0.,.5, 0.}}, {{0., 0.,.5}}, {{.5, 0.,.5}}, {{0.,.5,.5}}, }}
)
function AE108_ELEMENTS_SHAPE_DEFINE_POINTS
ae108::elements::shape::AE108_ELEMENTS_SHAPE_DEFINE_POINTS (
Tet4,
{{ {{0., 0., 0.}}, {{1., 0., 0.}}, {{0., 1., 0.}}, {{0., 0., 1.}}, }}
)
function AE108_ELEMENTS_SHAPE_DEFINE_POINTS
ae108::elements::shape::AE108_ELEMENTS_SHAPE_DEFINE_POINTS (
Tri3,
{{ {{0., 0.}}, {{1., 0.}}, {{0., 1.}}, }}
)
function AE108_ELEMENTS_SHAPE_DEFINE_POINTS
ae108::elements::shape::AE108_ELEMENTS_SHAPE_DEFINE_POINTS (
Tri6,
{{ {{0., 0.}}, {{1., 0.}}, {{0., 1.}}, {{0.5, 0.}}, {{0.5, 0.5}}, {{0., 0.5}}, }}
)
function AE108_ELEMENTS_SHAPE_DEFINE_VALUE
ae108::elements::shape::AE108_ELEMENTS_SHAPE_DEFINE_VALUE (
Hexa8,
{{ -.125 *(xi[0] - 1.) *(xi[1] - 1.) *(xi[2] - 1.),.125 *(xi[0]+1.) *(xi[1] - 1.) *(xi[2] - 1.), -.125 *(xi[0]+1.) *(xi[1]+1.) *(xi[2] - 1.),.125 *(xi[0] - 1.) *(xi[1]+1.) *(xi[2] - 1.),.125 *(xi[0] - 1.) *(xi[1] - 1.) *(xi[2]+1.), -.125 *(xi[0]+1.) *(xi[1] - 1.) *(xi[2]+1.),.125 *(xi[0]+1.) *(xi[1]+1.) *(xi[2]+1.), -.125 *(xi[0] - 1.) *(xi[1]+1.) *(xi[2]+1.), }}
)
function AE108_ELEMENTS_SHAPE_DEFINE_VALUE
ae108::elements::shape::AE108_ELEMENTS_SHAPE_DEFINE_VALUE (
Quad4,
{{ .25 *(xi[0] - 1.) *(xi[1] - 1.), -.25 *(xi[0]+1.) *(xi[1] - 1.),.25 *(xi[0]+1.) *(xi[1]+1.), -.25 *(xi[0] - 1.) *(xi[1]+1.), }}
)
function AE108_ELEMENTS_SHAPE_DEFINE_VALUE
ae108::elements::shape::AE108_ELEMENTS_SHAPE_DEFINE_VALUE (
Seg2,
{{ -.5 *(xi[0] - 1.),.5 *(xi[0]+1.), }}
)
function AE108_ELEMENTS_SHAPE_DEFINE_VALUE
ae108::elements::shape::AE108_ELEMENTS_SHAPE_DEFINE_VALUE (
Tet10,
{{ -(1. - xi[0] - xi[1] - xi[2]) *(1. - 2. *(1 - xi[0] - xi[1] - xi[2])), -xi[0] *(1 - 2. *xi[0]), -xi[1] *(1. - 2. *xi[1]), -xi[2] *(1. - 2. *xi[2]), 4. *xi[0] *(1 - xi[0] - xi[1] - xi[2]), 4. *xi[0] *xi[1], 4. *xi[1] *(1 - xi[0] - xi[1] - xi[2]), 4. *xi[2] *(1 - xi[0] - xi[1] - xi[2]), 4. *xi[0] *xi[2], 4. *xi[1] *xi[2], }}
)
function AE108_ELEMENTS_SHAPE_DEFINE_VALUE
ae108::elements::shape::AE108_ELEMENTS_SHAPE_DEFINE_VALUE (
Tet4,
{{ 1 - xi[0] - xi[1] - xi[2], xi[0], xi[1], xi[2], }}
)
function AE108_ELEMENTS_SHAPE_DEFINE_VALUE
ae108::elements::shape::AE108_ELEMENTS_SHAPE_DEFINE_VALUE (
Tri3,
{{ 1 - xi[0] - xi[1], xi[0], xi[1], }}
)
function AE108_ELEMENTS_SHAPE_DEFINE_VALUE
ae108::elements::shape::AE108_ELEMENTS_SHAPE_DEFINE_VALUE (
Tri6,
{{(1 - xi[0] - xi[1]) *(1 - 2 *xi[0] - 2 *xi[1]), xi[0] *(2 *xi[0] - 1), xi[1] *(2 *xi[1] - 1), 4 *xi[0] *(1 - xi[0] - xi[1]), 4 *xi[0] *xi[1], 4 *xi[1] *(1 - xi[0] - xi[1]), }}
)
function automatic_gradients
Computes the gradients using numerical differentiation.
template<class Shape>
Shape::template Collection< typename Shape::Gradient > ae108::elements::shape::automatic_gradients (
const typename Shape::Point & xi
)
function compute_gradients
template<class Shape>
Shape::template Collection< typename Shape::Gradient > ae108::elements::shape::compute_gradients (
const typename Shape::Point & xi
) noexcept
function compute_values
template<class Shape>
Shape::template Collection< typename Shape::value_type > ae108::elements::shape::compute_values (
const typename Shape::Point & xi
) noexcept
function get_points
template<class Shape>
Shape::template Collection< typename Shape::Point > ae108::elements::shape::get_points () noexcept
The documentation for this class was generated from the following file elements/src/include/ae108/elements/shape/automatic_gradients.h