dune-grid  2.4.1-rc2
Classes | Typedefs | Enumerations | Enumerator | Functions | Variables
Collaboration diagram for GridView:

Classes

struct  Dune::GridView< ViewTraits >::Codim< cd >::Partition< pit >
 Define types needed to iterate over entities of a given partition type. More...
 
struct  Dune::GridView< ViewTraits >::Codim< cd >
 A struct that collects all associated types of one implementation from the Traits class. More...
 
class  Dune::GridView< ViewTraits >
 Grid view abstract base class. More...
 

Typedefs

typedef ViewTraits::GridViewImp Dune::GridView< ViewTraits >::Implementation
 
typedef ViewTraits::GridViewImp Dune::GridView< ViewTraits >::GridViewImp
 
typedef ViewTraits Dune::GridView< ViewTraits >::Traits
 Traits class. More...
 
typedef Traits::Grid Dune::GridView< ViewTraits >::Grid
 type of the grid More...
 
typedef Traits::IndexSet Dune::GridView< ViewTraits >::IndexSet
 type of the index set More...
 
typedef Traits::Intersection Dune::GridView< ViewTraits >::Intersection
 type of the intersection More...
 
typedef Traits::IntersectionIterator Dune::GridView< ViewTraits >::IntersectionIterator
 type of the intersection iterator More...
 
typedef Traits::CollectiveCommunication Dune::GridView< ViewTraits >::CollectiveCommunication
 type of the collective communication More...
 
typedef Traits::template Codim< cd >::Iterator Dune::GridView< ViewTraits >::Codim< cd >::Iterator
 type of iterator returned by the grid view More...
 
typedef Traits::template Codim< cd >::EntityPointer Dune::GridView< ViewTraits >::Codim< cd >::EntityPointer
 type of corresponding entity pointer More...
 
typedef Traits::template Codim< cd >::Entity Dune::GridView< ViewTraits >::Codim< cd >::Entity
 type of corresponding entity More...
 
typedef Traits::template Codim< cd >::Geometry Dune::GridView< ViewTraits >::Codim< cd >::Geometry
 type of the geometry implementation More...
 
typedef Traits::template Codim< cd >::LocalGeometry Dune::GridView< ViewTraits >::Codim< cd >::LocalGeometry
 type of the implementation for local geometries More...
 
typedef Traits::template Codim< cd >::template Partition< pit >::Iterator Dune::GridView< ViewTraits >::Codim< cd >::Partition< pit >::Iterator
 iterator over a given codim and partition type More...
 
typedef Grid::ctype Dune::GridView< ViewTraits >::ctype
 type used for coordinates in grid More...
 

Enumerations

enum  { Dune::GridView< ViewTraits >::conforming = Traits :: conforming }
 
enum  { Dune::GridView< ViewTraits >::dimension = Grid :: dimension }
 
enum  { Dune::GridView< ViewTraits >::dimensionworld = Grid :: dimensionworld }
 

Functions

 Dune::GridView< ViewTraits >::GridView (const ThisType &other)
 Copy constructor. More...
 
ThisType & Dune::GridView< ViewTraits >::operator= (const ThisType &other)
 assignment operator More...
 
const Grid & Dune::GridView< ViewTraits >::grid () const
 obtain a const reference to the underlying hierarchic grid More...
 
const IndexSet & Dune::GridView< ViewTraits >::indexSet () const
 obtain the index set More...
 
int Dune::GridView< ViewTraits >::size (int codim) const
 obtain number of entities in a given codimension More...
 
int Dune::GridView< ViewTraits >::size (const GeometryType &type) const
 obtain number of entities with a given geometry type More...
 
template<class EntityType >
bool Dune::GridView< ViewTraits >::contains (const EntityType &e) const
 Return true if the given entity is contained in this grid view. More...
 
template<int cd>
Codim< cd >::Iterator Dune::GridView< ViewTraits >::begin () const
 obtain begin iterator for this view More...
 
template<int cd>
Codim< cd >::Iterator Dune::GridView< ViewTraits >::end () const
 obtain end iterator for this view More...
 
template<int cd, PartitionIteratorType pitype>
Codim< cd >::template Partition< pitype >::Iterator Dune::GridView< ViewTraits >::begin () const
 obtain begin iterator for this view More...
 
template<int cd, PartitionIteratorType pitype>
Codim< cd >::template Partition< pitype >::Iterator Dune::GridView< ViewTraits >::end () const
 obtain end iterator for this view More...
 
IntersectionIterator Dune::GridView< ViewTraits >::ibegin (const typename Codim< 0 >::Entity &entity) const
 obtain begin intersection iterator with respect to this view More...
 
IntersectionIterator Dune::GridView< ViewTraits >::iend (const typename Codim< 0 >::Entity &entity) const
 obtain end intersection iterator with respect to this view More...
 
const CollectiveCommunication & Dune::GridView< ViewTraits >::comm () const
 obtain collective communication object More...
 
int Dune::GridView< ViewTraits >::overlapSize (int codim) const
 Return size of the overlap region for a given codim on the grid view. More...
 
int Dune::GridView< ViewTraits >::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 Dune::GridView< ViewTraits >::communicate (CommDataHandleIF< DataHandleImp, DataType > &data, InterfaceType iftype, CommunicationDirection dir) const
 Communicate data on this view. More...
 
Implementation & Dune::GridView< ViewTraits >::impl ()
 return reference to the real implementation More...
 
const Implementation & Dune::GridView< ViewTraits >::impl () const
 return reference to the real implementation More...
 

Variables

Implementation Dune::GridView< ViewTraits >::impl_
 

Interface for the implementor

 Dune::GridView< ViewTraits >::GridView (const Implementation &imp)
 constructor (engine concept) More...
 

Detailed Description

Though a DUNE grid is hierarchic, one often only needs access to a certain subset of the entities in the grid, e.g., the all entities on a given level or the leaf entities in the hierarchy. These views are provided by an implementation of GridView. Each grid exports a LevelGridView and a LeafGridView, corresponding to the two different subsets (views) described above.

A grid view provides the following functionality:

The default GridViews can be obtained from the grid by calling one of the levelGridView() or leafGridView() methods.

Typedef Documentation

template<class ViewTraits>
typedef Traits :: CollectiveCommunication Dune::GridView< ViewTraits >::CollectiveCommunication

type of the collective communication

template<class ViewTraits>
typedef Grid::ctype Dune::GridView< ViewTraits >::ctype

type used for coordinates in grid

template<class ViewTraits>
template<int cd>
typedef Traits :: template Codim<cd>:: Entity Dune::GridView< ViewTraits >::Codim< cd >::Entity

type of corresponding entity

template<class ViewTraits>
template<int cd>
typedef Traits :: template Codim<cd>:: EntityPointer Dune::GridView< ViewTraits >::Codim< cd >::EntityPointer

type of corresponding entity pointer

template<class ViewTraits>
template<int cd>
typedef Traits :: template Codim<cd>:: Geometry Dune::GridView< ViewTraits >::Codim< cd >::Geometry

type of the geometry implementation

template<class ViewTraits>
typedef Traits :: Grid Dune::GridView< ViewTraits >::Grid

type of the grid

template<class ViewTraits>
typedef ViewTraits :: GridViewImp Dune::GridView< ViewTraits >::GridViewImp
template<class ViewTraits>
typedef ViewTraits :: GridViewImp Dune::GridView< ViewTraits >::Implementation
protected
template<class ViewTraits>
typedef Traits :: IndexSet Dune::GridView< ViewTraits >::IndexSet

type of the index set

template<class ViewTraits>
typedef Traits :: Intersection Dune::GridView< ViewTraits >::Intersection

type of the intersection

template<class ViewTraits>
typedef Traits :: IntersectionIterator Dune::GridView< ViewTraits >::IntersectionIterator

type of the intersection iterator

template<class ViewTraits>
template<int cd>
typedef Traits :: template Codim<cd>:: Iterator Dune::GridView< ViewTraits >::Codim< cd >::Iterator

type of iterator returned by the grid view

template<class ViewTraits>
template<int cd>
template<PartitionIteratorType pit>
typedef Traits :: template Codim< cd >:: template Partition< pit >:: Iterator Dune::GridView< ViewTraits >::Codim< cd >::Partition< pit >::Iterator

iterator over a given codim and partition type

template<class ViewTraits>
template<int cd>
typedef Traits :: template Codim<cd>:: LocalGeometry Dune::GridView< ViewTraits >::Codim< cd >::LocalGeometry

type of the implementation for local geometries

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

Traits class.

Enumeration Type Documentation

template<class ViewTraits>
anonymous enum
Enumerator
conforming 

Export if this grid view is conforming.

template<class ViewTraits>
anonymous enum
Enumerator
dimension 

The dimension of the grid.

template<class ViewTraits>
anonymous enum
Enumerator
dimensionworld 

The dimension of the world the grid lives in.

Function Documentation

template<class ViewTraits>
template<int cd>
Codim< cd >:: Iterator Dune::GridView< ViewTraits >::begin ( ) const
inline

obtain begin iterator for this view

References Dune::GridView< ViewTraits >::impl().

template<class ViewTraits>
template<int cd, PartitionIteratorType pitype>
Codim< cd >:: template Partition< pitype >:: Iterator Dune::GridView< ViewTraits >::begin ( ) const
inline

obtain begin iterator for this view

References Dune::GridView< ViewTraits >::impl().

template<class ViewTraits>
const CollectiveCommunication& Dune::GridView< ViewTraits >::comm ( ) const
inline
template<class ViewTraits>
template<class DataHandleImp , class DataType >
void Dune::GridView< ViewTraits >::communicate ( CommDataHandleIF< DataHandleImp, DataType > &  data,
InterfaceType  iftype,
CommunicationDirection  dir 
) const
inline
template<class ViewTraits>
template<class EntityType >
bool Dune::GridView< ViewTraits >::contains ( const EntityType &  e) const
inline

Return true if the given entity is contained in this grid view.

Todo:
Currently we call the implementation on the IndexSet. This may lead to suboptimal efficiency.
Note
If the input element e is not an element of the grid, then the result of contains() is undefined.

References Dune::GridView< ViewTraits >::impl().

template<class ViewTraits>
template<int cd>
Codim< cd >:: Iterator Dune::GridView< ViewTraits >::end ( ) const
inline

obtain end iterator for this view

References Dune::GridView< ViewTraits >::impl().

template<class ViewTraits>
template<int cd, PartitionIteratorType pitype>
Codim< cd >:: template Partition< pitype >:: Iterator Dune::GridView< ViewTraits >::end ( ) const
inline

obtain end iterator for this view

References Dune::GridView< ViewTraits >::impl().

template<class ViewTraits>
int Dune::GridView< ViewTraits >::ghostSize ( int  codim) const
inline

Return size of the ghost region for a given codim on the grid view.

References Dune::GridView< ViewTraits >::impl().

template<class ViewTraits>
const Grid& Dune::GridView< ViewTraits >::grid ( ) const
inline
template<class ViewTraits>
Dune::GridView< ViewTraits >::GridView ( const Implementation imp)
inline

constructor (engine concept)

template<class ViewTraits>
Dune::GridView< ViewTraits >::GridView ( const ThisType other)
inline

Copy constructor.

template<class ViewTraits>
IntersectionIterator Dune::GridView< ViewTraits >::ibegin ( const typename Codim< 0 >::Entity entity) const
inline

obtain begin intersection iterator with respect to this view

References Dune::GridView< ViewTraits >::impl().

Referenced by Dune::GridPtr< GridType >::initialize(), and Dune::GrapeGridDisplay< GridType >::~GrapeGridDisplay().

template<class ViewTraits>
IntersectionIterator Dune::GridView< ViewTraits >::iend ( const typename Codim< 0 >::Entity entity) const
inline

obtain end intersection iterator with respect to this view

References Dune::GridView< ViewTraits >::impl().

Referenced by Dune::GridPtr< GridType >::initialize(), and Dune::GrapeGridDisplay< GridType >::~GrapeGridDisplay().

template<class ViewTraits>
Implementation& Dune::GridView< ViewTraits >::impl ( )
inlineprotected
template<class ViewTraits>
const Implementation& Dune::GridView< ViewTraits >::impl ( ) const
inlineprotected

return reference to the real implementation

References Dune::GridView< ViewTraits >::impl_.

template<class ViewTraits>
const IndexSet& Dune::GridView< ViewTraits >::indexSet ( ) const
inline
template<class ViewTraits>
ThisType& Dune::GridView< ViewTraits >::operator= ( const ThisType other)
inline

assignment operator

References Dune::GridView< ViewTraits >::impl_.

template<class ViewTraits>
int Dune::GridView< ViewTraits >::overlapSize ( int  codim) const
inline

Return size of the overlap region for a given codim on the grid view.

References Dune::GridView< ViewTraits >::impl().

template<class ViewTraits>
int Dune::GridView< ViewTraits >::size ( int  codim) const
inline
template<class ViewTraits>
int Dune::GridView< ViewTraits >::size ( const GeometryType &  type) const
inline

obtain number of entities with a given geometry type

References Dune::GridView< ViewTraits >::impl().

Variable Documentation

template<class ViewTraits>
Implementation Dune::GridView< ViewTraits >::impl_
protected