BELFEM 0.9.0
Berkeley Lab Finite Element Framework
Loading...
Searching...
No Matches
belfem::Tensor< T > Class Template Reference

Third- or fourth-order tensor container; the constitutive helpers (contraction, rotation, inversion, Voigt conversion) are specialised to 3x3x3x3. More...

#include <cl_Tensor.hpp>

Public Member Functions

 Tensor (const index_t aSizeI, const index_t aSizeJ, const index_t aSizeK, const index_t aSizeL)
 Tensor (const index_t aSizeI, const index_t aSizeJ, const index_t aSizeK)
 Tensor (const index_t aSizeI, const index_t aSizeJ, const index_t aSizeK, const index_t aSizeL, const real aValue)
 Tensor (const Matrix< real > &aElasticityMatrix)
 Tensor (const Tensor< T > &aOther)
 Tensor (Tensor< T > &&aOther)
 ~Tensor ()
index_t size_i () const
index_t size_j () const
index_t size_k () const
index_t size_l () const
index_t order () const
T * data ()
 expose the underlying raw pointer
const T * data () const
 expose the underlying raw pointer ( const version )
void fill (const T aValue)
 fill all values
void fill (const T aA, const T aB)
 fill tensor in an isotropic way
void fill_isotropic_elasticity (const T E, const T nu)
 special funcition to create an isotropic elasticity tensor
void fill_orthotropic_elasticity (const T aYoung1, const T aYoung2, const T aYoung3, const T aPoisson23, const T aPoisson13, const T aPoisson12, const T aShear23, const T aShear13, const T aShear12)
index_t capacity () const
 memory size
bool is_3333 () const
 returns true if this is a 3x3x3x3 tensor
void print (const string aLabel="Tensor")
T & operator() (const index_t I, const index_t J, const index_t K)
 access operator ( writable version )
const T & operator() (const index_t I, const index_t J, const index_t K) const
 access operator ( const version )
T & operator() (const index_t I, const index_t J, const index_t K, const index_t L)
 access operator ( writable version )
const T & operator() (const index_t I, const index_t J, const index_t K, const index_t L) const
 access operator ( const version )
Tensor< T > & operator= (const Tensor< T > &aTensor)
 copy assignment
Tensor< T > & operator= (Tensor< T > &&aTensor)
 move assignment
Tensor< T > & operator= (const T &aScalar)
Tensor< T > & operator= (const Matrix< T > &aElasticityMatrix)
Tensor< T > & operator+= (const T &aScalar)
Tensor< T > & operator+= (const Tensor< T > &aTensor)
Tensor< T > & operator-= (const T &aScalar)
Tensor< T > & operator-= (const Tensor< T > &aTensor)
Tensor< T > & operator*= (const T &aScalar)
Tensor< T > & operator/= (const T &aScalar)
void ddot (const Tensor< T > &aB, Tensor< T > &aC)
 contract with other tensor
void ddot (const Matrix< T > &aB, Matrix< T > &aC)
 contract with 3x3 matrox
void to_matrix (Matrix< real > &aMatrix)
 converts a tensor to the elastitity matrix in Voigt notation

Detailed Description

template<typename T>
class belfem::Tensor< T >

Third- or fourth-order tensor container; the constitutive helpers (contraction, rotation, inversion, Voigt conversion) are specialised to 3x3x3x3.

See also
Fourth-Order Tensor Usage Guide

Constructor & Destructor Documentation

◆ Tensor() [1/6]

template<typename T>
belfem::Tensor< T >::Tensor ( const index_t aSizeI,
const index_t aSizeJ,
const index_t aSizeK,
const index_t aSizeL )
inline

◆ Tensor() [2/6]

template<typename T>
belfem::Tensor< T >::Tensor ( const index_t aSizeI,
const index_t aSizeJ,
const index_t aSizeK )
inline

◆ Tensor() [3/6]

template<typename T>
belfem::Tensor< T >::Tensor ( const index_t aSizeI,
const index_t aSizeJ,
const index_t aSizeK,
const index_t aSizeL,
const real aValue )
inline

◆ Tensor() [4/6]

template<typename T>
belfem::Tensor< T >::Tensor ( const Matrix< real > & aElasticityMatrix)
inline

◆ Tensor() [5/6]

template<typename T>
belfem::Tensor< T >::Tensor ( const Tensor< T > & aOther)
inline

◆ Tensor() [6/6]

template<typename T>
belfem::Tensor< T >::Tensor ( Tensor< T > && aOther)
inline

◆ ~Tensor()

template<typename T>
belfem::Tensor< T >::~Tensor ( )
inline

Member Function Documentation

◆ capacity()

template<typename T>
index_t belfem::Tensor< T >::capacity ( ) const
inline

memory size

◆ data() [1/2]

template<typename T>
T * belfem::Tensor< T >::data ( )
inline

expose the underlying raw pointer

◆ data() [2/2]

template<typename T>
const T * belfem::Tensor< T >::data ( ) const
inline

expose the underlying raw pointer ( const version )

◆ ddot() [1/2]

template<typename T>
void belfem::Tensor< T >::ddot ( const Matrix< T > & aB,
Matrix< T > & aC )
inline

contract with 3x3 matrox

Parameters
aB
aC

◆ ddot() [2/2]

template<typename T>
void belfem::Tensor< T >::ddot ( const Tensor< T > & aB,
Tensor< T > & aC )
inline

contract with other tensor

Parameters
aB
aC

◆ fill() [1/2]

template<typename T>
void belfem::Tensor< T >::fill ( const T aA,
const T aB )
inline

fill tensor in an isotropic way

◆ fill() [2/2]

template<typename T>
void belfem::Tensor< T >::fill ( const T aValue)
inline

fill all values

◆ fill_isotropic_elasticity()

template<typename T>
void belfem::Tensor< T >::fill_isotropic_elasticity ( const T E,
const T nu )
inline

special funcition to create an isotropic elasticity tensor

◆ fill_orthotropic_elasticity()

template<typename T>
void belfem::Tensor< T >::fill_orthotropic_elasticity ( const T aYoung1,
const T aYoung2,
const T aYoung3,
const T aPoisson23,
const T aPoisson13,
const T aPoisson12,
const T aShear23,
const T aShear13,
const T aShear12 )
inline

◆ is_3333()

template<typename T>
bool belfem::Tensor< T >::is_3333 ( ) const
inline

returns true if this is a 3x3x3x3 tensor

◆ operator()() [1/4]

template<typename T>
T & belfem::Tensor< T >::operator() ( const index_t I,
const index_t J,
const index_t K )
inline

access operator ( writable version )

◆ operator()() [2/4]

template<typename T>
const T & belfem::Tensor< T >::operator() ( const index_t I,
const index_t J,
const index_t K ) const
inline

access operator ( const version )

◆ operator()() [3/4]

template<typename T>
T & belfem::Tensor< T >::operator() ( const index_t I,
const index_t J,
const index_t K,
const index_t L )
inline

access operator ( writable version )

◆ operator()() [4/4]

template<typename T>
const T & belfem::Tensor< T >::operator() ( const index_t I,
const index_t J,
const index_t K,
const index_t L ) const
inline

access operator ( const version )

◆ operator*=()

template<typename T>
Tensor< T > & belfem::Tensor< T >::operator*= ( const T & aScalar)
inline

◆ operator+=() [1/2]

template<typename T>
Tensor< T > & belfem::Tensor< T >::operator+= ( const T & aScalar)
inline

◆ operator+=() [2/2]

template<typename T>
Tensor< T > & belfem::Tensor< T >::operator+= ( const Tensor< T > & aTensor)
inline

◆ operator-=() [1/2]

template<typename T>
Tensor< T > & belfem::Tensor< T >::operator-= ( const T & aScalar)
inline

◆ operator-=() [2/2]

template<typename T>
Tensor< T > & belfem::Tensor< T >::operator-= ( const Tensor< T > & aTensor)
inline

◆ operator/=()

template<typename T>
Tensor< T > & belfem::Tensor< T >::operator/= ( const T & aScalar)
inline

◆ operator=() [1/4]

template<typename T>
Tensor< T > & belfem::Tensor< T >::operator= ( const Matrix< T > & aElasticityMatrix)
inline

◆ operator=() [2/4]

template<typename T>
Tensor< T > & belfem::Tensor< T >::operator= ( const T & aScalar)
inline

◆ operator=() [3/4]

template<typename T>
Tensor< T > & belfem::Tensor< T >::operator= ( const Tensor< T > & aTensor)
inline

copy assignment

◆ operator=() [4/4]

template<typename T>
Tensor< T > & belfem::Tensor< T >::operator= ( Tensor< T > && aTensor)
inline

move assignment

◆ order()

template<typename T>
index_t belfem::Tensor< T >::order ( ) const
inline

◆ print()

template<typename T>
void belfem::Tensor< T >::print ( const string aLabel = "Tensor< T >")
inline

◆ size_i()

template<typename T>
index_t belfem::Tensor< T >::size_i ( ) const
inline

◆ size_j()

template<typename T>
index_t belfem::Tensor< T >::size_j ( ) const
inline

◆ size_k()

template<typename T>
index_t belfem::Tensor< T >::size_k ( ) const
inline

◆ size_l()

template<typename T>
index_t belfem::Tensor< T >::size_l ( ) const
inline

◆ to_matrix()

template<typename T>
void belfem::Tensor< T >::to_matrix ( Matrix< real > & aMatrix)
inline

converts a tensor to the elastitity matrix in Voigt notation

Parameters
aMatrix

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