Dune Core Modules (2.3.1)

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 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 More...
 
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. More...
 
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 Member Functions

Implementation & impl ()
 return reference to the real implementation
 
const Implementation & impl () const
 return reference to the real implementation
 
GridViewImp & asImp ()
 
const GridViewImp & asImp () const
 

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 Enumeration Documentation

◆ anonymous enum

template<class ViewTraits >
anonymous enum
Enumerator
conforming 

Export if this grid view is conforming *‍/.

◆ anonymous enum

template<class ViewTraits >
anonymous enum
Enumerator
dimension 

The dimension of the grid.

◆ anonymous enum

template<class ViewTraits >
anonymous enum
Enumerator
dimensionworld 

The dimension of the world the grid lives in.

Member Function Documentation

◆ asImp() [1/2]

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.

◆ asImp() [2/2]

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.

◆ communicate()

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

◆ contains()

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

◆ indexSet()

template<class ViewTraits >
const IndexSet& Dune::GridView< ViewTraits >::indexSet ( ) const
inline

obtain the index set

The lifetime of the returned index set is bound to the lifetime of the grid view. Keep a copy of the grid view to prevent the index set from becoming a dangling reference.

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

Referenced by Dune::GridPtr< GridType >::parameters(), Dune::DGFWriter< GV >::write(), and Dune::AmiraMeshWriter< GridView >::writeSurfaceGrid().


The documentation for this class was generated from the following file:
Creative Commons License   |  Legal Statements / Impressum  |  Hosted by TU Dresden  |  generated with Hugo v0.80.0 (May 5, 22:29, 2024)