Chaste Release::3.1
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 >:

List of all members.

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 53 of file FourthOrderTensor.hpp.


Constructor & Destructor Documentation

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

Constructor.

Definition at line 155 of file FourthOrderTensor.hpp.


Member Function Documentation

template<unsigned DIM1, unsigned DIM2, unsigned DIM3, unsigned DIM4>
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

Parameters:
Mfirst index
Nsecond index
Pthird index
Qfourth index

Definition at line 65 of file FourthOrderTensor.hpp.

template<unsigned DIM1, unsigned DIM2, unsigned DIM3, unsigned DIM4>
double & FourthOrderTensor< DIM1, DIM2, DIM3, DIM4 >::operator() ( unsigned  M,
unsigned  N,
unsigned  P,
unsigned  Q 
)

Access the MNPQ-component of the tensor.

Parameters:
Mfirst index
Nsecond index
Pthird index
Qfourth index

Definition at line 343 of file FourthOrderTensor.hpp.

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 163 of file FourthOrderTensor.hpp.

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

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 299 of file FourthOrderTensor.hpp.

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

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 206 of file FourthOrderTensor.hpp.

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

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 252 of file FourthOrderTensor.hpp.

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

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

Member Data Documentation

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 57 of file FourthOrderTensor.hpp.


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