Public Types | Public Member Functions | Private Member Functions | Private Attributes | Friends

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

List of all members.

Public Types

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

Public Member Functions

Accessor< rank, dim, constness,
P-1, Number > 
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, Number >
class Accessor< rank, dim, constness, P+1, Number >

Detailed Description

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

Definition at line 323 of file symmetric_tensor.h.


Member Typedef Documentation

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

Import two typedefs from the switch class above.

Definition at line 330 of file symmetric_tensor.h.

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

Definition at line 331 of file symmetric_tensor.h.


Constructor & Destructor Documentation

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

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

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

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

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


Member Function Documentation

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

Index operator.


Friends And Related Function Documentation

template<int rank, int dim, bool constness, int P, typename Number >
friend class SymmetricTensor [friend]

Definition at line 411 of file symmetric_tensor.h.

template<int rank, int dim, bool constness, int P, typename Number >
friend class Accessor [friend]

Definition at line 413 of file symmetric_tensor.h.

template<int rank, int dim, bool constness, int P, typename Number >
friend class ::SymmetricTensor< rank, dim, Number > [friend]

Definition at line 415 of file symmetric_tensor.h.

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

Definition at line 416 of file symmetric_tensor.h.


Member Data Documentation

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

Store the data given to the constructor.

Definition at line 403 of file symmetric_tensor.h.

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

Definition at line 404 of file symmetric_tensor.h.


The documentation for this class was generated from the following file:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines

deal.II documentation generated on Fri Feb 3 2012 06:04:14 by doxygen 1.7.2