Electrowetting on dielectric
Public Member Functions | Protected Attributes | Related Functions
IteratorGroup< N, I > Class Template Reference
Collaboration diagram for IteratorGroup< N, I >:
Collaboration graph
[legend]

List of all members.

Public Member Functions

 IteratorGroup ()
 IteratorGroup (const IteratorGroup< N, I > &g)
void operator= (const IteratorGroup< N, I > &g)
 ~IteratorGroup ()
I & operator() (unsigned i)
const I & operator() (unsigned i) const

Protected Attributes

tt [N]
 The actual iterators.

Related Functions

(Note that these are not member functions.)

template<unsigned N, typename I >
bool operator< (const IteratorGroup< N, I > &a, const IteratorGroup< N, I > &b)
template<unsigned N, typename I >
std::size_t operator- (const IteratorGroup< N, I > &a, const IteratorGroup< N, I > &b)
template<unsigned N, typename I >
void advance (IteratorGroup< N, I > &t, const unsigned n)
template<unsigned N, typename I >
void advance_by_one (IteratorGroup< N, I > &t)
template<unsigned N, typename I >
IteratorGroup< N, I > operator+ (const IteratorGroup< N, I > &a, const std::size_t n)
template<unsigned N, typename I >
IteratorGroup< N, I > operator++ (IteratorGroup< N, I > &a)
template<unsigned N, typename I >
bool operator!= (const IteratorGroup< N, I > &a, const IteratorGroup< N, I > &b)

Detailed Description

template<unsigned N, typename I>
class IteratorGroup< N, I >

This class basically keeps a group of iterators in sync. Since there is no way to know on how many subproblems a given problem might depend on, then we need to have a way to keep all the cell iterators in sync. The deal.II library has a similar capability, namelty, the SynchronousIterators class template. However, it allows for a maximum of four (4) grouped iteratos. A way around this is to parametrize the class with the number of iterators.

Definition at line 15 of file GroupedIterators.h.


Constructor & Destructor Documentation

template<unsigned N, typename I >
IteratorGroup< N, I >::IteratorGroup ( )

Does nothing.

Definition at line 47 of file GroupedIterators.h.

template<unsigned N, typename I >
IteratorGroup< N, I >::IteratorGroup ( const IteratorGroup< N, I > &  g)

Copy the contents of each one of the iterators

Definition at line 49 of file GroupedIterators.h.

References IteratorGroup< N, I >::tt.

template<unsigned N, typename I >
IteratorGroup< N, I >::~IteratorGroup ( )

Does nothing

Definition at line 54 of file GroupedIterators.h.


Member Function Documentation

template<unsigned N, typename I >
void IteratorGroup< N, I >::operator= ( const IteratorGroup< N, I > &  g) [inline]

Copy operator

Definition at line 66 of file GroupedIterators.h.

References IteratorGroup< N, I >::tt.

template<unsigned N, typename I >
I & IteratorGroup< N, I >::operator() ( unsigned  i) [inline]

Access the content of the array of iterators

Definition at line 56 of file GroupedIterators.h.

References Assert, and ExcIndexRange().

template<unsigned N, typename I >
const I & IteratorGroup< N, I >::operator() ( unsigned  i) const [inline]

Access the content of the array of iterators as const

Definition at line 61 of file GroupedIterators.h.

References Assert, and ExcIndexRange().


Friends And Related Function Documentation

template<unsigned N, typename I >
bool operator< ( const IteratorGroup< N, I > &  a,
const IteratorGroup< N, I > &  b 
) [related]

Compares only the first iterators. After all they're supposed to be in sync all the time

Definition at line 74 of file GroupedIterators.h.

template<unsigned N, typename I >
std::size_t operator- ( const IteratorGroup< N, I > &  a,
const IteratorGroup< N, I > &  b 
) [related]

Returns the distance between two iterators

Definition at line 82 of file GroupedIterators.h.

References Assert, and ExcInternalError().

template<unsigned N, typename I >
void advance ( IteratorGroup< N, I > &  t,
const unsigned  n 
) [related]

advances all the iterators by n

Definition at line 92 of file GroupedIterators.h.

Referenced by IteratorGroup< N, I >::operator+().

template<unsigned N, typename I >
void advance_by_one ( IteratorGroup< N, I > &  t) [related]

advances all the iterators by one

Definition at line 100 of file GroupedIterators.h.

Referenced by IteratorGroup< N, I >::operator++().

template<unsigned N, typename I >
IteratorGroup< N, I > operator+ ( const IteratorGroup< N, I > &  a,
const std::size_t  n 
) [related]

maps to advance(a,n)

Definition at line 108 of file GroupedIterators.h.

References IteratorGroup< N, I >::advance().

template<unsigned N, typename I >
IteratorGroup< N, I > operator++ ( IteratorGroup< N, I > &  a) [related]

advances by one the argument

Definition at line 118 of file GroupedIterators.h.

References IteratorGroup< N, I >::advance_by_one().

template<unsigned N, typename I >
bool operator!= ( const IteratorGroup< N, I > &  a,
const IteratorGroup< N, I > &  b 
) [related]

comparison operator. Again, we only compare the first component

Definition at line 126 of file GroupedIterators.h.


Member Data Documentation

template<unsigned N, typename I>
I IteratorGroup< N, I >::tt[N] [protected]

The actual iterators.

Definition at line 44 of file GroupedIterators.h.

Referenced by IteratorGroup< N, I >::IteratorGroup(), and IteratorGroup< N, I >::operator=().


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