
Public Types | |
| typedef void * | LocalData |
Public Member Functions | |
Iterator address and state | |
| int | level () const |
| int | index () const |
| IteratorState::IteratorStates | state () const |
| const Triangulation< dim, spacedim > & | get_triangulation () const |
Static Public Attributes | |
| static const unsigned int | space_dimension = spacedim |
| static const unsigned int | dimension = dim |
| static const unsigned int | structure_dimension = structdim |
Protected Types | |
| typedef void | AccessorData |
Protected Member Functions | |
| TriaAccessorBase (const Triangulation< dim, spacedim > *parent=0, const int level=-1, const int index=-1, const AccessorData *=0) | |
| TriaAccessorBase (const TriaAccessorBase &) | |
| void | copy_from (const TriaAccessorBase &) |
| TriaAccessorBase & | operator= (const TriaAccessorBase &) |
| void | operator= (const TriaAccessorBase *) |
| bool | operator== (const TriaAccessorBase &) const |
| bool | operator!= (const TriaAccessorBase &) const |
| internal::Triangulation::TriaObjects < internal::Triangulation::TriaObject < structdim > > & | objects () const |
Advancement of iterators | |
| void | operator++ () |
| void | operator-- () |
Protected Attributes | |
| internal::TriaAccessor::PresentLevelType < structdim, dim >::type | present_level |
| int | present_index |
| const Triangulation< dim, spacedim > * | tria |
Friends | |
| class | TriaRawIterator |
| class | TriaIterator |
| class | TriaActiveIterator |
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.
In the implementation, the behavior of this class differs between the cases where structdim==dim (cells of a mesh) and structdim<dim (faces and edges). For the latter, present_level is always equal to zero and the constructors may not receive a positive value there. For cells, any level is possible, but only those within the range of the levels of the Triangulation are reasonable. Furthermore, the function objects() returns either the container with all cells on the same level or the container with all objects of this dimension (structdim<dim).
Some internals of this class are discussed in Iterator and accessor internals .
Definition at line 261 of file tria_accessor.h.
typedef void TriaAccessorBase< structdim, dim, spacedim >::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.
Reimplemented in DoFAccessor< structdim, DH >, DoFCellAccessor< DH >, InvalidAccessor< structdim, dim, spacedim >, TriaAccessor< structdim, dim, spacedim >, CellAccessor< dim, spacedim >, MGDoFAccessor< structdim, dim, spacedim >, MGDoFAccessor< 0, 1, spacedim >, MGDoFCellAccessor< dim, spacedim >, DoFAccessor< DH::dimension, DH >, TriaAccessor< dim, dim, spacedim >, and MGDoFAccessor< dim, dim, spacedim >.
Definition at line 310 of file tria_accessor.h.
| typedef void* TriaAccessorBase< structdim, dim, spacedim >::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.
Definition at line 431 of file tria_accessor.h.
| TriaAccessorBase< structdim, dim, spacedim >::TriaAccessorBase | ( | const Triangulation< dim, spacedim > * | parent = 0, |
| const int | level = -1, |
||
| const int | index = -1, |
||
| const AccessorData * | = 0 |
||
| ) | [protected] |
Constructor. Protected, thus only callable from friend classes.
| TriaAccessorBase< structdim, dim, spacedim >::TriaAccessorBase | ( | const TriaAccessorBase< structdim, dim, spacedim > & | ) | [protected] |
Copy constructor. Creates an object with exactly the same data.
| void TriaAccessorBase< structdim, dim, spacedim >::copy_from | ( | const TriaAccessorBase< structdim, dim, spacedim > & | ) | [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.
| TriaAccessorBase& TriaAccessorBase< structdim, dim, spacedim >::operator= | ( | const TriaAccessorBase< structdim, dim, spacedim > & | ) | [protected] |
Copy operator. Creates an object with exactly the same data.
| void TriaAccessorBase< structdim, dim, spacedim >::operator= | ( | const TriaAccessorBase< structdim, dim, spacedim > * | ) | [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.
| bool TriaAccessorBase< structdim, dim, spacedim >::operator== | ( | const TriaAccessorBase< structdim, dim, spacedim > & | ) | const [protected] |
Compare for equality.
| bool TriaAccessorBase< structdim, dim, spacedim >::operator!= | ( | const TriaAccessorBase< structdim, dim, spacedim > & | ) | const [protected] |
Compare for inequality.
| void TriaAccessorBase< structdim, dim, spacedim >::operator++ | ( | ) | [protected] |
This operator advances the iterator to the next element.
For dim=1 only: The next element is next on this level if there are more. If the present element is the last on this level, the first on the next level is accessed.
| void TriaAccessorBase< structdim, dim, spacedim >::operator-- | ( | ) | [protected] |
This operator moves the iterator to the previous element.
For dim=1 only: The previous element is previous on this level if index>0. If the present element is the first on this level, the last on the previous level is accessed.
| internal::Triangulation::TriaObjects<internal::Triangulation::TriaObject<structdim> >& TriaAccessorBase< structdim, dim, spacedim >::objects | ( | ) | const [protected] |
Access to the other objects of a Triangulation with same dimension.
| int TriaAccessorBase< structdim, dim, spacedim >::level | ( | ) | const |
Return the level the element pointed to belongs to. This is only valid for cells.
| int TriaAccessorBase< structdim, dim, spacedim >::index | ( | ) | const |
Return the index of the element presently pointed to on the present level.
Note that these indices are not globally unique for cells (though they may be for faces or edges). Rather, a cell is identified by its refinement level and index within this refinement level, the latter piece of information being what this function returns. Consequently, there may be multiple cells on different refinement levels but with the same index within their level.
Similarly, the index returned by this function is not a contiguous set of numbers of each level: going from cell to cell, some of the indices in a level may be unused.
| IteratorState::IteratorStates TriaAccessorBase< structdim, dim, spacedim >::state | ( | ) | const |
Return the state of the iterator. For the different states an accessor can be in, refer to the TriaRawIterator documentation.
| const Triangulation<dim,spacedim>& TriaAccessorBase< structdim, dim, spacedim >::get_triangulation | ( | ) | const |
Return a pointer to the triangulation which the object pointed to by this class belongs to.
friend class TriaRawIterator [friend] |
Reimplemented in DoFAccessor< structdim, DH >, and DoFAccessor< DH::dimension, DH >.
Definition at line 517 of file tria_accessor.h.
friend class TriaIterator [friend] |
Definition at line 518 of file tria_accessor.h.
friend class TriaActiveIterator [friend] |
Definition at line 519 of file tria_accessor.h.
const unsigned int TriaAccessorBase< structdim, dim, spacedim >::space_dimension = spacedim [static] |
Dimension of the space the object represented by this accessor lives in. For example, if this accessor represents a quad that is part of a two-dimensional surface in four-dimensional space, then this value is four.
Reimplemented in DoFAccessor< structdim, DH >, and DoFAccessor< DH::dimension, DH >.
Definition at line 275 of file tria_accessor.h.
const unsigned int TriaAccessorBase< structdim, dim, spacedim >::dimension = dim [static] |
Dimensionality of the object that the thing represented by this accessopr is part of. For example, if this accessor represents a line that is part of a hexahedron, then this value will be three.
Reimplemented in DoFAccessor< structdim, DH >, and DoFAccessor< DH::dimension, DH >.
Definition at line 286 of file tria_accessor.h.
const unsigned int TriaAccessorBase< structdim, dim, spacedim >::structure_dimension = structdim [static] |
Dimensionality of the current object represented by this accessor. For example, if it is line (irrespective of whether it is part of a quad or hex, and what dimension we are in), then this value equals 1.
Definition at line 298 of file tria_accessor.h.
internal::TriaAccessor::PresentLevelType<structdim,dim>::type TriaAccessorBase< structdim, dim, spacedim >::present_level [protected] |
The level if this is a cell (structdim==dim). Else, contains zero.
Definition at line 499 of file tria_accessor.h.
int TriaAccessorBase< structdim, dim, spacedim >::present_index [protected] |
Used to store the index of the element presently pointed to on the level presentl used.
Definition at line 507 of file tria_accessor.h.
const Triangulation<dim,spacedim>* TriaAccessorBase< structdim, dim, spacedim >::tria [protected] |
Pointer to the triangulation which we act on.
Definition at line 513 of file tria_accessor.h.
documentation generated on Fri Feb 3 2012 06:04:12 by
doxygen
1.7.2