TriaAccessor< dim, dim > Class Template Reference
[Grid classesAccessor classes of the mesh iterators]

List of all members.

Public Types

typedef void * LocalData

Public Member Functions

int level () const
int index () const
IteratorState::IteratorStates state () const
const Triangulation< dim > & get_triangulation () const

Protected Types

typedef void AccessorData

Protected Member Functions

 TriaAccessor (const Triangulation< dim > *parent=0, const int level=-1, const int index=-1, const AccessorData *=0)
void copy_from (const TriaAccessor &)
void operator= (const TriaAccessor *)
TriaAccessoroperator= (const TriaAccessor &)
bool operator== (const TriaAccessor &) const
bool operator!= (const TriaAccessor &) const

Protected Attributes

int present_level
int present_index
const Triangulation< dim > * tria

Static Private Attributes

static const unsigned int objectdim = dim

Friends

class TriaRawIterator
class TriaIterator
class TriaActiveIterator


Detailed Description

template<int dim>
class TriaAccessor< dim, dim >

A base class for the accessor classes used by TriaRawIterator and derived classes.

This class offers only the basic functionality required by the iterators (stores the necessary data members, offers comparison operators and the like), but has no functionality to actually dereference data. This is done in the derived classes.

This template is a partial specialization of the general template used for cells only, i.e. for the case where structdim (the dimensionality of the object represented, for example 1 for a line) equals dim (the dimensionality of the space the object lives in, for example 3 if we solve three-dimensional problems). The difference is that cells have a level in the triangulation hierarchy associated with them, whereas faces and edges do not.

Some internals of this class are discussed in Iterator and accessor internals .

Author:
Wolfgang Bangerth, 1998

Member Typedef Documentation

template<int dim>
typedef void TriaAccessor< dim, dim >::AccessorData [protected]

Declare the data type that this accessor class expects to get passed from the iterator classes. Since the pure triangulation iterators need no additional data, this data type is void.

template<int dim>
typedef void* TriaAccessor< dim, dim >::LocalData

Data type to be used for passing parameters from iterators to the accessor classes in a unified way, no matter what the type of number of these parameters is.


Constructor & Destructor Documentation

template<int dim>
TriaAccessor< dim, dim >::TriaAccessor ( const Triangulation< dim > *  parent = 0,
const int  level = -1,
const int  index = -1,
const AccessorData = 0 
) [protected]

Constructor. Protected, thus only callable from friend classes.


Member Function Documentation

template<int dim>
void TriaAccessor< dim, dim >::copy_from ( const TriaAccessor< dim, dim > &   )  [protected]

Copy operator. Since this is only called from iterators, do not return anything, since the iterator will return itself.

This method is protected, since it is only to be called from the iterator class.

template<int dim>
void TriaAccessor< dim, dim >::operator= ( const TriaAccessor< dim, dim > *   )  [protected]

Copy operator. This is normally used in a context like iterator a,b; *a=*b;. Since the meaning is to copy the object pointed to by b to the object pointed to by a and since accessors are not real but virtual objects, this operation is not useful for iterators on triangulations. We declare this function here private, thus it may not be used from outside. Furthermore it is not implemented and will give a linker error if used anyway.

template<int dim>
TriaAccessor& TriaAccessor< dim, dim >::operator= ( const TriaAccessor< dim, dim > &   )  [protected]

Same as above.

template<int dim>
bool TriaAccessor< dim, dim >::operator== ( const TriaAccessor< dim, dim > &   )  const [protected]

Compare for equality.

template<int dim>
bool TriaAccessor< dim, dim >::operator!= ( const TriaAccessor< dim, dim > &   )  const [protected]

Compare for inequality.

template<int dim>
int TriaAccessor< dim, dim >::level (  )  const

@ name Iterator address and state Return the level the element pointed to belongs to. This is only valid for cells.

template<int dim>
int TriaAccessor< dim, dim >::index (  )  const

Return the index of the element presently pointed to on the present level.

template<int dim>
IteratorState::IteratorStates TriaAccessor< dim, dim >::state (  )  const

Return the state of the iterator. For the different states an accessor can be in, refer to the TriaRawIterator documentation.

template<int dim>
const Triangulation<dim>& TriaAccessor< dim, dim >::get_triangulation (  )  const

Return a pointer to the triangulation which the object pointed to by this class belongs to.


Friends And Related Function Documentation

template<int dim>
friend class TriaRawIterator [friend]

template<int dim>
friend class TriaIterator [friend]

template<int dim>
friend class TriaActiveIterator [friend]


Member Data Documentation

template<int dim>
int TriaAccessor< dim, dim >::present_level [protected]

Used to store the level presently pointed to. For faces this should always be 0.

template<int dim>
int TriaAccessor< dim, dim >::present_index [protected]

Used to store the index of the element presently pointed to on the level presentl used.

template<int dim>
const Triangulation<dim>* TriaAccessor< dim, dim >::tria [protected]

Pointer to the triangulation which we act on.

template<int dim>
const unsigned int TriaAccessor< dim, dim >::objectdim = dim [static, private]

Dimension of the TriaObject this accessor gives access to.


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

deal.II documentation generated on Fri Nov 21 07:13:39 2008 by doxygen 1.5.6