Chaste Commit::f2ff7ee04e70ac9d06c57344df8d017dbb12b97b
FourthOrderTensor< DIM1, DIM2, DIM3, DIM4 > Class Template Reference

#include <FourthOrderTensor.hpp>

+ Inheritance diagram for FourthOrderTensor< DIM1, DIM2, DIM3, DIM4 >:
+ Collaboration diagram for FourthOrderTensor< DIM1, DIM2, DIM3, DIM4 >:

Public Member Functions

 FourthOrderTensor ()
 
template<unsigned CONTRACTED_DIM>
void SetAsContractionOnFirstDimension (const c_matrix< double, DIM1, CONTRACTED_DIM > &rMatrix, FourthOrderTensor< CONTRACTED_DIM, DIM2, DIM3, DIM4 > &rTensor)
 
template<unsigned CONTRACTED_DIM>
void SetAsContractionOnSecondDimension (const c_matrix< double, DIM2, CONTRACTED_DIM > &rMatrix, FourthOrderTensor< DIM1, CONTRACTED_DIM, DIM3, DIM4 > &rTensor)
 
template<unsigned CONTRACTED_DIM>
void SetAsContractionOnThirdDimension (const c_matrix< double, DIM3, CONTRACTED_DIM > &rMatrix, FourthOrderTensor< DIM1, DIM2, CONTRACTED_DIM, DIM4 > &rTensor)
 
template<unsigned CONTRACTED_DIM>
void SetAsContractionOnFourthDimension (const c_matrix< double, DIM4, CONTRACTED_DIM > &rMatrix, FourthOrderTensor< DIM1, DIM2, DIM3, CONTRACTED_DIM > &rTensor)
 
doubleoperator() (unsigned M, unsigned N, unsigned P, unsigned Q)
 
void Zero ()
 
std::vector< double > & rGetData ()
 

Private Member Functions

unsigned GetVectorIndex (unsigned M, unsigned N, unsigned P, unsigned Q)
 

Private Attributes

std::vector< doublemData
 

Detailed Description

template<unsigned DIM1, unsigned DIM2, unsigned DIM3, unsigned DIM4>
class FourthOrderTensor< DIM1, DIM2, DIM3, DIM4 >

FourthOrderTensor

A class of fourth order tensors (i.e. tensors with four indices), over arbitrary dimension.

Definition at line 51 of file FourthOrderTensor.hpp.

Constructor & Destructor Documentation

◆ FourthOrderTensor()

template<unsigned DIM1, unsigned DIM2, unsigned DIM3, unsigned DIM4>
FourthOrderTensor< DIM1, DIM2, DIM3, DIM4 >::FourthOrderTensor ( )

Constructor.

Definition at line 153 of file FourthOrderTensor.hpp.

Member Function Documentation

◆ GetVectorIndex()

template<unsigned DIM1, unsigned DIM2, unsigned DIM3, unsigned DIM4>
unsigned FourthOrderTensor< DIM1, DIM2, DIM3, DIM4 >::GetVectorIndex ( unsigned  M,
unsigned  N,
unsigned  P,
unsigned  Q 
)
inlineprivate
Returns
the index into the mData vector corresponding to this set of indices
Parameters
Mfirst index
Nsecond index
Pthird index
Qfourth index

Definition at line 63 of file FourthOrderTensor.hpp.

◆ operator()()

template<unsigned DIM1, unsigned DIM2, unsigned DIM3, unsigned DIM4>
double & FourthOrderTensor< DIM1, DIM2, DIM3, DIM4 >::operator() ( unsigned  M,
unsigned  N,
unsigned  P,
unsigned  Q 
)
Returns
the MNPQ-component of the tensor.
Parameters
Mfirst index
Nsecond index
Pthird index
Qfourth index

Definition at line 341 of file FourthOrderTensor.hpp.

◆ rGetData()

◆ SetAsContractionOnFirstDimension()

template<unsigned DIM1, unsigned DIM2, unsigned DIM3, unsigned DIM4>
template<unsigned CONTRACTED_DIM>
void FourthOrderTensor< DIM1, DIM2, DIM3, DIM4 >::SetAsContractionOnFirstDimension ( const c_matrix< double, DIM1, CONTRACTED_DIM > &  rMatrix,
FourthOrderTensor< CONTRACTED_DIM, DIM2, DIM3, DIM4 > &  rTensor 
)

Set to be the inner product of a matrix another fourth order tensor, contracting on first component, i.e. sets this tensor to be R, where R_{abcd} = X_{aN} T_{Nbcd}

Parameters
rMatrixA matrix
rTensorA fourth order tensor

Definition at line 161 of file FourthOrderTensor.hpp.

References FourthOrderTensor< DIM1, DIM2, DIM3, DIM4 >::rGetData().

◆ SetAsContractionOnFourthDimension()

template<unsigned DIM1, unsigned DIM2, unsigned DIM3, unsigned DIM4>
template<unsigned CONTRACTED_DIM>
void FourthOrderTensor< DIM1, DIM2, DIM3, DIM4 >::SetAsContractionOnFourthDimension ( const c_matrix< double, DIM4, CONTRACTED_DIM > &  rMatrix,
FourthOrderTensor< DIM1, DIM2, DIM3, CONTRACTED_DIM > &  rTensor 
)

Set to be the inner product of a matrix another fourth order tensor, contracting on fourth component, i.e. sets this tensor to be R, where R_{abcd} = X_{dN} T_{abcN}

Parameters
rMatrixA matrix
rTensorA fourth order tensor

Definition at line 297 of file FourthOrderTensor.hpp.

References FourthOrderTensor< DIM1, DIM2, DIM3, DIM4 >::rGetData().

◆ SetAsContractionOnSecondDimension()

template<unsigned DIM1, unsigned DIM2, unsigned DIM3, unsigned DIM4>
template<unsigned CONTRACTED_DIM>
void FourthOrderTensor< DIM1, DIM2, DIM3, DIM4 >::SetAsContractionOnSecondDimension ( const c_matrix< double, DIM2, CONTRACTED_DIM > &  rMatrix,
FourthOrderTensor< DIM1, CONTRACTED_DIM, DIM3, DIM4 > &  rTensor 
)

Set to be the inner product of a matrix another fourth order tensor, contracting on second component, i.e. sets this tensor to be R, where R_{abcd} = X_{bN} T_{aNcd}

Parameters
rMatrixA matrix
rTensorA fourth order tensor

Definition at line 204 of file FourthOrderTensor.hpp.

References FourthOrderTensor< DIM1, DIM2, DIM3, DIM4 >::rGetData().

◆ SetAsContractionOnThirdDimension()

template<unsigned DIM1, unsigned DIM2, unsigned DIM3, unsigned DIM4>
template<unsigned CONTRACTED_DIM>
void FourthOrderTensor< DIM1, DIM2, DIM3, DIM4 >::SetAsContractionOnThirdDimension ( const c_matrix< double, DIM3, CONTRACTED_DIM > &  rMatrix,
FourthOrderTensor< DIM1, DIM2, CONTRACTED_DIM, DIM4 > &  rTensor 
)

Set to be the inner product of a matrix another fourth order tensor, contracting on third component, i.e. sets this tensor to be R, where R_{abcd} = X_{cN} T_{abNd}

Parameters
rMatrixA matrix
rTensorA fourth order tensor

Definition at line 250 of file FourthOrderTensor.hpp.

References FourthOrderTensor< DIM1, DIM2, DIM3, DIM4 >::rGetData().

◆ Zero()

template<unsigned DIM1, unsigned DIM2, unsigned DIM3, unsigned DIM4>
void FourthOrderTensor< DIM1, DIM2, DIM3, DIM4 >::Zero ( )

Member Data Documentation

◆ mData

template<unsigned DIM1, unsigned DIM2, unsigned DIM3, unsigned DIM4>
std::vector<double> FourthOrderTensor< DIM1, DIM2, DIM3, DIM4 >::mData
private

The components of the tensor.

Definition at line 55 of file FourthOrderTensor.hpp.

Referenced by FourthOrderTensor< DIM1, DIM2, DIM3, DIM4 >::rGetData().


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