internal::SymmetricTensorAccessors::Accessor< rank, dim, constness, P > Class Template Reference

List of all members.

Public Types

typedef AccessorTypes< rank,
dim, constness >::reference 
reference
typedef AccessorTypes< rank,
dim, constness >::tensor_type 
tensor_type

Public Member Functions

Accessor< rank, dim, constness,
P-1 > 
operator[] (const unsigned int i)

Private Member Functions

 Accessor (tensor_type &tensor, const TableIndices< rank > &previous_indices)
 Accessor ()
 Accessor (const Accessor &a)

Private Attributes

tensor_typetensor
const TableIndices< rank > previous_indices

Friends

class SymmetricTensor
class Accessor
class ::::SymmetricTensor< rank, dim >
class Accessor< rank, dim, constness, P+1 >

template<int rank, int dim, bool constness, int P>
class internal::SymmetricTensorAccessors::Accessor< rank, dim, constness, P >


Member Typedef Documentation

template<int rank, int dim, bool constness, int P>
typedef AccessorTypes<rank,dim,constness>::reference internal::SymmetricTensorAccessors::Accessor< rank, dim, constness, P >::reference

Import two typedefs from the switch class above.

template<int rank, int dim, bool constness, int P>
typedef AccessorTypes<rank,dim,constness>::tensor_type internal::SymmetricTensorAccessors::Accessor< rank, dim, constness, P >::tensor_type

Constructor & Destructor Documentation

template<int rank, int dim, bool constness, int P>
internal::SymmetricTensorAccessors::Accessor< rank, dim, constness, P >::Accessor ( tensor_type tensor,
const TableIndices< rank > &  previous_indices 
) [private]

Constructor. Take a reference to the tensor object which we will access.

The second argument denotes the values of previous indices into the tensor. For example, for a rank-4 tensor, if P=2, then we will already have had two successive element selections (e.g. through tensor[1][2]), and the two index values have to be stored somewhere. This class therefore only makes use of the first rank-P elements of this array, but passes it on to the next level with P-1 which fills the next entry, and so on.

The constructor is made private in order to prevent you having such objects around. The only way to create such objects is via the Table class, which only generates them as temporary objects. This guarantees that the accessor objects go out of scope earlier than the mother object, avoid problems with data consistency.

template<int rank, int dim, bool constness, int P>
internal::SymmetricTensorAccessors::Accessor< rank, dim, constness, P >::Accessor (  )  [private]

Default constructor. Not needed, and invisible, so private.

template<int rank, int dim, bool constness, int P>
internal::SymmetricTensorAccessors::Accessor< rank, dim, constness, P >::Accessor ( const Accessor< rank, dim, constness, P > &  a  )  [private]

Copy constructor. Not needed, and invisible, so private.


Member Function Documentation

template<int rank, int dim, bool constness, int P>
Accessor<rank,dim,constness,P-1> internal::SymmetricTensorAccessors::Accessor< rank, dim, constness, P >::operator[] ( const unsigned int  i  ) 

Index operator.


Friends And Related Function Documentation

template<int rank, int dim, bool constness, int P>
friend class SymmetricTensor [friend]
template<int rank, int dim, bool constness, int P>
friend class Accessor [friend]
template<int rank, int dim, bool constness, int P>
friend class ::::SymmetricTensor< rank, dim > [friend]
template<int rank, int dim, bool constness, int P>
friend class Accessor< rank, dim, constness, P+1 > [friend]

Member Data Documentation

template<int rank, int dim, bool constness, int P>
tensor_type& internal::SymmetricTensorAccessors::Accessor< rank, dim, constness, P >::tensor [private]

Store the data given to the constructor.

template<int rank, int dim, bool constness, int P>
const TableIndices<rank> internal::SymmetricTensorAccessors::Accessor< rank, dim, constness, P >::previous_indices [private]

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

deal.II documentation generated on Mon Nov 23 22:58:24 2009 by doxygen 1.6.1