From 0015cd6703d59a49379570be535f89468b35e107 Mon Sep 17 00:00:00 2001 From: Adrian Burri <burriad@dune-project.org> Date: Thu, 8 Sep 2005 06:52:50 +0000 Subject: [PATCH] Removed unused DofIteratorAdapt [[Imported from SVN: r2796]] --- fem/dfadapt.hh | 77 ----------------------------------- fem/discfuncarray/dfadapt.cc | 79 ------------------------------------ 2 files changed, 156 deletions(-) diff --git a/fem/dfadapt.hh b/fem/dfadapt.hh index 140433014..6f9724b1f 100644 --- a/fem/dfadapt.hh +++ b/fem/dfadapt.hh @@ -306,83 +306,6 @@ namespace Dune { mutable bool init_; }; // end LocalFunctionAdapt - - //*********************************************************************** - // - // --DofIteratorAdapt - //! An iterator over the degrees of freedom of a discrete function - //! of type DFAdapt - // - //*********************************************************************** - template < class DofImp, class DofArrayType > - class DofIteratorAdapt : public - DofIteratorDefault < DofImp , DofIteratorAdapt < DofImp, DofArrayType > > - { - typedef DofIteratorAdapt<DofImp,DofArrayType> MyType; - public: - typedef DofImp DofType; - //! Default constructor - DofIteratorAdapt () : - dofArray_(0), - count_() {} - - //! Constructor (with const) - DofIteratorAdapt ( const DofArrayType & dofArray , int count ) - : dofArray_ ( const_cast<DofArrayType*>(&dofArray) ) , - count_ ( count ) {} - - //! Constructor (without const) - DofIteratorAdapt(DofArrayType& dofArray, int count) - : dofArray_(&dofArray), - count_(count) {} - - //! Copy constructor - DofIteratorAdapt(const DofIteratorAdapt<DofImp, DofArrayType>& other) : - dofArray_ (other.dofArray_), - count_ (other.count_) {} - - //! Assignment operator - DofIteratorAdapt<DofImp, DofArrayType>& - operator= (const DofIteratorAdapt<DofImp, DofArrayType>& other); - - //! return dof - DofType & operator *(); - - //! return dof read only - const DofType & operator * () const; - - //! go next dof - MyType & operator++ (); - - //! random access - DofType& operator[] (int i); - - //! random access read only - const DofType& operator [] (int i) const; - - //! compare - bool operator == (const MyType & I ) const; - - //! compare - bool operator != (const MyType & I ) const; - - //! return actual index - int index () const; - - //! set dof iterator back to begin , for const and not const Iterators - void reset () ; - - DofType * vector() { return (*dofArray_).vector(); } - const DofType * vector() const { return (*dofArray_).vector(); } - - private: - //! the array holding the dofs - DofArrayType* dofArray_; - - //! index - mutable int count_; - }; // end DofIteratorAdapt - } // end namespace Dune #include "discfuncarray/dfadapt.cc" diff --git a/fem/discfuncarray/dfadapt.cc b/fem/discfuncarray/dfadapt.cc index eb9dd5f71..19c5a6121 100644 --- a/fem/discfuncarray/dfadapt.cc +++ b/fem/discfuncarray/dfadapt.cc @@ -571,85 +571,6 @@ namespace Dune { return true; } - //********************************************************************** - // - // DofIteratorAdapt - // - //********************************************************************** - template <class DofType, class DofArrayType> - DofIteratorAdapt<DofType, DofArrayType>& - DofIteratorAdapt<DofType, DofArrayType>:: - operator= (const DofIteratorAdapt<DofType, - DofArrayType>& other) { - if (*this != other) { - dofArray_ = other.dofArray_; - count_ = other.count_; - } - return *this; - } - - template <class DofType,class DofArrayType> - inline DofType& DofIteratorAdapt<DofType,DofArrayType>::operator *() - { - assert((count_ >=0) && (count_ < dofArray_->size())); - return (*dofArray_)[ count_ ]; - } - - template <class DofType,class DofArrayType> - inline const DofType& DofIteratorAdapt<DofType,DofArrayType>::operator* () const - { - assert((count_ >=0) && (count_ < dofArray_->size())); - return (*dofArray_) [ count_ ]; - } - - template <class DofType,class DofArrayType> - inline DofIteratorAdapt<DofType,DofArrayType>& DofIteratorAdapt<DofType,DofArrayType>::operator ++() - { - ++count_; - return (*this); - } - - template <class DofType,class DofArrayType> - inline DofType& DofIteratorAdapt<DofType,DofArrayType>::operator [](int i) - { - assert((i >=0) && (i < dofArray_->size())); - return (*dofArray_)[i]; - } - - template <class DofType,class DofArrayType> - inline const DofType& DofIteratorAdapt<DofType,DofArrayType>::operator [](int i) const - { - assert((i >=0) && (i < dofArray_->size())); - return (*dofArray_)[i]; - } - - template <class DofType,class DofArrayType> - inline bool DofIteratorAdapt<DofType,DofArrayType>:: - operator ==(const DofIteratorAdapt<DofType,DofArrayType> & I) const - { - return count_ == I.count_; - } - - template <class DofType,class DofArrayType> - inline bool DofIteratorAdapt<DofType,DofArrayType>:: - operator !=(const DofIteratorAdapt<DofType,DofArrayType> & I) const - { - return count_ != I.count_; - } - - template <class DofType,class DofArrayType> - inline int DofIteratorAdapt<DofType,DofArrayType>::index() const - { - return count_; - } - - template <class DofType,class DofArrayType> - inline void DofIteratorAdapt<DofType,DofArrayType>::reset() - { - count_ = 0; - } - - } // end namespace #endif -- GitLab