Dune Core Modules (2.9.0)

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

typedef ViewTraits::GridViewImp Implementation
 type of underlying implementation More...
 
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
 
using 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.
 
using CollectiveCommunication = Communication
 
typedef Grid::ctype ctype
 type used for coordinates in grid
 

Static Public Attributes

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

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

Interface for the implementor

Implementation impl_
 
 GridView (const Implementation &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
 
bool isConforming () const
 return true if current state of grid view represents a conforming grid
 
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 Communicationcomm () const
 obtain 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 >
auto communicate (CommDataHandleIF< DataHandleImp, DataType > &data, InterfaceType iftype, CommunicationDirection dir) const
 Communicate data on this view.
 
Implementationimpl ()
 access to the underlying implementation More...
 
const Implementationimpl () const
 access to the underlying implementation More...
 
template<class DataHandleImp , class DataType >
auto communicate (CommDataHandleIF< DataHandleImp, DataType > &data, InterfaceType iftype, CommunicationDirection dir, std::integral_constant< bool, false >) const
 Communicate data on this view.
 
template<class DataHandleImp , class DataType >
auto communicate (CommDataHandleIF< DataHandleImp, DataType > &data, InterfaceType iftype, CommunicationDirection dir, std::integral_constant< bool, true >) const
 Communicate data on this view.
 
bool isConformingDefaultImplementation () 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.


The documentation for this class was generated from the following files:
Creative Commons License   |  Legal Statements / Impressum  |  Hosted by TU Dresden  |  generated with Hugo v0.111.3 (Dec 20, 23:31, 2024)