#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 49 of file FourthOrderTensor.hpp.
FourthOrderTensor< DIM1, DIM2, DIM3, DIM4 >::FourthOrderTensor | ( | ) | [inline] |
Constructor.
Definition at line 156 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 60 of file FourthOrderTensor.hpp.
Referenced by FourthOrderTensor< DIM1, DIM2, DIM3, DIM4 >::operator()().
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, ie. sets this tensor to be R, where R_{abcd} = X_{aN} T_{Nbcd}
rMatrix | A matrix | |
rTensor | A fourth order tensor |
Definition at line 164 of file FourthOrderTensor.hpp.
References FourthOrderTensor< DIM1, DIM2, DIM3, DIM4 >::mData, FourthOrderTensor< DIM1, DIM2, DIM3, DIM4 >::rGetData(), and FourthOrderTensor< DIM1, DIM2, DIM3, DIM4 >::Zero().
Referenced by SchmidCostaExponentialLaw2d::ComputeStressAndStressDerivative().
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, ie. sets this tensor to be R, where R_{abcd} = X_{bN} T_{aNcd}
rMatrix | A matrix | |
rTensor | A fourth order tensor |
Definition at line 206 of file FourthOrderTensor.hpp.
References FourthOrderTensor< DIM1, DIM2, DIM3, DIM4 >::mData, FourthOrderTensor< DIM1, DIM2, DIM3, DIM4 >::rGetData(), and FourthOrderTensor< DIM1, DIM2, DIM3, DIM4 >::Zero().
Referenced by SchmidCostaExponentialLaw2d::ComputeStressAndStressDerivative().
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, ie. sets this tensor to be R, where R_{abcd} = X_{cN} T_{abNd}
rMatrix | A matrix | |
rTensor | A fourth order tensor |
Definition at line 251 of file FourthOrderTensor.hpp.
References FourthOrderTensor< DIM1, DIM2, DIM3, DIM4 >::mData, FourthOrderTensor< DIM1, DIM2, DIM3, DIM4 >::rGetData(), and FourthOrderTensor< DIM1, DIM2, DIM3, DIM4 >::Zero().
Referenced by SchmidCostaExponentialLaw2d::ComputeStressAndStressDerivative().
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, ie. sets this tensor to be R, where R_{abcd} = X_{dN} T_{abcN}
rMatrix | A matrix | |
rTensor | A fourth order tensor |
Definition at line 297 of file FourthOrderTensor.hpp.
References FourthOrderTensor< DIM1, DIM2, DIM3, DIM4 >::mData, FourthOrderTensor< DIM1, DIM2, DIM3, DIM4 >::rGetData(), and FourthOrderTensor< DIM1, DIM2, DIM3, DIM4 >::Zero().
Referenced by SchmidCostaExponentialLaw2d::ComputeStressAndStressDerivative().
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 339 of file FourthOrderTensor.hpp.
References FourthOrderTensor< DIM1, DIM2, DIM3, DIM4 >::GetVectorIndex(), and FourthOrderTensor< DIM1, DIM2, DIM3, DIM4 >::mData.
void FourthOrderTensor< DIM1, DIM2, DIM3, DIM4 >::Zero | ( | ) | [inline] |
Set all components of the tensor to zero.
Definition at line 350 of file FourthOrderTensor.hpp.
References FourthOrderTensor< DIM1, DIM2, DIM3, DIM4 >::mData.
Referenced by SchmidCostaExponentialLaw2d::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 >::rGetData | ( | ) | [inline] |
Get a reference to the internal data of the tensor.
Definition at line 141 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().
std::vector<double> FourthOrderTensor< DIM1, DIM2, DIM3, DIM4 >::mData [private] |
The components of the tensor.
Definition at line 52 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().