Reference documentation for deal.II version 8.1.0
Public Types | Public Member Functions | Private Member Functions | Private Attributes | Friends | List of all members
internal::SymmetricTensorAccessors::Accessor< rank, dim, constness, 1, Number > Class Template Reference

Public Types

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

Public Member Functions

reference operator[] (const unsigned int)
 

Private Member Functions

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

Private Attributes

tensor_type & tensor
 
const TableIndices< rank > previous_indices
 

Friends

template<int , int , typename >
class SymmetricTensor
 
template<int , int , bool , int , typename >
class SymmetricTensorAccessors::Accessor
 
class ::SymmetricTensor< rank, dim, Number >
 
class SymmetricTensorAccessors::Accessor< rank, dim, constness, 2, Number >
 

Detailed Description

template<int rank, int dim, bool constness, typename Number>
class internal::SymmetricTensorAccessors::Accessor< rank, dim, constness, 1, Number >

Definition at line 437 of file symmetric_tensor.h.

Member Typedef Documentation

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

Import two typedefs from the switch class above.

Definition at line 444 of file symmetric_tensor.h.

Constructor & Destructor Documentation

template<int rank, int dim, bool constness, typename Number >
internal::SymmetricTensorAccessors::Accessor< rank, dim, constness, 1, Number >::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.

For this particular specialization, i.e. for P==1, all but the last index are already filled.

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, typename Number >
internal::SymmetricTensorAccessors::Accessor< rank, dim, constness, 1, Number >::Accessor ( )
private

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

template<int rank, int dim, bool constness, typename Number >
internal::SymmetricTensorAccessors::Accessor< rank, dim, constness, 1, Number >::Accessor ( const Accessor< rank, dim, constness, 1, Number > &  a)
private

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

Member Function Documentation

template<int rank, int dim, bool constness, typename Number >
reference internal::SymmetricTensorAccessors::Accessor< rank, dim, constness, 1, Number >::operator[] ( const unsigned  int)

Index operator.

Member Data Documentation

template<int rank, int dim, bool constness, typename Number >
tensor_type& internal::SymmetricTensorAccessors::Accessor< rank, dim, constness, 1, Number >::tensor
private

Store the data given to the constructor.

Definition at line 522 of file symmetric_tensor.h.


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