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

Array of tensors: More...

#include <GMatTensor/Cartesian2d.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 Cartesian2d::O2() More...
 
array_type::tensor< double, N+4 > O4 () const
 Array of Cartesian2d::O4() More...
 
array_type::tensor< double, N+2 > I2 () const
 Array of Cartesian2d::I2() More...
 
array_type::tensor< double, N+4 > II () const
 Array of Cartesian2d::II() More...
 
array_type::tensor< double, N+4 > I4 () const
 Array of Cartesian2d::I4() More...
 
array_type::tensor< double, N+4 > I4rt () const
 Array of Cartesian2d::I4rt() More...
 
array_type::tensor< double, N+4 > I4s () const
 Array of Cartesian2d::I4s() More...
 
array_type::tensor< double, N+4 > I4d () const
 Array of Cartesian2d::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, 2, 2]. More...
 
std::array< size_t, N+4 > m_shape_tensor4
 Shape of an array of 4th-order tensors == [m_shape, 2, 2, 2, 2]. More...
 

Static Protected Attributes

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

Detailed Description

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

Array of tensors:

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

Definition at line 930 of file Cartesian2d.h.

Constructor & Destructor Documentation

◆ Array()

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

Constructor.

Parameters
shapeThe shape of the array (or scalars).

Definition at line 946 of file Cartesian2d.h.

Member Function Documentation

◆ I2()

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

Array of Cartesian2d::I2()

Returns
[shape(), 2, 2]

Definition at line 1006 of file Cartesian2d.h.

◆ I4()

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

Array of Cartesian2d::I4()

Returns
[shape(), 2, 2, 2, 2]

Definition at line 1040 of file Cartesian2d.h.

◆ I4d()

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

Array of Cartesian2d::I4d()

Returns
[shape(), 2, 2, 2, 2]

Definition at line 1091 of file Cartesian2d.h.

◆ I4rt()

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

Array of Cartesian2d::I4rt()

Returns
[shape(), 2, 2, 2, 2]

Definition at line 1057 of file Cartesian2d.h.

◆ I4s()

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

Array of Cartesian2d::I4s()

Returns
[shape(), 2, 2, 2, 2]

Definition at line 1074 of file Cartesian2d.h.

◆ II()

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

Array of Cartesian2d::II()

Returns
[shape(), 2, 2, 2, 2]

Definition at line 1023 of file Cartesian2d.h.

◆ init()

template<size_t N>
void GMatTensor::Cartesian2d::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 1109 of file Cartesian2d.h.

◆ O2()

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

Array of Cartesian2d::O2()

Returns
[shape(), 2, 2]

Definition at line 986 of file Cartesian2d.h.

◆ O4()

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

Array of Cartesian2d::O4()

Returns
[shape(), 2, 2, 2, 2]

Definition at line 996 of file Cartesian2d.h.

◆ shape()

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

Shape of the array (of scalars).

Returns
List of size rank.

Definition at line 956 of file Cartesian2d.h.

◆ shape_tensor2()

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

Shape of the array of second-order tensors.

Returns
List of size rank + 2.

Definition at line 966 of file Cartesian2d.h.

◆ shape_tensor4()

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

Shape of the array of fourth-order tensors.

Returns
List of size rank + 4.

Definition at line 976 of file Cartesian2d.h.

Member Data Documentation

◆ m_ndim

template<size_t N>
constexpr size_t GMatTensor::Cartesian2d::Array< N >::m_ndim = 2
staticconstexprprotected

Number of dimensions of tensors.

Definition at line 1121 of file Cartesian2d.h.

◆ m_shape

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

Shape of the array (of scalars).

Definition at line 1133 of file Cartesian2d.h.

◆ m_shape_tensor2

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

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

Definition at line 1136 of file Cartesian2d.h.

◆ m_shape_tensor4

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

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

Definition at line 1139 of file Cartesian2d.h.

◆ m_size

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

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

Definition at line 1130 of file Cartesian2d.h.

◆ m_stride_tensor2

template<size_t N>
constexpr size_t GMatTensor::Cartesian2d::Array< N >::m_stride_tensor2 = 4
staticconstexprprotected

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

Definition at line 1124 of file Cartesian2d.h.

◆ m_stride_tensor4

template<size_t N>
constexpr size_t GMatTensor::Cartesian2d::Array< N >::m_stride_tensor4 = 16
staticconstexprprotected

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

Definition at line 1127 of file Cartesian2d.h.

◆ rank

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

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

Definition at line 935 of file Cartesian2d.h.


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