FourthOrderTensor< DIM1, DIM2, DIM3, DIM4 > Class Template Reference

#include <FourthOrderTensor.hpp>

Collaboration diagram for FourthOrderTensor< DIM1, DIM2, DIM3, DIM4 >:
Collaboration graph
[legend]

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


Constructor & Destructor Documentation

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

Constructor.

Definition at line 148 of file FourthOrderTensor.hpp.

References FourthOrderTensor< DIM1, DIM2, DIM3, DIM4 >::mData.


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:
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()().

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

Access the MNPQ-component of the tensor.

Parameters:
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.

template<unsigned DIM1, unsigned DIM2, unsigned DIM3, unsigned DIM4>
std::vector<double>& FourthOrderTensor< DIM1, DIM2, DIM3, DIM4 >::rGetData (  )  [inline]
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 
) [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}

Parameters:
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().

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 
) [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}

Parameters:
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().

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 
) [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}

Parameters:
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().

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 
) [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}

Parameters:
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().

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

Member Data Documentation

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

The documentation for this class was generated from the following file:
Generated on Thu Dec 22 13:05:23 2011 for Chaste by  doxygen 1.6.3