/usr/include/dune/grid/uggrid/uggridhieriterator.hh is in libdune-grid-dev 2.5.1-1.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 | // -*- tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-
// vi: set et ts=4 sw=2 sts=2:
#ifndef DUNE_UGHIERITERATOR_HH
#define DUNE_UGHIERITERATOR_HH
/** \file
* \brief The UGGridHierarchicIterator class
*/
#include <stack>
#include <dune/grid/uggrid/uggridentity.hh>
namespace Dune {
//**********************************************************************
//
// --UGGridHierarchicIterator
// --HierarchicIterator
/** \brief Iterator over the descendants of an entity.
* \ingroup UGGrid
Mesh entities of codimension 0 ("elements") allow to visit all entities of
codimension 0 obtained through nested, hierarchic refinement of the entity.
Iteration over this set of entities is provided by the HierarchicIterator,
starting from a given entity.
*/
template<class GridImp>
class UGGridHierarchicIterator
{
friend class UGGridEntity<0,GridImp::dimension,GridImp>;
public:
typedef typename GridImp::template Codim<0>::Entity Entity;
//! iterate only over elements
enum {codimension = 0};
//! the default Constructor
UGGridHierarchicIterator(int maxLevel, const GridImp* gridImp)
: maxlevel_(maxLevel),
gridImp_(gridImp)
{}
void increment();
//! dereferencing
const Entity& dereference() const {return virtualEntity_;}
//! equality
bool equals(const UGGridHierarchicIterator<GridImp>& other) const {
return virtualEntity_ == other.virtualEntity_;
}
private:
//! The makeable entity that the iterator is pointing to
UGMakeableEntity<0,GridImp::dimension,GridImp> virtualEntity_;
//! max level to go down
int maxlevel_;
std::stack<typename UG_NS<GridImp::dimension>::Element*> elementStack_;
const GridImp* gridImp_;
};
} // end namespace Dune
#endif
|