GooseFEM 1.4.1.dev2+g78f16df
Loading...
Searching...
No Matches
GooseFEM::Element::QuadratureBase< D > Class Template Reference

CRTP base class for quadrature. More...

#include <GooseFEM/Element.h>

Inheritance diagram for GooseFEM::Element::QuadratureBase< D >:
GooseFEM::Element::QuadratureBaseCartesian< Quadrature > GooseFEM::Element::QuadratureBaseCartesian< QuadratureAxisymmetric > GooseFEM::Element::QuadratureBaseCartesian< QuadraturePlanar > GooseFEM::Element::QuadratureBaseCartesian< D > GooseFEM::Element::Hex8::Quadrature GooseFEM::Element::Quad4::Quadrature GooseFEM::Element::Quad4::QuadratureAxisymmetric GooseFEM::Element::Quad4::QuadraturePlanar

Public Types

using derived_type = D
 Underlying type.
 

Public Member Functions

auto nelem () const
 Number of elements.
 
auto nne () const
 Number of nodes per element.
 
auto ndim () const
 Number of dimensions for node vectors.
 
auto tdim () const
 Number of dimensions for integration point tensors.
 
auto nip () const
 Number of integration points.
 
template<class T , class R >
void asTensor (const T &arg, R &ret) const
 Convert "qscalar" to "qtensor" of certain rank.
 
template<size_t rank, class T >
auto AsTensor (const T &arg) const
 Convert "qscalar" to "qtensor" of certain rank.
 
template<class T >
auto AsTensor (size_t rank, const T &arg) const
 Convert "qscalar" to "qtensor" of certain rank.
 
auto shape_elemvec () const -> std::array< size_t, 3 >
 Get the shape of an "elemvec".
 
auto shape_elemvec (size_t arg) const -> std::array< size_t, 3 >
 Get the shape of an "elemvec".
 
auto shape_elemmat () const -> std::array< size_t, 3 >
 Get the shape of an "elemmat".
 
template<size_t rank = 0>
auto shape_qtensor () const -> std::array< size_t, 2+rank >
 Get the shape of a "qtensor" of a certain rank (0 = scalar, 1, vector, 2 = 2nd-order tensor, etc.).
 
auto shape_qtensor (size_t rank) const -> std::vector< size_t >
 Get the shape of a "qtensor" of a certain rank (0 = scalar, 1, vector, 2 = 2nd-order tensor, etc.).
 
template<size_t trank>
auto shape_qtensor (size_t rank, size_t arg) const -> std::array< size_t, 2+trank >
 Get the shape of a "qtensor" of a certain rank (0 = scalar, 1, vector, 2 = 2nd-order tensor, etc.).
 
auto shape_qtensor (size_t rank, size_t arg) const -> std::vector< size_t >
 Get the shape of a "qtensor" of a certain rank (0 = scalar, 1, vector, 2 = 2nd-order tensor, etc.).
 
auto shape_qscalar () const -> std::array< size_t, 2 >
 Get the shape of a "qscalar" (a "qtensor" of rank 0)
 
auto shape_qvector () const -> std::array< size_t, 3 >
 Get the shape of a "qvector" (a "qtensor" of rank 1)
 
auto shape_qvector (size_t arg) const -> std::array< size_t, 3 >
 Get the shape of a "qvector" (a "qtensor" of rank 1)
 
template<class R >
auto allocate_elemvec () const
 Get an allocated array_type::tensor to store a "elemvec".
 
template<class R >
auto allocate_elemvec (R val) const
 Get an allocated and initialised xt::xarray to store a "elemvec".
 
template<class R >
auto allocate_elemmat () const
 Get an allocated array_type::tensor to store a "elemmat".
 
template<class R >
auto allocate_elemmat (R val) const
 Get an allocated and initialised xt::xarray to store a "elemmat".
 
template<size_t rank = 0, class R >
auto allocate_qtensor () const
 Get an allocated array_type::tensor to store a "qtensor" of a certain rank (0 = scalar, 1, vector, 2 = 2nd-order tensor, etc.).
 
template<size_t rank = 0, class R >
auto allocate_qtensor (R val) const
 Get an allocated and initialised array_type::tensor to store a "qtensor" of a certain rank (0 = scalar, 1, vector, 2 = 2nd-order tensor, etc.).
 
template<class R >
auto allocate_qtensor (size_t rank) const
 Get an allocated xt::xarray to store a "qtensor" of a certain rank (0 = scalar, 1, vector, 2 = 2nd-order tensor, etc.).
 
template<class R >
auto allocate_qtensor (size_t rank, R val) const
 Get an allocated and initialised xt::xarray to store a "qtensor" of a certain rank (0 = scalar, 1, vector, 2 = 2nd-order tensor, etc.).
 
template<class R >
auto allocate_qscalar () const
 Get an allocated array_type::tensor to store a "qscalar" (a "qtensor" of rank 0).
 
template<class R >
auto allocate_qscalar (R val) const
 Get an allocated and initialised xt::xarray to store a "qscalar" (a "qtensor" of rank 0).
 

Detailed Description

template<class D>
class GooseFEM::Element::QuadratureBase< D >

CRTP base class for quadrature.

Definition at line 151 of file Element.h.

Member Typedef Documentation

◆ derived_type

template<class D >
using GooseFEM::Element::QuadratureBase< D >::derived_type = D

Underlying type.

Definition at line 156 of file Element.h.

Member Function Documentation

◆ allocate_elemmat() [1/2]

template<class D >
template<class R >
auto GooseFEM::Element::QuadratureBase< D >::allocate_elemmat ( ) const
inline

Get an allocated array_type::tensor to store a "elemmat".

Note: the container is not (zero-)initialised.

Template Parameters
Rvalue-type of the array, e.g. double.
Returns
xt::xarray container of the correct shape.

Definition at line 414 of file Element.h.

◆ allocate_elemmat() [2/2]

template<class D >
template<class R >
auto GooseFEM::Element::QuadratureBase< D >::allocate_elemmat ( R val) const
inline

Get an allocated and initialised xt::xarray to store a "elemmat".

Template Parameters
Rvalue-type of the array, e.g. double.
Parameters
valThe value to which to initialise all items.
Returns
array_type::tensor container of the correct shape.

Definition at line 427 of file Element.h.

◆ allocate_elemvec() [1/2]

template<class D >
template<class R >
auto GooseFEM::Element::QuadratureBase< D >::allocate_elemvec ( ) const
inline

Get an allocated array_type::tensor to store a "elemvec".

Note: the container is not (zero-)initialised.

Template Parameters
Rvalue-type of the array, e.g. double.
Returns
xt::xarray container of the correct shape.

Definition at line 386 of file Element.h.

◆ allocate_elemvec() [2/2]

template<class D >
template<class R >
auto GooseFEM::Element::QuadratureBase< D >::allocate_elemvec ( R val) const
inline

Get an allocated and initialised xt::xarray to store a "elemvec".

Template Parameters
Rvalue-type of the array, e.g. double.
Parameters
valThe value to which to initialise all items.
Returns
array_type::tensor container of the correct shape.

Definition at line 399 of file Element.h.

◆ allocate_qscalar() [1/2]

template<class D >
template<class R >
auto GooseFEM::Element::QuadratureBase< D >::allocate_qscalar ( ) const
inline

Get an allocated array_type::tensor to store a "qscalar" (a "qtensor" of rank 0).

Note: the container is not (zero-)initialised.

Template Parameters
Rvalue-type of the array, e.g. double.
Returns
xt::xarray container of the correct shape.

Definition at line 506 of file Element.h.

◆ allocate_qscalar() [2/2]

template<class D >
template<class R >
auto GooseFEM::Element::QuadratureBase< D >::allocate_qscalar ( R val) const
inline

Get an allocated and initialised xt::xarray to store a "qscalar" (a "qtensor" of rank 0).

Template Parameters
Rvalue-type of the array, e.g. double.
Parameters
valThe value to which to initialise all items.
Returns
array_type::tensor container of the correct shape (and rank).

Definition at line 519 of file Element.h.

◆ allocate_qtensor() [1/4]

template<class D >
template<size_t rank = 0, class R >
auto GooseFEM::Element::QuadratureBase< D >::allocate_qtensor ( ) const
inline

Get an allocated array_type::tensor to store a "qtensor" of a certain rank (0 = scalar, 1, vector, 2 = 2nd-order tensor, etc.).

Default: rank = 0, a.k.a. scalar. Note: the container is not (zero-)initialised.

Template Parameters
Rvalue-type of the array, e.g. double.
Returns
[nelem, nip].

Definition at line 444 of file Element.h.

◆ allocate_qtensor() [2/4]

template<class D >
template<size_t rank = 0, class R >
auto GooseFEM::Element::QuadratureBase< D >::allocate_qtensor ( R val) const
inline

Get an allocated and initialised array_type::tensor to store a "qtensor" of a certain rank (0 = scalar, 1, vector, 2 = 2nd-order tensor, etc.).

Default: rank = 0, a.k.a. scalar.

Template Parameters
Rvalue-type of the array, e.g. double.
Parameters
valThe value to which to initialise all items.
Returns
array_type::tensor container of the correct shape (and rank).

Definition at line 459 of file Element.h.

◆ allocate_qtensor() [3/4]

template<class D >
template<class R >
auto GooseFEM::Element::QuadratureBase< D >::allocate_qtensor ( size_t rank) const
inline

Get an allocated xt::xarray to store a "qtensor" of a certain rank (0 = scalar, 1, vector, 2 = 2nd-order tensor, etc.).

Note: the container is not (zero-)initialised.

Template Parameters
Rvalue-type of the array, e.g. double.
Parameters
rankThe tensor rank.
Returns
xt::xarray container of the correct shape.

Definition at line 476 of file Element.h.

◆ allocate_qtensor() [4/4]

template<class D >
template<class R >
auto GooseFEM::Element::QuadratureBase< D >::allocate_qtensor ( size_t rank,
R val ) const
inline

Get an allocated and initialised xt::xarray to store a "qtensor" of a certain rank (0 = scalar, 1, vector, 2 = 2nd-order tensor, etc.).

Template Parameters
Rvalue-type of the array, e.g. double.
Parameters
rankThe tensor rank.
valThe value to which to initialise all items.
Returns
array_type::tensor container of the correct shape (and rank).

Definition at line 491 of file Element.h.

◆ AsTensor() [1/2]

template<class D >
template<size_t rank, class T >
auto GooseFEM::Element::QuadratureBase< D >::AsTensor ( const T & arg) const
inline

Convert "qscalar" to "qtensor" of certain rank.

Parameters
argA "qscalar".
Returns
"qtensor".

Definition at line 229 of file Element.h.

◆ asTensor()

template<class D >
template<class T , class R >
void GooseFEM::Element::QuadratureBase< D >::asTensor ( const T & arg,
R & ret ) const
inline

Convert "qscalar" to "qtensor" of certain rank.

Fully allocated output passed as reference, use AsTensor to allocate and return data.

Parameters
argA "qscalar".
retA "qtensor".

Definition at line 216 of file Element.h.

◆ AsTensor() [2/2]

template<class D >
template<class T >
auto GooseFEM::Element::QuadratureBase< D >::AsTensor ( size_t rank,
const T & arg ) const
inline

Convert "qscalar" to "qtensor" of certain rank.

Parameters
rankTensor rank.
argA "qscalar".
Returns
"qtensor".

Definition at line 242 of file Element.h.

◆ ndim()

template<class D >
auto GooseFEM::Element::QuadratureBase< D >::ndim ( ) const
inline

Number of dimensions for node vectors.

Returns
Scalar.

Definition at line 183 of file Element.h.

◆ nelem()

template<class D >
auto GooseFEM::Element::QuadratureBase< D >::nelem ( ) const
inline

Number of elements.

Returns
Scalar.

Definition at line 163 of file Element.h.

◆ nip()

template<class D >
auto GooseFEM::Element::QuadratureBase< D >::nip ( ) const
inline

Number of integration points.

Returns
Scalar.

Definition at line 203 of file Element.h.

◆ nne()

template<class D >
auto GooseFEM::Element::QuadratureBase< D >::nne ( ) const
inline

Number of nodes per element.

Returns
Scalar.

Definition at line 173 of file Element.h.

◆ shape_elemmat()

template<class D >
auto GooseFEM::Element::QuadratureBase< D >::shape_elemmat ( ) const -> std::array<size_t, 3>
inline

Get the shape of an "elemmat".

Returns
[nelem, nne * ndim, nne * ndim].

Definition at line 273 of file Element.h.

◆ shape_elemvec() [1/2]

template<class D >
auto GooseFEM::Element::QuadratureBase< D >::shape_elemvec ( ) const -> std::array<size_t, 3>
inline

Get the shape of an "elemvec".

Returns
[nelem, nne, ndim].

Definition at line 252 of file Element.h.

◆ shape_elemvec() [2/2]

template<class D >
auto GooseFEM::Element::QuadratureBase< D >::shape_elemvec ( size_t arg) const -> std::array<size_t, 3>
inline

Get the shape of an "elemvec".

Parameters
argThe vector dimension.
Returns
[nelem, nne, tdim].

Definition at line 263 of file Element.h.

◆ shape_qscalar()

template<class D >
auto GooseFEM::Element::QuadratureBase< D >::shape_qscalar ( ) const -> std::array<size_t, 2>
inline

Get the shape of a "qscalar" (a "qtensor" of rank 0)

Returns
[nelem, nip].

Definition at line 354 of file Element.h.

◆ shape_qtensor() [1/4]

template<class D >
template<size_t rank = 0>
auto GooseFEM::Element::QuadratureBase< D >::shape_qtensor ( ) const -> std::array<size_t, 2 + rank>
inline

Get the shape of a "qtensor" of a certain rank (0 = scalar, 1, vector, 2 = 2nd-order tensor, etc.).

Template Parameters
rankRank of the tensor. Output is fixed-size: std::array<size_t, rank>.
Returns
[nelem, nip, tdim, ...].

Definition at line 288 of file Element.h.

◆ shape_qtensor() [2/4]

template<class D >
auto GooseFEM::Element::QuadratureBase< D >::shape_qtensor ( size_t rank) const -> std::vector<size_t>
inline

Get the shape of a "qtensor" of a certain rank (0 = scalar, 1, vector, 2 = 2nd-order tensor, etc.).

Parameters
rankThe tensor rank.
Returns
[nelem, nip, tdim, ...].

Definition at line 304 of file Element.h.

◆ shape_qtensor() [3/4]

template<class D >
template<size_t trank>
auto GooseFEM::Element::QuadratureBase< D >::shape_qtensor ( size_t rank,
size_t arg ) const -> std::array<size_t, 2 + trank>
inline

Get the shape of a "qtensor" of a certain rank (0 = scalar, 1, vector, 2 = 2nd-order tensor, etc.).

Template Parameters
rankRank of the tensor. Output is fixed-size: std::array<size_t, rank>.
Parameters
rankThe tensor rank. Effectively useless: to distinguish from the dynamic-sized.
argThe tensor dimension.
Returns
[nelem, nip, tdim, ...].

Definition at line 323 of file Element.h.

◆ shape_qtensor() [4/4]

template<class D >
auto GooseFEM::Element::QuadratureBase< D >::shape_qtensor ( size_t rank,
size_t arg ) const -> std::vector<size_t>
inline

Get the shape of a "qtensor" of a certain rank (0 = scalar, 1, vector, 2 = 2nd-order tensor, etc.).

Parameters
rankThe tensor rank.
argThe tensor dimension.
Returns
[nelem, nip, tdim, ...].

Definition at line 341 of file Element.h.

◆ shape_qvector() [1/2]

template<class D >
auto GooseFEM::Element::QuadratureBase< D >::shape_qvector ( ) const -> std::array<size_t, 3>
inline

Get the shape of a "qvector" (a "qtensor" of rank 1)

Returns
[nelem, nip, tdim].

Definition at line 363 of file Element.h.

◆ shape_qvector() [2/2]

template<class D >
auto GooseFEM::Element::QuadratureBase< D >::shape_qvector ( size_t arg) const -> std::array<size_t, 3>
inline

Get the shape of a "qvector" (a "qtensor" of rank 1)

Parameters
argTensor dimension.
Returns
[nelem, nip, tdim].

Definition at line 373 of file Element.h.

◆ tdim()

template<class D >
auto GooseFEM::Element::QuadratureBase< D >::tdim ( ) const
inline

Number of dimensions for integration point tensors.

Returns
Scalar.

Definition at line 193 of file Element.h.


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