dune-grid  2.4.1-rc2
Classes | Public Types | Public Member Functions | Protected Types | Protected Member Functions | Protected Attributes | List of all members
Dune::GridView< ViewTraits > Class Template Reference

Grid view abstract base class. More...

#include <dune/grid/common/gridview.hh>

Classes

struct  Codim
 A struct that collects all associated types of one implementation from the Traits class. More...
 

Public Types

enum  { conforming = Traits :: conforming }
 
enum  { dimension = Grid :: dimension }
 
enum  { dimensionworld = Grid :: dimensionworld }
 
typedef ViewTraits::GridViewImp GridViewImp
 
typedef ViewTraits Traits
 Traits class. More...
 
typedef Traits::Grid Grid
 type of the grid More...
 
typedef Traits::IndexSet IndexSet
 type of the index set More...
 
typedef Traits::Intersection Intersection
 type of the intersection More...
 
typedef Traits::IntersectionIterator IntersectionIterator
 type of the intersection iterator More...
 
typedef Traits::CollectiveCommunication CollectiveCommunication
 type of the collective communication More...
 
typedef Grid::ctype ctype
 type used for coordinates in grid More...
 

Public Member Functions

 GridView (const ThisType &other)
 Copy constructor. More...
 
ThisTypeoperator= (const ThisType &other)
 assignment operator More...
 
const Gridgrid () const
 obtain a const reference to the underlying hierarchic grid More...
 
const IndexSetindexSet () const
 obtain the index set More...
 
int size (int codim) const
 obtain number of entities in a given codimension More...
 
int size (const GeometryType &type) const
 obtain number of entities with a given geometry type More...
 
template<class EntityType >
bool contains (const EntityType &e) const
 Return true if the given entity is contained in this grid view. More...
 
template<int cd>
Codim< cd >::Iterator begin () const
 obtain begin iterator for this view More...
 
template<int cd>
Codim< cd >::Iterator end () const
 obtain end iterator for this view More...
 
template<int cd, PartitionIteratorType pitype>
Codim< cd >::template Partition< pitype >::Iterator begin () const
 obtain begin iterator for this view More...
 
template<int cd, PartitionIteratorType pitype>
Codim< cd >::template Partition< pitype >::Iterator end () const
 obtain end iterator for this view More...
 
IntersectionIterator ibegin (const typename Codim< 0 >::Entity &entity) const
 obtain begin intersection iterator with respect to this view More...
 
IntersectionIterator iend (const typename Codim< 0 >::Entity &entity) const
 obtain end intersection iterator with respect to this view More...
 
const CollectiveCommunicationcomm () const
 obtain collective communication object More...
 
int overlapSize (int codim) const
 Return size of the overlap region for a given codim on the grid view. More...
 
int ghostSize (int codim) const
 Return size of the ghost region for a given codim on the grid view. More...
 
template<class DataHandleImp , class DataType >
void communicate (CommDataHandleIF< DataHandleImp, DataType > &data, InterfaceType iftype, CommunicationDirection dir) const
 Communicate data on this view. More...
 
Interface for the implementor
 GridView (const Implementation &imp)
 constructor (engine concept) More...
 

Protected Types

typedef ViewTraits::GridViewImp Implementation
 

Protected Member Functions

Implementationimpl ()
 return reference to the real implementation More...
 
const Implementationimpl () const
 return reference to the real implementation More...
 

Protected Attributes

Implementation impl_
 

Related Functions

(Note that these are not member functions.)

Common entity ranges

Entity ranges for common entity types. If in doubt, use one of these.

template<typename GV >
IteratorRange<... > elements (const GV &gv)
 Iterates over all elements / cells (entities with codimension 0) of a GridView. More...
 
template<typename GV >
IteratorRange<... > facets (const GV &gv)
 Iterates over all facets (entities with codimension 1) of a GridView. More...
 
template<typename GV >
IteratorRange<... > edges (const GV &gv)
 Iterates over all edges (entities with dimension 1) of a GridView. More...
 
template<typename GV >
IteratorRange<... > vertices (const GV &gv)
 Iterates over all vertices (entities with dimension 0) of a GridView. More...
 
Entity ranges with (co)dimension template argument

Entity ranges which allow specifying the codimension / dimension as a numeric template parameter.

template<typename GV , int codim>
IteratorRange<... > entities (const GV &gv, Codim< codim > cd)
 Iterates over all entities of a GridView with the given codimension. More...
 
template<typename GV , int dim>
IteratorRange<... > entities (const GV &gv, Dim< dim > d)
 Iterates over all entities of a GridView with the given dimension. More...
 
Common entity ranges for non-standard parallel partitions

The following Entity ranges make it possible to specify a PartitionSet which is sometimes needed in parallel code.

template<typename GV , unsigned int partitions>
IteratorRange<... > elements (const GV &gv, PartitionSet< partitions > ps)
 Iterates over all elements / cells (entities with codimension 0) of a GridView that belong to the given PartitionSet. More...
 
template<typename GV , unsigned int partitions>
IteratorRange<... > facets (const GV &gv, PartitionSet< partitions > ps)
 Iterates over all facets (entities with codimension 1) of a GridView that belong to the given PartitionSet. More...
 
template<typename GV , unsigned int partitions>
IteratorRange<... > edges (const GV &gv, PartitionSet< partitions > ps)
 Iterates over all edges (entities with dimension 1) of a GridView that belong to the given PartitionSet. More...
 
template<typename GV , unsigned int partitions>
IteratorRange<... > vertices (const GV &gv, PartitionSet< partitions > ps)
 Iterates over all vertices (entities with dimension 0) of a GridView that belong to the given PartitionSet. More...
 
Generic entity ranges for non-standard parallel partitions

These Entity ranges allow for the maximum flexibility; they are parameterized on both the co(cimension) and the parallel PartitionSet.

template<typename GV , int codim, unsigned int partitions>
IteratorRange<... > entities (const GV &gv gv, Codim< codim > cd, PartitionSet< partitions > ps)
 Iterates over all entities of a GridView with the given codimension that belong to the given PartitionSet. More...
 
template<typename GV , int dim, unsigned int partitions>
IteratorRange<... > entities (const GV &gv, Dim< dim > d, PartitionSet< partitions > ps)
 Iterates over all entities of a GridView with the given dimension that belong to the given PartitionSet. More...
 

Detailed Description

template<class ViewTraits>
class Dune::GridView< ViewTraits >

Grid view abstract base class.

Interface class for a view on grids. Grids return two types of view, a view of the leaf grid and of a level grid, which both satisfy the same interface. Through the view the user has access to the iterators, the intersections and the index set.

The interface is implemented using the engine concept.


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