dune-grid 2.9.0
Classes | Typedefs | Functions | Variables
Collaboration diagram for GridView:

Classes

class  Dune::GridView< ViewTraits >
 Grid view abstract base class. More...
 
struct  Dune::GridView< ViewTraits >::Codim< cd >
 A struct that collects all associated types of one implementation from the Traits class. More...
 
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 >::DeprecatedMethodEmptyFuture
 
class  Dune::GridView< ViewTraits >::CheckIsConformingImpl< M >
 

Typedefs

typedef ViewTraits::GridViewImp Dune::GridView< ViewTraits >::Implementation
 type of underlying implementation More...
 
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...
 
template<class T >
using Dune::GridView< ViewTraits >::Communication_t = typename T ::Communication
 
template<class T >
using Dune::GridView< ViewTraits >::DeprecatedCollectiveCommunication_t = typename T ::CollectiveCommunication
 
using Dune::GridView< ViewTraits >::Communication = detected_or_fallback_t< DeprecatedCollectiveCommunication_t, Communication_t, Traits >
 A type that is a model of Dune::Communication. It provides a portable way for communication on the set of processes used by the grid. More...
 
using Dune::GridView< ViewTraits >::CollectiveCommunication = Communication
 
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 >::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...
 
using Dune::GridView< ViewTraits >::CheckIsConformingImpl< M >::type = decltype(test< M >(nullptr))
 

Functions

template<int dim, int dimworld, class ct , class GridFamily >
Grid< dim, dimworld, ct, GridFamily >::LevelGridView Dune::levelGridView (const Grid< dim, dimworld, ct, GridFamily > &grid, int level)
 level grid view for the given grid and level. More...
 
template<int dim, int dimworld, class ct , class GridFamily >
Grid< dim, dimworld, ct, GridFamily >::LeafGridView Dune::leafGridView (const Grid< dim, dimworld, ct, GridFamily > &grid)
 leaf grid view for the given grid More...
 
void Dune::GridView< ViewTraits >::DeprecatedMethodEmptyFuture::printMessage () const
 
bool Dune::GridView< ViewTraits >::DeprecatedMethodEmptyFuture::ready ()
 
void Dune::GridView< ViewTraits >::DeprecatedMethodEmptyFuture::wait ()
 
bool Dune::GridView< ViewTraits >::DeprecatedMethodEmptyFuture::valid () const
 

Variables

static constexpr bool Dune::GridView< ViewTraits >::conforming = Traits :: conforming
 Export if this grid view is guaranteed conforming. More...
 
static constexpr int Dune::GridView< ViewTraits >::dimension = Grid :: dimension
 The dimension of the grid. More...
 
static constexpr int Dune::GridView< ViewTraits >::dimensionworld = Grid :: dimensionworld
 The dimension of the world the grid lives in. More...
 

Interface for the implementor

Implementation Dune::GridView< ViewTraits >::impl_
 
 Dune::GridView< ViewTraits >::GridView (const Implementation &imp)
 constructor (engine concept) More...
 
 Dune::GridView< ViewTraits >::GridView (const ThisType &other)
 Copy constructor. More...
 
ThisTypeDune::GridView< ViewTraits >::operator= (const ThisType &other)
 assignment operator More...
 
const GridDune::GridView< ViewTraits >::grid () const
 obtain a const reference to the underlying hierarchic grid More...
 
const IndexSetDune::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...
 
bool Dune::GridView< ViewTraits >::isConforming () const
 return true if current state of grid view represents a conforming grid 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 CommunicationDune::GridView< ViewTraits >::comm () const
 obtain 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 >
auto Dune::GridView< ViewTraits >::communicate (CommDataHandleIF< DataHandleImp, DataType > &data, InterfaceType iftype, CommunicationDirection dir) const
 Communicate data on this view. More...
 
ImplementationDune::GridView< ViewTraits >::impl ()
 access to the underlying implementation More...
 
const ImplementationDune::GridView< ViewTraits >::impl () const
 access to the underlying implementation More...
 
template<class DataHandleImp , class DataType >
auto Dune::GridView< ViewTraits >::communicate (CommDataHandleIF< DataHandleImp, DataType > &data, InterfaceType iftype, CommunicationDirection dir, std::integral_constant< bool, false >) const
 Communicate data on this view. More...
 
template<class DataHandleImp , class DataType >
auto Dune::GridView< ViewTraits >::communicate (CommDataHandleIF< DataHandleImp, DataType > &data, InterfaceType iftype, CommunicationDirection dir, std::integral_constant< bool, true >) const
 Communicate data on this view. More...
 
bool Dune::GridView< ViewTraits >::isConformingDefaultImplementation () const
 

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., 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 which are provided as both free functions and member functions of the Grid interface class.

Typedef Documentation

◆ CollectiveCommunication

template<class ViewTraits >
using Dune::GridView< ViewTraits >::CollectiveCommunication = Communication
Deprecated:
Use Communication instead! Will be removed after Dune 2.9.

◆ Communication

template<class ViewTraits >
using Dune::GridView< ViewTraits >::Communication = detected_or_fallback_t<DeprecatedCollectiveCommunication_t, Communication_t, Traits>

A type that is a model of Dune::Communication. It provides a portable way for communication on the set of processes used by the grid.

◆ Communication_t

template<class ViewTraits >
template<class T >
using Dune::GridView< ViewTraits >::Communication_t = typename T :: Communication
protected

◆ ctype

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

type used for coordinates in grid

◆ DeprecatedCollectiveCommunication_t

template<class ViewTraits >
template<class T >
using Dune::GridView< ViewTraits >::DeprecatedCollectiveCommunication_t = typename T :: CollectiveCommunication
protected

◆ Entity

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

type of corresponding entity

◆ Geometry

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

type of the geometry implementation

◆ Grid

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

type of the grid

◆ GridViewImp

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

◆ Implementation

template<class ViewTraits >
typedef ViewTraits::GridViewImp Dune::GridView< ViewTraits >::Implementation

type of underlying implementation

Warning
Implementation details may change without prior notification.

◆ IndexSet

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

type of the index set

◆ Intersection

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

type of the intersection

◆ IntersectionIterator

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

type of the intersection iterator

◆ Iterator [1/2]

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

◆ Iterator [2/2]

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

◆ LocalGeometry

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

◆ Traits

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

Traits class.

◆ type

template<class ViewTraits >
template<class M >
using Dune::GridView< ViewTraits >::CheckIsConformingImpl< M >::type = decltype(test<M>(nullptr))

Function Documentation

◆ begin() [1/2]

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

obtain begin iterator for this view

◆ begin() [2/2]

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

◆ comm()

template<class ViewTraits >
const Communication & Dune::GridView< ViewTraits >::comm ( ) const
inline

obtain communication object

◆ communicate() [1/3]

template<class ViewTraits >
template<class DataHandleImp , class DataType >
auto Dune::GridView< ViewTraits >::communicate ( CommDataHandleIF< DataHandleImp, DataType > &  data,
InterfaceType  iftype,
CommunicationDirection  dir 
) const
inline

Communicate data on this view.

◆ communicate() [2/3]

template<class ViewTraits >
template<class DataHandleImp , class DataType >
auto Dune::GridView< ViewTraits >::communicate ( CommDataHandleIF< DataHandleImp, DataType > &  data,
InterfaceType  iftype,
CommunicationDirection  dir,
std::integral_constant< bool, false >   
) const
inlineprotected

Communicate data on this view.

◆ communicate() [3/3]

template<class ViewTraits >
template<class DataHandleImp , class DataType >
auto Dune::GridView< ViewTraits >::communicate ( CommDataHandleIF< DataHandleImp, DataType > &  data,
InterfaceType  iftype,
CommunicationDirection  dir,
std::integral_constant< bool, true >   
) const
inlineprotected

Communicate data on this view.

◆ 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.

◆ end() [1/2]

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

obtain end iterator for this view

◆ end() [2/2]

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

◆ ghostSize()

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.

◆ grid()

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

obtain a const reference to the underlying hierarchic grid

◆ GridView() [1/2]

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

constructor (engine concept)

◆ GridView() [2/2]

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

Copy constructor.

◆ ibegin()

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

◆ iend()

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

◆ impl() [1/2]

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

access to the underlying implementation

Warning
Implementation details may change without prior notification.

◆ impl() [2/2]

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

access to the underlying implementation

Warning
Implementation details may change without prior notification.

◆ 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.

◆ isConforming()

template<class ViewTraits >
bool Dune::GridView< ViewTraits >::isConforming ( ) const
inline

return true if current state of grid view represents a conforming grid

◆ isConformingDefaultImplementation()

template<class ViewTraits >
bool Dune::GridView< ViewTraits >::isConformingDefaultImplementation ( ) const
inlineprotected

◆ leafGridView()

template<int dim, int dimworld, class ct , class GridFamily >
Grid< dim, dimworld, ct, GridFamily >::LeafGridView Dune::leafGridView ( const Grid< dim, dimworld, ct, GridFamily > &  grid)

leaf grid view for the given grid

Identical to the method in the Grid interface, but provided as a free function.

See also
Grid::leafGridView
Parameters
gridGrid to obtain the leaf grid view for

◆ levelGridView()

template<int dim, int dimworld, class ct , class GridFamily >
Grid< dim, dimworld, ct, GridFamily >::LevelGridView Dune::levelGridView ( const Grid< dim, dimworld, ct, GridFamily > &  grid,
int  level 
)

level grid view for the given grid and level.

Identical to the method in the Grid interface, but provided as a free function.

See also
Grid::levelGridView
Parameters
gridGrid to obtain the level grid view for
levellevel of the level grid view

◆ operator=()

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

assignment operator

◆ overlapSize()

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.

◆ printMessage()

template<class ViewTraits >
void Dune::GridView< ViewTraits >::DeprecatedMethodEmptyFuture::printMessage ( ) const
inline

◆ ready()

template<class ViewTraits >
bool Dune::GridView< ViewTraits >::DeprecatedMethodEmptyFuture::ready ( )
inline

◆ size() [1/2]

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

obtain number of entities with a given geometry type

◆ size() [2/2]

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

obtain number of entities in a given codimension

◆ valid()

template<class ViewTraits >
bool Dune::GridView< ViewTraits >::DeprecatedMethodEmptyFuture::valid ( ) const
inline

◆ wait()

template<class ViewTraits >
void Dune::GridView< ViewTraits >::DeprecatedMethodEmptyFuture::wait ( )
inline

Variable Documentation

◆ conforming

template<class ViewTraits >
constexpr bool Dune::GridView< ViewTraits >::conforming = Traits :: conforming
staticconstexpr

Export if this grid view is guaranteed conforming.

◆ dimension

template<class ViewTraits >
constexpr int Dune::GridView< ViewTraits >::dimension = Grid :: dimension
staticconstexpr

The dimension of the grid.

◆ dimensionworld

template<class ViewTraits >
constexpr int Dune::GridView< ViewTraits >::dimensionworld = Grid :: dimensionworld
staticconstexpr

The dimension of the world the grid lives in.

◆ impl_

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