My Project
Loading...
Searching...
No Matches
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.
 
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.
 
 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.
 
 Entity (int index_arg, bool orientation_arg)
 Constructor taking a 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 (light-weight entity).
 
const Geometrygeometry () const
 Return the geometry of the entity (does not depend on its orientation).
 
int level () const
 Return the level of the entity in the grid hierarchy. Level = 0 represents the coarsest grid.
 
bool isLeaf () const
 Check if the entity is in the leafview.
 
bool isRegular () const
 Refinement is not defined for CpGrid.
 
PartitionType partitionType () const
 In serial run, the only partitionType() is InteriorEntity.
 
PartitionType partitionTypeWhenLgrs (bool) const
 For parallel run, the entity - for now - does not see the CpGrid therefore we pass a bool to make the entity aware of the fact the the grid has been distributed.
 
GeometryType type () const
 Return marker object (GeometryType object) representing the reference element of the entity.
 
unsigned int subEntities (const unsigned int cc) const
 Return the number of all subentities of the entity of a given 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 level-iterator for the cell-cell intersections of this entity.
 
LevelIntersectionIterator ilevelend () const
 End level-iterator for the cell-cell intersections of this entity.
 
LeafIntersectionIterator ileafbegin () const
 Start leaf-iterator for the cell-cell intersections of this entity.
 
LeafIntersectionIterator ileafend () const
 End leaf-iterator for the cell-cell intersections of this entity.
 
HierarchicIterator hbegin (int) const
 Iterator begin over the children. [If requested, also over descendants more than one generation away.].
 
HierarchicIterator hend (int) const
 Iterator end over the children/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().
 
bool hasFather () const
 ONLY FOR CELLS (Entity<0>) Check if the entity comes from an LGR, i.e., it has been created via refinement from coarser level.
 
Entity< 0 > father () const
 ONLY FOR CELLS (Entity<0>).
 
Dune::cpgrid::Geometry< 3, 3 > geometryInFather () const
 Return LocalGeometry representing the embedding of the entity into its father (when hasFather() is true).
 
bool hasBoundaryIntersections () const
 Returns true if any of my intersections are on the boundary.
 
const Entityimpl () const
 Access the actual implementation class behind Entity interface class.
 
Entityimpl ()
 
bool isValid () const
 isValid method for EntitySeed
 
Entity< 0 > getOrigin () const
 Returns (1) parent entity in the level-grid the parent cell was born, if the entity was born in any LGR.
 
Entity< 0 > getLevelElem () const
 To be invoked only for leaf-grid-view entities. Get equivalent element on the level grid the leaf-entity was born.
 
Entity< 0 > getEquivLevelElem () const
 Get equivalent element on the level grid where the entity was born, if grid = leaf-grid-view. Otherwise, return itself.
 
int getLevelCartesianIdx () const
 Get Cartesian Index in the level grid view where the Entity was born.
 
- 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.
 
void setValue (int index_arg, bool orientation_arg)
 Set entity value.
 
int index () const
 The (positive) index of an entity.
 
int signedIndex () const
 The signed index that also tells us the orientation.
 
bool orientation () const
 Returns true if the entity has positive orientation.
 
EntityRep opposite () const
 Returns an EntityRep with opposite orientation.
 
void increment ()
 Increments the entityrep's index() by one.
 
bool operator< (const EntityRep &other) const
 Ordering relation used for maps etc.
 
bool operator== (const EntityRep &other) const
 Equality operator.
 
bool operator!= (const EntityRep &other) const
 Inequality operator.
 

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: