#include <FourthOrderTensor.hpp>
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) |
double & | operator() (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< double > | mData |
A class of fourth order tensors (i.e. tensors with four indices), over arbitrary dimension.
Definition at line 46 of file FourthOrderTensor.hpp.
FourthOrderTensor< DIM1, DIM2, DIM3, DIM4 >::FourthOrderTensor | ( | ) | [inline] |
Constructor.
Definition at line 148 of file FourthOrderTensor.hpp.
References FourthOrderTensor< DIM1, DIM2, DIM3, DIM4 >::mData.
unsigned FourthOrderTensor< DIM1, DIM2, DIM3, DIM4 >::GetVectorIndex | ( | unsigned | M, | |
unsigned | N, | |||
unsigned | P, | |||
unsigned | Q | |||
) | [inline, private] |
Get the index into the mData vector corresponding to this set of indices
M | first index | |
N | second index | |
P | third index | |
Q | fourth index |
Definition at line 58 of file FourthOrderTensor.hpp.
Referenced by FourthOrderTensor< DIM1, DIM2, DIM3, DIM4 >::operator()().
double & FourthOrderTensor< DIM1, DIM2, DIM3, DIM4 >::operator() | ( | unsigned | M, | |
unsigned | N, | |||
unsigned | P, | |||
unsigned | Q | |||
) | [inline] |
Access the MNPQ-component of the tensor.
M | first index | |
N | second index | |
P | third index | |
Q | fourth index |
Definition at line 336 of file FourthOrderTensor.hpp.
References FourthOrderTensor< DIM1, DIM2, DIM3, DIM4 >::GetVectorIndex(), and FourthOrderTensor< DIM1, DIM2, DIM3, DIM4 >::mData.
std::vector<double>& FourthOrderTensor< DIM1, DIM2, DIM3, DIM4 >::rGetData | ( | ) | [inline] |
Get a reference to the internal data of the tensor.
Definition at line 137 of file FourthOrderTensor.hpp.
Referenced by FourthOrderTensor< DIM1, DIM2, DIM3, DIM4 >::SetAsContractionOnFirstDimension(), FourthOrderTensor< DIM1, DIM2, DIM3, DIM4 >::SetAsContractionOnFourthDimension(), FourthOrderTensor< DIM1, DIM2, DIM3, DIM4 >::SetAsContractionOnSecondDimension(), and FourthOrderTensor< DIM1, DIM2, DIM3, DIM4 >::SetAsContractionOnThirdDimension().
void FourthOrderTensor< DIM1, DIM2, DIM3, DIM4 >::SetAsContractionOnFirstDimension | ( | const c_matrix< double, DIM1, CONTRACTED_DIM > & | rMatrix, | |
FourthOrderTensor< CONTRACTED_DIM, DIM2, DIM3, DIM4 > & | rTensor | |||
) | [inline] |
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}
rMatrix | A matrix | |
rTensor | A fourth order tensor |
Definition at line 156 of file FourthOrderTensor.hpp.
References FourthOrderTensor< DIM1, DIM2, DIM3, DIM4 >::mData, FourthOrderTensor< DIM1, DIM2, DIM3, DIM4 >::rGetData(), and FourthOrderTensor< DIM1, DIM2, DIM3, DIM4 >::Zero().
void FourthOrderTensor< DIM1, DIM2, DIM3, DIM4 >::SetAsContractionOnFourthDimension | ( | const c_matrix< double, DIM4, CONTRACTED_DIM > & | rMatrix, | |
FourthOrderTensor< DIM1, DIM2, DIM3, CONTRACTED_DIM > & | rTensor | |||
) | [inline] |
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}
rMatrix | A matrix | |
rTensor | A fourth order tensor |
Definition at line 292 of file FourthOrderTensor.hpp.
References FourthOrderTensor< DIM1, DIM2, DIM3, DIM4 >::mData, FourthOrderTensor< DIM1, DIM2, DIM3, DIM4 >::rGetData(), and FourthOrderTensor< DIM1, DIM2, DIM3, DIM4 >::Zero().
void FourthOrderTensor< DIM1, DIM2, DIM3, DIM4 >::SetAsContractionOnSecondDimension | ( | const c_matrix< double, DIM2, CONTRACTED_DIM > & | rMatrix, | |
FourthOrderTensor< DIM1, CONTRACTED_DIM, DIM3, DIM4 > & | rTensor | |||
) | [inline] |
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}
rMatrix | A matrix | |
rTensor | A fourth order tensor |
Definition at line 199 of file FourthOrderTensor.hpp.
References FourthOrderTensor< DIM1, DIM2, DIM3, DIM4 >::mData, FourthOrderTensor< DIM1, DIM2, DIM3, DIM4 >::rGetData(), and FourthOrderTensor< DIM1, DIM2, DIM3, DIM4 >::Zero().
void FourthOrderTensor< DIM1, DIM2, DIM3, DIM4 >::SetAsContractionOnThirdDimension | ( | const c_matrix< double, DIM3, CONTRACTED_DIM > & | rMatrix, | |
FourthOrderTensor< DIM1, DIM2, CONTRACTED_DIM, DIM4 > & | rTensor | |||
) | [inline] |
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}
rMatrix | A matrix | |
rTensor | A fourth order tensor |
Definition at line 245 of file FourthOrderTensor.hpp.
References FourthOrderTensor< DIM1, DIM2, DIM3, DIM4 >::mData, FourthOrderTensor< DIM1, DIM2, DIM3, DIM4 >::rGetData(), and FourthOrderTensor< DIM1, DIM2, DIM3, DIM4 >::Zero().
void FourthOrderTensor< DIM1, DIM2, DIM3, DIM4 >::Zero | ( | ) | [inline] |
Set all components of the tensor to zero.
Definition at line 347 of file FourthOrderTensor.hpp.
References FourthOrderTensor< DIM1, DIM2, DIM3, DIM4 >::mData.
Referenced by SchmidCostaExponentialLaw2d::ComputeStressAndStressDerivative(), CompressibleExponentialLaw< DIM >::ComputeStressAndStressDerivative(), FourthOrderTensor< DIM1, DIM2, DIM3, DIM4 >::SetAsContractionOnFirstDimension(), FourthOrderTensor< DIM1, DIM2, DIM3, DIM4 >::SetAsContractionOnFourthDimension(), FourthOrderTensor< DIM1, DIM2, DIM3, DIM4 >::SetAsContractionOnSecondDimension(), and FourthOrderTensor< DIM1, DIM2, DIM3, DIM4 >::SetAsContractionOnThirdDimension().
std::vector<double> FourthOrderTensor< DIM1, DIM2, DIM3, DIM4 >::mData [private] |
The components of the tensor.
Definition at line 50 of file FourthOrderTensor.hpp.
Referenced by FourthOrderTensor< DIM1, DIM2, DIM3, DIM4 >::FourthOrderTensor(), FourthOrderTensor< DIM1, DIM2, DIM3, DIM4 >::operator()(), FourthOrderTensor< DIM, DIM, DIM, DIM >::rGetData(), FourthOrderTensor< DIM1, DIM2, DIM3, DIM4 >::SetAsContractionOnFirstDimension(), FourthOrderTensor< DIM1, DIM2, DIM3, DIM4 >::SetAsContractionOnFourthDimension(), FourthOrderTensor< DIM1, DIM2, DIM3, DIM4 >::SetAsContractionOnSecondDimension(), FourthOrderTensor< DIM1, DIM2, DIM3, DIM4 >::SetAsContractionOnThirdDimension(), and FourthOrderTensor< DIM1, DIM2, DIM3, DIM4 >::Zero().