3 #ifndef DUNE_DEFAULTGRIDVIEW_HH
4 #define DUNE_DEFAULTGRIDVIEW_HH
6 #include <dune/common/typetraits.hh>
7 #include <dune/common/exceptions.hh>
15 template<
class Gr
idImp, PartitionIteratorType pitype >
18 template<
class Gr
idImp, PartitionIteratorType pitype >
22 template<
class Gr
idImp, PartitionIteratorType pitype >
28 typedef typename remove_const<GridImp>::type
Grid;
31 typedef typename Grid :: Traits :: LevelIndexSet
IndexSet;
37 typedef typename Grid :: Traits :: LevelIntersectionIterator
46 typedef typename Grid :: Traits
59 template< PartitionIteratorType pit >
73 template<
class Gr
idImp, PartitionIteratorType pitype >
74 class DefaultLevelGridView
76 typedef DefaultLevelGridView< GridImp, pitype > ThisType;
110 : grid_( other.grid_ ),
111 level_( other.level_ )
115 ThisType &operator= (
const ThisType & other)
118 level_ = other.level_;
132 return grid().levelIndexSet( level_ );
138 return grid().size( level_, codim );
144 return grid().size( level_, type );
151 return grid().template lbegin< cd, pitype >( level_ );
155 template<
int cd, PartitionIteratorType pit >
158 return grid().template lbegin< cd, pit >( level_ );
165 return grid().template lend< cd, pitype >( level_ );
169 template<
int cd, PartitionIteratorType pit >
172 return grid().template lend< cd, pit >( level_ );
179 return entity.ilevelbegin();
186 return entity.ilevelend();
192 return grid().comm();
198 return grid().overlapSize(level_, codim);
204 return grid().ghostSize(level_, codim);
208 template<
class DataHandleImp,
class DataType >
213 return grid().communicate( data, iftype, dir, level_ );
222 template<
class Gr
idImp, PartitionIteratorType pitype >
227 typedef typename remove_const<GridImp>::type
Grid;
230 typedef typename Grid :: Traits :: LeafIndexSet
IndexSet;
236 typedef typename Grid :: Traits :: LeafIntersectionIterator
245 typedef typename Grid :: Traits
258 template <PartitionIteratorType pit >
272 template<
class Gr
idImp, PartitionIteratorType pitype >
273 class DefaultLeafGridView
275 typedef DefaultLeafGridView< GridImp, pitype > ThisType;
309 : grid_( other.grid_ )
313 ThisType &operator= (
const ThisType & other)
329 return grid().leafIndexSet();
335 return grid().size( codim );
341 return grid().size( type );
348 return grid().template leafbegin< cd, pitype >();
352 template<
int cd, PartitionIteratorType pit >
355 return grid().template leafbegin< cd, pit >();
362 return grid().template leafend< cd, pitype >();
366 template<
int cd, PartitionIteratorType pit >
369 return grid().template leafend< cd, pit >();
376 return entity.ileafbegin();
383 return entity.ileafend();
389 return grid().comm();
395 return grid().overlapSize(codim);
401 return grid().ghostSize(codim);
405 template<
class DataHandleImp,
class DataType >
410 return grid().communicate( data, iftype, dir );