5#ifndef DUNE_GRID_COMMON_DEFAULTGRIDVIEW_HH
6#define DUNE_GRID_COMMON_DEFAULTGRIDVIEW_HH
8#include <dune/common/typetraits.hh>
9#include <dune/common/exceptions.hh>
17 template<
class Gr
idImp >
18 class DefaultLevelGridView;
20 template<
class Gr
idImp >
21 class DefaultLeafGridView;
24 template<
class Gr
idImp >
30 typedef typename std::remove_const<GridImp>::type
Grid;
33 typedef typename Grid :: Traits :: LevelIndexSet
IndexSet;
39 typedef typename Grid :: Traits :: LevelIntersectionIterator
46 [[deprecated(
"Use Communication instead!")]]
52 typedef typename Grid :: Traits
63 template< PartitionIteratorType pit >
73 constexpr static bool conforming = Capabilities :: isLevelwiseConforming< Grid > :: v;
77 template<
class Gr
idImp >
101 [[deprecated(
"Use Communication instead!")]]
125 return grid().levelIndexSet( level_ );
134 return grid().size( level_, codim );
140 return grid().size( level_, type );
147 return grid().template lbegin< cd, All_Partition >( level_ );
151 template<
int cd, PartitionIteratorType pit >
154 return grid().template lbegin< cd, pit >( level_ );
161 return grid().template lend< cd, All_Partition >( level_ );
165 template<
int cd, PartitionIteratorType pit >
168 return grid().template lend< cd, pit >( level_ );
175 return entity.impl().ilevelbegin();
182 return entity.impl().ilevelend();
188 return grid().comm();
194 return grid().overlapSize(level_, codim);
200 return grid().ghostSize(level_, codim);
204 template<
class DataHandleImp,
class DataType >
209 return grid().communicate( data, iftype, dir, level_ );
218 template<
class Gr
idImp >
223 typedef typename std::remove_const<GridImp>::type
Grid;
226 typedef typename Grid :: Traits :: LeafIndexSet
IndexSet;
232 typedef typename Grid :: Traits :: LeafIntersectionIterator
239 [[deprecated(
"Use Communication instead!")]]
245 typedef typename Grid :: Traits
256 template <PartitionIteratorType pit >
266 constexpr static bool conforming = Capabilities :: isLeafwiseConforming< Grid > :: v;
270 template<
class Gr
idImp >
294 [[deprecated(
"Use Communication instead!")]]
318 return grid().leafIndexSet();
327 return grid().size( codim );
333 return grid().size( type );
340 return grid().template leafbegin< cd, All_Partition >();
344 template<
int cd, PartitionIteratorType pit >
347 return grid().template leafbegin< cd, pit >();
354 return grid().template leafend< cd, All_Partition >();
358 template<
int cd, PartitionIteratorType pit >
361 return grid().template leafend< cd, pit >();
368 return entity.impl().ileafbegin();
375 return entity.impl().ileafend();
381 return grid().comm();
387 return grid().overlapSize(codim);
393 return grid().ghostSize(codim);
397 template<
class DataHandleImp,
class DataType >
402 return grid().communicate( data, iftype, dir );
CommunicationDirection
Define a type for communication direction parameter.
Definition: gridenums.hh:170
InterfaceType
Parameter to be used for the communication functions.
Definition: gridenums.hh:86
Include standard header files.
Definition: agrid.hh:60
GeometryType
Type representing VTK's entity geometry types.
Definition: common.hh:132
CommDataHandleIF describes the features of a data handle for communication in parallel runs using the...
Definition: datahandleif.hh:78
Definition: defaultgridview.hh:79
Codim< cd >::template Partition< pit >::Iterator begin() const
obtain begin iterator for this view
Definition: defaultgridview.hh:152
int size(const GeometryType &type) const
obtain number of entities with a given geometry type
Definition: defaultgridview.hh:138
Codim< cd >::Iterator begin() const
obtain begin iterator for this view
Definition: defaultgridview.hh:145
Communication CollectiveCommunication
Definition: defaultgridview.hh:102
IntersectionIterator iend(const typename Codim< 0 > ::Entity &entity) const
obtain end intersection iterator with respect to this view
Definition: defaultgridview.hh:180
Codim< cd >::template Partition< pit >::Iterator end() const
obtain end iterator for this view
Definition: defaultgridview.hh:166
DefaultLevelGridViewTraits< GridImp > Traits
Definition: defaultgridview.hh:83
const IndexSet & indexSet() const
obtain the index set
Definition: defaultgridview.hh:123
const Communication & comm() const
obtain communication object
Definition: defaultgridview.hh:186
static constexpr bool conforming
Definition: defaultgridview.hh:108
Traits::IndexSet IndexSet
type of the index set
Definition: defaultgridview.hh:89
void communicate(CommDataHandleIF< DataHandleImp, DataType > &data, InterfaceType iftype, CommunicationDirection dir) const
Definition: defaultgridview.hh:205
Traits::IntersectionIterator IntersectionIterator
type of the intersection iterator
Definition: defaultgridview.hh:95
int size(int codim) const
obtain number of entities in a given codimension
Definition: defaultgridview.hh:132
int overlapSize(int codim) const
Return size of the overlap region for a given codim on the grid view.
Definition: defaultgridview.hh:192
Codim< cd >::Iterator end() const
obtain end iterator for this view
Definition: defaultgridview.hh:159
IntersectionIterator ibegin(const typename Codim< 0 > ::Entity &entity) const
obtain begin intersection iterator with respect to this view
Definition: defaultgridview.hh:173
DefaultLevelGridView(const Grid &grid, int level)
Definition: defaultgridview.hh:110
Traits::Intersection Intersection
type of the intersection
Definition: defaultgridview.hh:92
Grid::Traits::Communication Communication
type of the communication
Definition: defaultgridview.hh:98
bool isConforming() const
return true if current state of grid view represents a conforming grid
Definition: defaultgridview.hh:129
int ghostSize(int codim) const
Return size of the ghost region for a given codim on the grid view.
Definition: defaultgridview.hh:198
Traits::Grid Grid
type of the grid
Definition: defaultgridview.hh:86
const Grid & grid() const
obtain a const reference to the underlying hierarchic grid
Definition: defaultgridview.hh:116
Definition: defaultgridview.hh:272
void communicate(CommDataHandleIF< DataHandleImp, DataType > &data, InterfaceType iftype, CommunicationDirection dir) const
Definition: defaultgridview.hh:398
DefaultLeafGridViewTraits< GridImp > Traits
Definition: defaultgridview.hh:276
Communication CollectiveCommunication
Definition: defaultgridview.hh:295
Codim< cd >::template Partition< pit >::Iterator end() const
obtain end iterator for this view
Definition: defaultgridview.hh:359
const Grid & grid() const
obtain a const reference to the underlying hierarchic grid
Definition: defaultgridview.hh:309
Codim< cd >::template Partition< pit >::Iterator begin() const
obtain begin iterator for this view
Definition: defaultgridview.hh:345
IntersectionIterator ibegin(const typename Codim< 0 > ::Entity &entity) const
obtain begin intersection iterator with respect to this view
Definition: defaultgridview.hh:366
Traits::Intersection Intersection
type of the intersection
Definition: defaultgridview.hh:285
IntersectionIterator iend(const typename Codim< 0 > ::Entity &entity) const
obtain end intersection iterator with respect to this view
Definition: defaultgridview.hh:373
Codim< cd >::Iterator end() const
obtain end iterator for this view
Definition: defaultgridview.hh:352
Traits::Grid Grid
type of the grid
Definition: defaultgridview.hh:279
int size(const GeometryType &type) const
obtain number of entities with a given geometry type
Definition: defaultgridview.hh:331
bool isConforming() const
return true if current state of grid view represents a conforming grid
Definition: defaultgridview.hh:322
Traits::IndexSet IndexSet
type of the index set
Definition: defaultgridview.hh:282
const Communication & comm() const
obtain communication object
Definition: defaultgridview.hh:379
Grid::Traits::Communication Communication
type of the communication
Definition: defaultgridview.hh:291
DefaultLeafGridView(const Grid &grid)
Definition: defaultgridview.hh:304
int overlapSize(int codim) const
Return size of the overlap region for a given codim on the grid view.
Definition: defaultgridview.hh:385
Codim< cd >::Iterator begin() const
obtain begin iterator for this view
Definition: defaultgridview.hh:338
int ghostSize(int codim) const
Return size of the ghost region for a given codim on the grid view.
Definition: defaultgridview.hh:391
int size(int codim) const
obtain number of entities in a given codimension
Definition: defaultgridview.hh:325
const IndexSet & indexSet() const
obtain the index set
Definition: defaultgridview.hh:316
Traits::IntersectionIterator IntersectionIterator
type of the intersection iterator
Definition: defaultgridview.hh:288
static constexpr bool conforming
Definition: defaultgridview.hh:301
Definition: defaultgridview.hh:26
Grid::Traits::Communication Communication
type of the communication
Definition: defaultgridview.hh:43
static constexpr bool conforming
Definition: defaultgridview.hh:73
Grid::Traits::LevelIntersection Intersection
type of the intersection
Definition: defaultgridview.hh:36
Grid::Traits::LevelIntersectionIterator IntersectionIterator
type of the intersection iterator
Definition: defaultgridview.hh:40
Grid::Traits::LevelIndexSet IndexSet
type of the index set
Definition: defaultgridview.hh:33
Communication CollectiveCommunication
Definition: defaultgridview.hh:47
std::remove_const< GridImp >::type Grid
type of the grid
Definition: defaultgridview.hh:30
DefaultLevelGridView< GridImp > GridViewImp
Definition: defaultgridview.hh:27
Definition: defaultgridview.hh:51
Grid::Traits::template Codim< cd >::template Partition< All_Partition >::LevelIterator Iterator
Definition: defaultgridview.hh:54
Grid::Traits::template Codim< cd >::Entity Entity
Definition: defaultgridview.hh:56
Grid::template Codim< cd >::Geometry Geometry
Definition: defaultgridview.hh:58
Grid::template Codim< cd >::LocalGeometry LocalGeometry
Definition: defaultgridview.hh:60
Define types needed to iterate over entities of a given partition type.
Definition: defaultgridview.hh:65
Grid::template Codim< cd >::template Partition< pit >::LevelIterator Iterator
iterator over a given codim and partition type
Definition: defaultgridview.hh:69
Codim Structure.
Definition: defaultgridview.hh:106
Definition: defaultgridview.hh:219
std::remove_const< GridImp >::type Grid
type of the grid
Definition: defaultgridview.hh:223
DefaultLeafGridView< GridImp > GridViewImp
Definition: defaultgridview.hh:220
static constexpr bool conforming
Definition: defaultgridview.hh:266
Communication CollectiveCommunication
Definition: defaultgridview.hh:240
Grid::Traits::LeafIntersectionIterator IntersectionIterator
type of the intersection iterator
Definition: defaultgridview.hh:233
Grid::Traits::LeafIntersection Intersection
type of the intersection
Definition: defaultgridview.hh:229
Grid::Traits::LeafIndexSet IndexSet
type of the index set
Definition: defaultgridview.hh:226
Grid::Traits::Communication Communication
type of the communication
Definition: defaultgridview.hh:236
Definition: defaultgridview.hh:244
Grid::Traits::template Codim< cd >::template Partition< All_Partition >::LeafIterator Iterator
Definition: defaultgridview.hh:247
Grid::Traits::template Codim< cd >::Entity Entity
Definition: defaultgridview.hh:249
Grid::template Codim< cd >::Geometry Geometry
Definition: defaultgridview.hh:251
Grid::template Codim< cd >::LocalGeometry LocalGeometry
Definition: defaultgridview.hh:253
Define types needed to iterate over entities of a given partition type.
Definition: defaultgridview.hh:258
Grid::template Codim< cd >::template Partition< pit >::LeafIterator Iterator
iterator over a given codim and partition type
Definition: defaultgridview.hh:262
Codim Structure.
Definition: defaultgridview.hh:299
Mesh entities of codimension 0 ("elements") allow to visit all intersections with "neighboring" eleme...
Definition: common/intersectioniterator.hh:83
Grid abstract base class.
Definition: common/grid.hh:375
A set of traits classes to store static information about grid implementation.