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

Grid view abstract base classInterface 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. 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.
typedef Traits::Grid Grid
 type of the grid
typedef Traits::IndexSet IndexSet
 type of the index set
typedef Traits::Intersection Intersection
 type of the intersection
typedef
Traits::IntersectionIterator 
IntersectionIterator
 type of the intersection iterator
typedef
Traits::CollectiveCommunication 
CollectiveCommunication
 type of the collective communication
typedef Grid::ctype ctype
 type used for coordinates in grid

Public Member Functions

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

Protected Types

typedef GridViewImp Implementation

Protected Member Functions

Implementationimpl ()
 return reference to the real implementation
const Implementationimpl () const
 return reference to the real implementation
GridViewImpasImp ()
const GridViewImpasImp () const

Protected Attributes

Implementation impl_

Friends

class GridDefaultImplementation< Grid::dimension, Grid::dimensionworld, typename Grid::ctype, typename Grid::GridFamily >

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.

Member 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>
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 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>
typedef ViewTraits Dune::GridView< ViewTraits >::Traits

Traits class.

Member Enumeration 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.

Constructor & Destructor Documentation

template<class ViewTraits>
Dune::GridView< ViewTraits >::GridView ( const GridViewImp imp)
inline

constructor (engine concept)

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

Copy constructor.

Member Function Documentation

template<class ViewTraits>
GridViewImp& Dune::GridView< ViewTraits >::asImp ( )
inlineprotected
Deprecated:
This method is deprecated and will be removed after Dune 2.3. Use impl() instead.
Deprecated:
"Use impl() instead."

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

template<class ViewTraits>
const GridViewImp& Dune::GridView< ViewTraits >::asImp ( ) const
inlineprotected
Deprecated:
This method is deprecated and will be removed after Dune 2.3. Use impl() instead.
Deprecated:
"Use impl() instead."

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

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

communicate data on this view

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

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

obtain a const reference to the underlying hierarchic grid

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

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().

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().

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().

Friends And Related Function Documentation

template<class ViewTraits>
friend class GridDefaultImplementation< Grid::dimension, Grid::dimensionworld, typename Grid::ctype, typename Grid::GridFamily >
friend

Member Data Documentation

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

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