Public Member Functions | Private Attributes | List of all members
oomph::FixedSizeRankFourTensor< T, N1, N2, N3, N4 > Class Template Reference

Class for fixed-size rank-four tensor storing N1 x N2 x N3 x N4 objects of type T. More...

#include <fixed_size_vector.h>

Public Member Functions

 FixedSizeRankFourTensor ()
 Default constructor.
 
 FixedSizeRankFourTensor (const T &value)
 Constructor with initialisation.
 
void fill (const T &value)
 Fill all entries with specified value.
 
T & operator() (const unsigned &i, const unsigned &j, const unsigned &k, const unsigned &l)
 Read/write access to (i,j,k,l)-th entry.
 
const T & operator() (const unsigned &i, const unsigned &j, const unsigned &k, const unsigned &l) const
 Read access to (i,j,k,l)-th entry.
 

Private Attributes

T Data [N1 *N2 *N3 *N4]
 Tensor data.
 

Detailed Description

template<class T, unsigned N1, unsigned N2, unsigned N3, unsigned N4>
class oomph::FixedSizeRankFourTensor< T, N1, N2, N3, N4 >

Class for fixed-size rank-four tensor storing N1 x N2 x N3 x N4 objects of type T.

Storage layout:

(0,0,0,0), (0,0,0,1), ... , (0,0,0,N4-1), (0,0,1,0), ... ... (N1-1,N2-1,N3-1,N4-1)

Definition at line 366 of file fixed_size_vector.h.

Constructor & Destructor Documentation

◆ FixedSizeRankFourTensor() [1/2]

template<class T , unsigned N1, unsigned N2, unsigned N3, unsigned N4>
oomph::FixedSizeRankFourTensor< T, N1, N2, N3, N4 >::FixedSizeRankFourTensor ( )
inline

Default constructor.

Definition at line 370 of file fixed_size_vector.h.

◆ FixedSizeRankFourTensor() [2/2]

template<class T , unsigned N1, unsigned N2, unsigned N3, unsigned N4>
oomph::FixedSizeRankFourTensor< T, N1, N2, N3, N4 >::FixedSizeRankFourTensor ( const T &  value)
inline

Constructor with initialisation.

Definition at line 373 of file fixed_size_vector.h.

References oomph::FixedSizeRankFourTensor< T, N1, N2, N3, N4 >::fill().

Member Function Documentation

◆ fill()

template<class T , unsigned N1, unsigned N2, unsigned N3, unsigned N4>
void oomph::FixedSizeRankFourTensor< T, N1, N2, N3, N4 >::fill ( const T &  value)
inline

Fill all entries with specified value.

Definition at line 379 of file fixed_size_vector.h.

References i.

Referenced by oomph::FixedSizeRankFourTensor< T, N1, N2, N3, N4 >::FixedSizeRankFourTensor().

◆ operator()() [1/2]

template<class T , unsigned N1, unsigned N2, unsigned N3, unsigned N4>
T & oomph::FixedSizeRankFourTensor< T, N1, N2, N3, N4 >::operator() ( const unsigned &  i,
const unsigned &  j,
const unsigned &  k,
const unsigned &  l 
)
inline

Read/write access to (i,j,k,l)-th entry.

Definition at line 388 of file fixed_size_vector.h.

References i.

◆ operator()() [2/2]

template<class T , unsigned N1, unsigned N2, unsigned N3, unsigned N4>
const T & oomph::FixedSizeRankFourTensor< T, N1, N2, N3, N4 >::operator() ( const unsigned &  i,
const unsigned &  j,
const unsigned &  k,
const unsigned &  l 
) const
inline

Read access to (i,j,k,l)-th entry.

Definition at line 413 of file fixed_size_vector.h.

References i.

Member Data Documentation

◆ Data

template<class T , unsigned N1, unsigned N2, unsigned N3, unsigned N4>
T oomph::FixedSizeRankFourTensor< T, N1, N2, N3, N4 >::Data[N1 *N2 *N3 *N4]
private

Tensor data.

Definition at line 439 of file fixed_size_vector.h.


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