My Project
Dune::cpgrid::Iterator< cd, pitype > Class Template Reference

Iterator intended to be used as LeafIterator and LevelIterator (no difference due to no adaptivity) for CpGrid. More...

#include <Iterators.hpp>

Inheritance diagram for Dune::cpgrid::Iterator< cd, pitype >:
Dune::cpgrid::Entity< cd > Dune::cpgrid::EntityRep< codim >

Public Types

using Reference = const Entity< cd > &
 
- Public Types inherited from Dune::cpgrid::Entity< cd >
enum  
 
enum  
 
enum  
 
enum  
 
typedef Entity EntitySeed
 
typedef cpgrid::Geometry< 3-codim, 3 > Geometry
 
typedef Geometry LocalGeometry
 
typedef cpgrid::IntersectionIterator LeafIntersectionIterator
 
typedef cpgrid::IntersectionIterator LevelIntersectionIterator
 
typedef cpgrid::HierarchicIterator HierarchicIterator
 
typedef double ctype
 
- Public Types inherited from Dune::cpgrid::EntityRep< codim >
enum  { codimension =codim }
 
enum  { InvalidIndex = INT_MAX }
 

Public Member Functions

 Iterator (const CpGridData &grid, int index, bool orientation)
 
Iteratoroperator++ ()
 Increment operator. More...
 
const Entity< cd > * operator-> () const
 Const member by pointer operator.
 
const Entity< cd > & operator* () const
 Const dereferencing operator.
 
- Public Member Functions inherited from Dune::cpgrid::Entity< cd >
 Entity ()
 Constructor taking a grid and an integer entity representation. More...
 
 Entity (const CpGridData &grid, EntityRep< codim > entityrep)
 Constructor taking a grid and an entity representation.
 
 Entity (const CpGridData &grid, int index_arg, bool orientation_arg)
 Constructor taking a grid, entity index and orientation.
 
bool operator== (const Entity &other) const
 Equality.
 
bool operator!= (const Entity &other) const
 Inequality.
 
EntitySeed seed () const
 Return an entity seed. More...
 
const Geometrygeometry () const
 Returns the geometry of the entity (does not depend on its orientation).
 
int level () const
 We do not support refinement, so level() is always 0.
 
bool isLeaf () const
 The entity is always on the leaf grid, since we have no refinement.
 
bool isRegular () const
 Refinement is not defined for CpGrid.
 
PartitionType partitionType () const
 For now, the grid is serial and the only partitionType() is InteriorEntity.
 
GeometryType type () const
 Using the cube type for all entities now (cells and vertices).
 
unsigned int subEntities (const unsigned int cc) const
 The count of subentities of codimension cc.
 
int count () const
 The count of subentities of codimension cc.
 
Codim< cc >::Entity subEntity (int i) const
 Obtain subentity.
 
Entity< codim >::template Codim< cc >::Entity subEntity (int i) const
 
LevelIntersectionIterator ilevelbegin () const
 Start iterator for the cell-cell intersections of this entity.
 
LevelIntersectionIterator ilevelend () const
 End iterator for the cell-cell intersections of this entity.
 
LeafIntersectionIterator ileafbegin () const
 Start iterator for the cell-cell intersections of this entity.
 
LeafIntersectionIterator ileafend () const
 End iterator for the cell-cell intersections of this entity.
 
HierarchicIterator hbegin (int) const
 Dummy first child iterator.
 
HierarchicIterator hend (int) const
 Dummy beyond last child iterator.
 
bool isNew () const
 Returns true, if the entity has been created during the last call to adapt(). Dummy.
 
bool mightVanish () const
 Returns true, if entity might disappear during the next call to adapt(). Dummy.
 
bool hasFather () const
 No hierarchy in this grid.
 
Entity father () const
 Dummy, returning this.
 
LocalGeometry geometryInFather () const
 Dummy, returning default geometry.
 
bool hasBoundaryIntersections () const
 Returns true if any of my intersections are on the boundary. More...
 
const Entityimpl () const
 
Entityimpl ()
 
bool isValid () const
 isValid method for EntitySeed More...
 
- Public Member Functions inherited from Dune::cpgrid::EntityRep< codim >
 EntityRep ()
 Default constructor.
 
 EntityRep (int index_arg, bool orientation_arg)
 Constructor taking an entity index and an orientation. More...
 
void setValue (int index_arg, bool orientation_arg)
 Set entity value. More...
 
int index () const
 The (positive) index of an entity. More...
 
int signedIndex () const
 The signed index that also tells us the orientation.
 
bool orientation () const
 Returns true if the entity has positive orientation. More...
 
EntityRep opposite () const
 Returns an EntityRep with opposite orientation. More...
 
void increment ()
 Increments the entityrep's index() by one.
 
bool operator< (const EntityRep &other) const
 Ordering relation used for maps etc. More...
 
bool operator== (const EntityRep &other) const
 Equality operator. More...
 
bool operator!= (const EntityRep &other) const
 Inequality operator. More...
 

Additional Inherited Members

- Protected Attributes inherited from Dune::cpgrid::Entity< cd >
const CpGridDatapgrid_
 

Detailed Description

template<int cd, PartitionIteratorType pitype>
class Dune::cpgrid::Iterator< cd, pitype >

Iterator intended to be used as LeafIterator and LevelIterator (no difference due to no adaptivity) for CpGrid.

This could have been a random access iterator, perhaps we will use a facade to do this later.

Constructor & Destructor Documentation

◆ Iterator()

template<int cd, PartitionIteratorType pitype>
Dune::cpgrid::Iterator< cd, pitype >::Iterator ( const CpGridData grid,
int  index,
bool  orientation 
)
Todo:
Doc me!
Parameters

Member Function Documentation

◆ operator++()

template<int cd, PartitionIteratorType pitype>
Iterator& Dune::cpgrid::Iterator< cd, pitype >::operator++ ( )
inline

Increment operator.

Implementation note: This class is a friend of

See also
EntityRep (which is a private base class of Entity) in order to actually access the private variable entityrep_. We may want to change EntityRep, then this must change, too.

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