GMatTensor 0.10.6
Loading...
Searching...
No Matches
GMatTensor::Cartesian3d::Array< N > Class Template Reference

Array of tensors: More...

#include <GMatTensor/Cartesian3d.h>

Public Member Functions

 Array (const std::array< size_t, N > &shape)
 Constructor. More...
 
const std::array< size_t, N > & shape () const
 Shape of the array (of scalars). More...
 
const std::array< size_t, N+2 > & shape_tensor2 () const
 Shape of the array of second-order tensors. More...
 
const std::array< size_t, N+4 > & shape_tensor4 () const
 Shape of the array of fourth-order tensors. More...
 
array_type::tensor< double, N+2 > O2 () const
 Array of Cartesian3d::O2() More...
 
array_type::tensor< double, N+4 > O4 () const
 Array of Cartesian3d::O4() More...
 
array_type::tensor< double, N+2 > I2 () const
 Array of Cartesian3d::I2() More...
 
array_type::tensor< double, N+4 > II () const
 Array of Cartesian3d::II() More...
 
array_type::tensor< double, N+4 > I4 () const
 Array of Cartesian3d::I4() More...
 
array_type::tensor< double, N+4 > I4rt () const
 Array of Cartesian3d::I4rt() More...
 
array_type::tensor< double, N+4 > I4s () const
 Array of Cartesian3d::I4s() More...
 
array_type::tensor< double, N+4 > I4d () const
 Array of Cartesian3d::I4d() More...
 

Static Public Attributes

static constexpr std::size_t rank = N
 Rank of the array (the actual rank is increased with the tensor-rank). More...
 

Protected Member Functions

void init (const std::array< size_t, N > &shape)
 Constructor 'alias'. More...
 

Protected Attributes

size_t m_size
 Size of the array (of scalars) == prod(m_shape). More...
 
std::array< size_t, N > m_shape
 Shape of the array (of scalars). More...
 
std::array< size_t, N+2 > m_shape_tensor2
 Shape of an array of 2nd-order tensors == [m_shape, 3, 3]. More...
 
std::array< size_t, N+4 > m_shape_tensor4
 Shape of an array of 4th-order tensors == [m_shape, 3, 3, 3, 3]. More...
 

Static Protected Attributes

static constexpr size_t m_ndim = 3
 Number of dimensions of tensors. More...
 
static constexpr size_t m_stride_tensor2 = 9
 Storage stride for 2nd-order tensors ( \( 3^2 \)). More...
 
static constexpr size_t m_stride_tensor4 = 81
 Storage stride for 4th-order tensors ( \( 3^4 \)). More...
 

Detailed Description

template<size_t N>
class GMatTensor::Cartesian3d::Array< N >

Array of tensors:

  • scalars: shape [...].
  • 2nd-order tensors: shape [..., 3, 3].
  • 4nd-order tensors: shape [..., 3, 3, 3, 3].
Template Parameters
NThe rank of the array (the actual rank is increased with the tensor-rank).

Definition at line 1467 of file Cartesian3d.h.

Constructor & Destructor Documentation

◆ Array()

template<size_t N>
GMatTensor::Cartesian3d::Array< N >::Array ( const std::array< size_t, N > &  shape)
inline

Constructor.

Parameters
shapeThe shape of the array (or scalars).

Definition at line 1483 of file Cartesian3d.h.

Member Function Documentation

◆ I2()

template<size_t N>
array_type::tensor< double, N+2 > GMatTensor::Cartesian3d::Array< N >::I2 ( ) const
inline

Array of Cartesian3d::I2()

Returns
[shape(), 3, 3]

Definition at line 1543 of file Cartesian3d.h.

◆ I4()

template<size_t N>
array_type::tensor< double, N+4 > GMatTensor::Cartesian3d::Array< N >::I4 ( ) const
inline

Array of Cartesian3d::I4()

Returns
[shape(), 3, 3, 3, 3]

Definition at line 1577 of file Cartesian3d.h.

◆ I4d()

template<size_t N>
array_type::tensor< double, N+4 > GMatTensor::Cartesian3d::Array< N >::I4d ( ) const
inline

Array of Cartesian3d::I4d()

Returns
[shape(), 3, 3, 3, 3]

Definition at line 1628 of file Cartesian3d.h.

◆ I4rt()

template<size_t N>
array_type::tensor< double, N+4 > GMatTensor::Cartesian3d::Array< N >::I4rt ( ) const
inline

Array of Cartesian3d::I4rt()

Returns
[shape(), 3, 3, 3, 3]

Definition at line 1594 of file Cartesian3d.h.

◆ I4s()

template<size_t N>
array_type::tensor< double, N+4 > GMatTensor::Cartesian3d::Array< N >::I4s ( ) const
inline

Array of Cartesian3d::I4s()

Returns
[shape(), 3, 3, 3, 3]

Definition at line 1611 of file Cartesian3d.h.

◆ II()

template<size_t N>
array_type::tensor< double, N+4 > GMatTensor::Cartesian3d::Array< N >::II ( ) const
inline

Array of Cartesian3d::II()

Returns
[shape(), 3, 3, 3, 3]

Definition at line 1560 of file Cartesian3d.h.

◆ init()

template<size_t N>
void GMatTensor::Cartesian3d::Array< N >::init ( const std::array< size_t, N > &  shape)
inlineprotected

Constructor 'alias'.

Can be used by constructor of derived classes.

Parameters
shapeThe shape of the array (or scalars).

Definition at line 1646 of file Cartesian3d.h.

◆ O2()

template<size_t N>
array_type::tensor< double, N+2 > GMatTensor::Cartesian3d::Array< N >::O2 ( ) const
inline

Array of Cartesian3d::O2()

Returns
[shape(), 3, 3]

Definition at line 1523 of file Cartesian3d.h.

◆ O4()

template<size_t N>
array_type::tensor< double, N+4 > GMatTensor::Cartesian3d::Array< N >::O4 ( ) const
inline

Array of Cartesian3d::O4()

Returns
[shape(), 3, 3, 3, 3]

Definition at line 1533 of file Cartesian3d.h.

◆ shape()

template<size_t N>
const std::array< size_t, N > & GMatTensor::Cartesian3d::Array< N >::shape ( ) const
inline

Shape of the array (of scalars).

Returns
List of size rank.

Definition at line 1493 of file Cartesian3d.h.

◆ shape_tensor2()

template<size_t N>
const std::array< size_t, N+2 > & GMatTensor::Cartesian3d::Array< N >::shape_tensor2 ( ) const
inline

Shape of the array of second-order tensors.

Returns
List of size rank + 2.

Definition at line 1503 of file Cartesian3d.h.

◆ shape_tensor4()

template<size_t N>
const std::array< size_t, N+4 > & GMatTensor::Cartesian3d::Array< N >::shape_tensor4 ( ) const
inline

Shape of the array of fourth-order tensors.

Returns
List of size rank + 4.

Definition at line 1513 of file Cartesian3d.h.

Member Data Documentation

◆ m_ndim

template<size_t N>
constexpr size_t GMatTensor::Cartesian3d::Array< N >::m_ndim = 3
staticconstexprprotected

Number of dimensions of tensors.

Definition at line 1658 of file Cartesian3d.h.

◆ m_shape

template<size_t N>
std::array<size_t, N> GMatTensor::Cartesian3d::Array< N >::m_shape
protected

Shape of the array (of scalars).

Definition at line 1670 of file Cartesian3d.h.

◆ m_shape_tensor2

template<size_t N>
std::array<size_t, N + 2> GMatTensor::Cartesian3d::Array< N >::m_shape_tensor2
protected

Shape of an array of 2nd-order tensors == [m_shape, 3, 3].

Definition at line 1673 of file Cartesian3d.h.

◆ m_shape_tensor4

template<size_t N>
std::array<size_t, N + 4> GMatTensor::Cartesian3d::Array< N >::m_shape_tensor4
protected

Shape of an array of 4th-order tensors == [m_shape, 3, 3, 3, 3].

Definition at line 1676 of file Cartesian3d.h.

◆ m_size

template<size_t N>
size_t GMatTensor::Cartesian3d::Array< N >::m_size
protected

Size of the array (of scalars) == prod(m_shape).

Definition at line 1667 of file Cartesian3d.h.

◆ m_stride_tensor2

template<size_t N>
constexpr size_t GMatTensor::Cartesian3d::Array< N >::m_stride_tensor2 = 9
staticconstexprprotected

Storage stride for 2nd-order tensors ( \( 3^2 \)).

Definition at line 1661 of file Cartesian3d.h.

◆ m_stride_tensor4

template<size_t N>
constexpr size_t GMatTensor::Cartesian3d::Array< N >::m_stride_tensor4 = 81
staticconstexprprotected

Storage stride for 4th-order tensors ( \( 3^4 \)).

Definition at line 1664 of file Cartesian3d.h.

◆ rank

template<size_t N>
constexpr std::size_t GMatTensor::Cartesian3d::Array< N >::rank = N
staticconstexpr

Rank of the array (the actual rank is increased with the tensor-rank).

Definition at line 1472 of file Cartesian3d.h.


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