5#ifndef DUNE_ALBERTAGRID_GRIDVIEW_HH
6#define DUNE_ALBERTAGRID_GRIDVIEW_HH
10#include <dune/common/typetraits.hh>
11#include <dune/common/exceptions.hh>
21 template<
class Gr
idImp >
22 class AlbertaLevelGridView;
24 template<
class Gr
idImp >
25 class AlbertaLeafGridView;
28 template<
class Gr
idImp >
34 typedef typename std::remove_const<GridImp>::type
Grid;
37 typedef typename Grid::Traits::LevelIndexSet
IndexSet;
43 typedef typename Grid::Traits::LevelIntersectionIterator
50 [[deprecated(
"Use Communication instead!")]]
65 template< PartitionIteratorType pit >
78 template<
class Gr
idImp >
102 [[deprecated(
"Use Communication instead!")]]
119 indexSet_( &(
grid.levelIndexSet( level )) ),
126 : grid_( other.grid_ ),
127 indexSet_( other.indexSet_ ),
128 level_( other.level_ )
132 ThisType &operator= (
const ThisType & other)
135 indexSet_ = other.indexSet_;
136 level_ = other.level_;
162 int size (
const GeometryType &type )
const
164 return grid().size( level_, type );
175 template<
int cd, PartitionIteratorType pit >
189 template<
int cd, PartitionIteratorType pit >
199 if(
grid().maxLevel() == 0)
223 return grid().comm();
233 template<
class DataHandleImp,
class DataType >
246 template<
class Gr
idImp >
252 typedef typename std::remove_const<GridImp>::type
Grid;
255 typedef typename Grid::Traits::LeafIndexSet
IndexSet;
261 typedef typename Grid::Traits::LeafIntersectionIterator
268 [[deprecated(
"Use Communication instead!")]]
284 template <PartitionIteratorType pit >
297 template<
class Gr
idImp >
321 [[deprecated(
"Use Communication instead!")]]
338 indexSet_( &(
grid.leafIndexSet()) )
344 : grid_( other.grid_ ),
345 indexSet_( other.indexSet_ )
349 ThisType &operator= (
const ThisType & other)
352 indexSet_ = other.indexSet_;
378 int size (
const GeometryType &type )
const
380 return grid().size( type );
391 template<
int cd, PartitionIteratorType pit >
405 template<
int cd, PartitionIteratorType pit >
415 const ElementInfo elementInfo = entity.impl().elementInfo();
421 if( elementInfo.
elInfo().opp_vertex[ i ] == 127 )
434 assert( !!entity.impl().elementInfo() );
442 return grid().comm();
452 template<
class DataHandleImp,
class DataType >
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
Definition elementinfo.hh:43
ALBERTA EL_INFO & elInfo() const
Definition elementinfo.hh:744
Definition albertagrid/intersectioniterator.hh:27
Definition albertagrid/gridview.hh:80
Traits::Intersection Intersection
type of the intersection
Definition albertagrid/gridview.hh:93
int size(const GeometryType &type) const
obtain number of entities with a given geometry type
Definition albertagrid/gridview.hh:162
void communicate(CommDataHandleIF< DataHandleImp, DataType > &data, InterfaceType iftype, CommunicationDirection dir) const
Definition albertagrid/gridview.hh:234
const Communication & comm() const
obtain communication object
Definition albertagrid/gridview.hh:221
Traits::Communication Communication
type of the communication
Definition albertagrid/gridview.hh:99
Traits::IndexSet IndexSet
type of the index set
Definition albertagrid/gridview.hh:90
IntersectionIterator iend(const typename Codim< 0 >::Entity &entity) const
obtain end intersection iterator with respect to this view
Definition albertagrid/gridview.hh:214
Codim< cd >::template Partition< pit >::Iterator begin() const
obtain begin iterator for this view
Definition albertagrid/gridview.hh:176
AlbertaLevelGridView(const Grid &grid, int level)
Definition albertagrid/gridview.hh:117
Traits::Grid Grid
type of the grid
Definition albertagrid/gridview.hh:87
const Grid & grid() const
obtain a const reference to the underlying hierarchic grid
Definition albertagrid/gridview.hh:141
int size(int codim) const
obtain number of entities in a given codimension
Definition albertagrid/gridview.hh:156
bool isConforming() const
return true if current state of grid view represents a conforming grid
Definition albertagrid/gridview.hh:153
AlbertaLevelGridViewTraits< GridImp > Traits
Definition albertagrid/gridview.hh:84
static constexpr bool conforming
Definition albertagrid/gridview.hh:109
int ghostSize(int codim) const
Return size of the ghost region for a given codim on the grid view.
Definition albertagrid/gridview.hh:230
Codim< cd >::Iterator end() const
obtain end iterator for this view
Definition albertagrid/gridview.hh:183
Codim< cd >::Iterator begin() const
obtain begin iterator for this view
Definition albertagrid/gridview.hh:169
const IndexSet & indexSet() const
obtain the index set
Definition albertagrid/gridview.hh:147
Traits::IntersectionIterator IntersectionIterator
type of the intersection iterator
Definition albertagrid/gridview.hh:96
int overlapSize(int codim) const
Return size of the overlap region for a given codim on the grid view.
Definition albertagrid/gridview.hh:227
Codim< cd >::template Partition< pit >::Iterator end() const
obtain end iterator for this view
Definition albertagrid/gridview.hh:190
Communication CollectiveCommunication
Definition albertagrid/gridview.hh:103
IntersectionIterator ibegin(const typename Codim< 0 >::Entity &entity) const
obtain begin intersection iterator with respect to this view
Definition albertagrid/gridview.hh:197
Definition albertagrid/gridview.hh:299
AlbertaLeafGridView(const Grid &grid)
Definition albertagrid/gridview.hh:336
Traits::Communication Communication
type of the communication
Definition albertagrid/gridview.hh:318
Traits::IndexSet IndexSet
type of the index set
Definition albertagrid/gridview.hh:309
int ghostSize(int codim) const
Return size of the ghost region for a given codim on the grid view.
Definition albertagrid/gridview.hh:449
int size(int codim) const
obtain number of entities in a given codimension
Definition albertagrid/gridview.hh:372
AlbertaLeafGridViewTraits< GridImp > Traits
Definition albertagrid/gridview.hh:303
bool isConforming() const
return true if current state of grid view represents a conforming grid
Definition albertagrid/gridview.hh:369
Codim< cd >::Iterator begin() const
obtain begin iterator for this view
Definition albertagrid/gridview.hh:385
static constexpr bool conforming
Definition albertagrid/gridview.hh:328
const Grid & grid() const
obtain a const reference to the underlying hierarchic grid
Definition albertagrid/gridview.hh:357
Traits::Grid Grid
type of the grid
Definition albertagrid/gridview.hh:306
Codim< cd >::template Partition< pit >::Iterator end() const
obtain end iterator for this view
Definition albertagrid/gridview.hh:406
void communicate(CommDataHandleIF< DataHandleImp, DataType > &data, InterfaceType iftype, CommunicationDirection dir) const
Definition albertagrid/gridview.hh:453
Communication CollectiveCommunication
Definition albertagrid/gridview.hh:322
IntersectionIterator ibegin(const typename Codim< 0 >::Entity &entity) const
obtain begin intersection iterator with respect to this view
Definition albertagrid/gridview.hh:413
int size(const GeometryType &type) const
obtain number of entities with a given geometry type
Definition albertagrid/gridview.hh:378
IntersectionIterator iend(const typename Codim< 0 >::Entity &entity) const
obtain end intersection iterator with respect to this view
Definition albertagrid/gridview.hh:432
Traits::IntersectionIterator IntersectionIterator
type of the intersection iterator
Definition albertagrid/gridview.hh:315
const IndexSet & indexSet() const
obtain the index set
Definition albertagrid/gridview.hh:363
Traits::Intersection Intersection
type of the intersection
Definition albertagrid/gridview.hh:312
const Communication & comm() const
obtain communication object
Definition albertagrid/gridview.hh:440
Codim< cd >::Iterator end() const
obtain end iterator for this view
Definition albertagrid/gridview.hh:399
int overlapSize(int codim) const
Return size of the overlap region for a given codim on the grid view.
Definition albertagrid/gridview.hh:446
Codim< cd >::template Partition< pit >::Iterator begin() const
obtain begin iterator for this view
Definition albertagrid/gridview.hh:392
Definition albertagrid/gridview.hh:30
Communication CollectiveCommunication
Definition albertagrid/gridview.hh:51
Grid::Traits::Communication Communication
type of the communication
Definition albertagrid/gridview.hh:47
Grid::Traits::LevelIntersection Intersection
type of the intersection
Definition albertagrid/gridview.hh:40
std::remove_const< GridImp >::type Grid
type of the grid
Definition albertagrid/gridview.hh:34
AlbertaLevelGridView< GridImp > GridViewImp
Definition albertagrid/gridview.hh:31
static constexpr bool conforming
Definition albertagrid/gridview.hh:74
Grid::Traits::LevelIntersectionIterator IntersectionIterator
type of the intersection iterator
Definition albertagrid/gridview.hh:44
Grid::Traits::LevelIndexSet IndexSet
type of the index set
Definition albertagrid/gridview.hh:37
Definition albertagrid/gridview.hh:55
Grid::template Codim< cd >::LocalGeometry LocalGeometry
Definition albertagrid/gridview.hh:62
Grid::Traits::template Codim< cd >::Entity Entity
Definition albertagrid/gridview.hh:58
Grid::Traits::template Codim< cd >::template Partition< All_Partition >::LevelIterator Iterator
Definition albertagrid/gridview.hh:56
Grid::template Codim< cd >::Geometry Geometry
Definition albertagrid/gridview.hh:60
Define types needed to iterate over entities of a given partition type.
Definition albertagrid/gridview.hh:67
Grid::template Codim< cd >::template Partition< pit >::LevelIterator Iterator
iterator over a given codim and partition type
Definition albertagrid/gridview.hh:70
Codim Structure.
Definition albertagrid/gridview.hh:107
Definition albertagrid/gridview.hh:248
Grid::Traits::LeafIntersectionIterator IntersectionIterator
type of the intersection iterator
Definition albertagrid/gridview.hh:262
std::remove_const< GridImp >::type Grid
type of the grid
Definition albertagrid/gridview.hh:252
Grid::Traits::Communication Communication
type of the communication
Definition albertagrid/gridview.hh:265
Grid::Traits::LeafIndexSet IndexSet
type of the index set
Definition albertagrid/gridview.hh:255
Communication CollectiveCommunication
Definition albertagrid/gridview.hh:269
AlbertaLeafGridView< GridImp > GridViewImp
Definition albertagrid/gridview.hh:249
static constexpr bool conforming
Definition albertagrid/gridview.hh:293
Grid::Traits::LeafIntersection Intersection
type of the intersection
Definition albertagrid/gridview.hh:258
Definition albertagrid/gridview.hh:273
Grid::template Codim< cd >::LocalGeometry LocalGeometry
Definition albertagrid/gridview.hh:281
Grid::template Codim< cd >::Geometry Geometry
Definition albertagrid/gridview.hh:279
Grid::Traits::template Codim< cd >::template Partition< All_Partition >::LeafIterator Iterator
Definition albertagrid/gridview.hh:275
Grid::Traits::template Codim< cd >::Entity Entity
Definition albertagrid/gridview.hh:277
Define types needed to iterate over entities of a given partition type.
Definition albertagrid/gridview.hh:286
Grid::template Codim< cd >::template Partition< pit >::LeafIterator Iterator
iterator over a given codim and partition type
Definition albertagrid/gridview.hh:289
Codim Structure.
Definition albertagrid/gridview.hh:326
Definition albertagrid/intersectioniterator.hh:35
Definition albertagrid/intersectioniterator.hh:36
Specialize with 'true' if implementation guarantees conforming level grids. (default=false)
Definition common/capabilities.hh:106
Specialize with 'true' if implementation guarantees a conforming leaf grid. (default=false)
Definition common/capabilities.hh:115
Mesh entities of codimension 0 ("elements") allow to visit all intersections with "neighboring" eleme...
Definition common/intersectioniterator.hh:83
Index Set Interface base class.
Definition indexidset.hh:78
Grid abstract base class.
Definition common/grid.hh:375
static constexpr int dimension
The dimension of the grid.
Definition common/grid.hh:387
A Traits struct that collects all associated types of one implementation.
Definition common/grid.hh:411
A set of traits classes to store static information about grid implementation.
Implementation of the IntersectionIterator for AlbertaGrid.