- Home
- About DUNE
- Download
- Documentation
- Community
- Development
00001 #ifndef DUNE_IDENTITYGRIDLEVELITERATOR_HH 00002 #define DUNE_IDENTITYGRIDLEVELITERATOR_HH 00003 00004 #include "identitygridentitypointer.hh" 00005 00010 namespace Dune { 00011 00012 00013 00014 00015 //********************************************************************** 00016 // 00017 // --IdentityGridLevelIterator 00021 template<int codim, PartitionIteratorType pitype, class GridImp> 00022 class IdentityGridLevelIterator : 00023 public Dune::IdentityGridEntityPointer <codim,GridImp> 00024 { 00025 public: 00026 00028 explicit IdentityGridLevelIterator(const GridImp* identityGrid, int level) 00029 : IdentityGridEntityPointer<codim,GridImp>(identityGrid, identityGrid->hostgrid_->template lbegin<codim>(level)), 00030 hostGridLevelIterator_(identityGrid->hostgrid_->template lbegin<codim>(level)) 00031 { 00032 this->virtualEntity_.setToTarget(hostGridLevelIterator_); 00033 } 00034 00035 00041 explicit IdentityGridLevelIterator(const GridImp* identityGrid, int level, bool endDummy) 00042 : 00043 IdentityGridEntityPointer<codim,GridImp>(identityGrid, identityGrid->hostgrid_->template lend<codim>(level)), 00044 hostGridLevelIterator_(identityGrid->hostgrid_->template lend<codim>(level)) 00045 { 00046 } 00047 00048 00050 void increment() { 00051 ++hostGridLevelIterator_; 00052 this->virtualEntity_.setToTarget(hostGridLevelIterator_); 00053 } 00054 00055 00056 private: 00057 00058 // LevelIterator to the equivalent entity in the host grid 00059 typedef typename GridImp::HostGridType::Traits::template Codim<codim>::LevelIterator HostGridLevelIterator; 00060 00062 HostGridLevelIterator hostGridLevelIterator_; 00063 00064 }; 00065 00066 00067 } // namespace Dune 00068 00069 #endif
Generated on Fri Apr 29 2011 with Doxygen (ver 1.7.1) [doxygen-log,error-log].