1 #ifndef DUNE_FEM_DOFITERATOR_HH 2 #define DUNE_FEM_DOFITERATOR_HH 19 template<
class DofImp,
class DofIteratorImp >
43 inline DofIteratorType &
operator= (
const DofIteratorType &other )
45 CHECK_AND_CALL_INTERFACE_IMPLEMENTATION(
asImp().
operator=( other ) );
55 CHECK_INTERFACE_IMPLEMENTATION( *
asImp() );
65 CHECK_INTERFACE_IMPLEMENTATION( *
asImp() );
71 CHECK_INTERFACE_IMPLEMENTATION(
asImp()[ n ] );
77 CHECK_INTERFACE_IMPLEMENTATION(
asImp()[ n ] );
89 CHECK_AND_CALL_INTERFACE_IMPLEMENTATON(
asImp().
operator++() );
99 inline bool operator== (
const DofIteratorType &other )
const 101 CHECK_INTERFACE_IMPLEMENTATION(
asImp().
operator==( other ) );
102 return asImp().operator==( other );
111 inline bool operator!= (
const DofIteratorType &other )
const 113 CHECK_INTERFACE_IMPLEMENTATION(
asImp().
operator!=( other ) );
114 return asImp().operator!=( other );
123 CHECK_INTERFACE_IMPLEMENTATION(
asImp().
index() );
124 return asImp().index();
130 CHECK_AND_CALL_INTERFACE_IMPLEMENTATION(
asImp().
reset() );
140 template<
class DofImp,
class DofIteratorImp >
161 DofIteratorType &it =
const_cast< DofIteratorType &
>(
asImp() );
163 for(
int i = 0; i < n; ++i )
171 for(
int i = 0; i < n; ++i )
183 inline bool operator!= (
const DofIteratorType &other )
const 185 return !
asImp().operator==( other );
191 DofIteratorType it(
asImp() );
195 for( ; it != *
this; ++it )
207 template<
class DofIteratorImp >
217 typedef typename WrappedDofIteratorType :: DofType
DofType;
224 WrappedDofIteratorType
it_;
238 inline const ThisType &
operator= (
const ThisType &other )
271 return (it_ == other.
it_);
277 return (it_ != other.
it_);
297 #endif // #ifndef DUNE_FEM_DOFITERATOR_HH DofImp DofType
type of the DoFs
Definition: dofiterator.hh:26
DofIteratorType & operator=(const DofIteratorType &other)
assign another DoF iterator to this one
Definition: dofiterator.hh:43
DofIteratorImp DofIteratorType
type of the implementation (Barton-Nackman)
Definition: dofiterator.hh:149
int index() const
get the global number of the current DoF
Definition: dofiterator.hh:256
Definition: dofiterator.hh:208
ConstDofIteratorDefault(const WrappedDofIteratorType &it)
Definition: dofiterator.hh:227
DofIteratorImp WrappedDofIteratorType
type of the wrapped DoF iterator
Definition: dofiterator.hh:214
DofIteratorImp DofIteratorType
type of the implementation (Barton-Nackman)
Definition: dofiterator.hh:29
const Implementation & asImp() const
Definition: bartonnackmaninterface.hh:37
bool operator==(const DofIteratorType &other) const
check for equality
Definition: dofiterator.hh:99
int index() const
Definition: dofiterator.hh:189
WrappedDofIteratorType::DofType DofType
type of the DoFs
Definition: dofiterator.hh:217
WrappedDofIteratorType it_
Definition: dofiterator.hh:224
interface for DoF iterators of discrete functions
Definition: dofiterator.hh:20
void reset()
reset iterator to the first position
Definition: dofiterator.hh:128
Definition: coordinate.hh:4
const DofType * vector() const
Definition: dofiterator.hh:287
ConstDofIteratorDefault< WrappedDofIteratorType > ThisType
Definition: dofiterator.hh:220
int index() const
get the global number of the current DoF
Definition: dofiterator.hh:121
DofIteratorType & operator++()
increment the iterator
Definition: dofiterator.hh:87
DofImp DofType
type of the DoFs
Definition: dofiterator.hh:146
void reset()
reset iterator to the first position
Definition: dofiterator.hh:281
void reset()
Definition: combinedfunction/combinedfunction.hh:494
default implementation of DofManagerInterface
Definition: dofiterator.hh:141
bool operator!=(const DofIteratorType &other) const
check for inequality
Definition: dofiterator.hh:111
DofType & operator*()
obtain reference to current DoF
Definition: dofiterator.hh:53
ConstDofIteratorDefault(const ThisType &other)
Definition: dofiterator.hh:232
const DofImp & operator[](const int n) const
Definition: dofiterator.hh:69
DofIteratorDefault< DofType, ThisType > BaseType
Definition: dofiterator.hh:221
Definition: bartonnackmaninterface.hh:15