3#include <dune/common/typetraits.hh>
4#include <dune/common/exceptions.hh>
5#include <dune/common/std/type_traits.hh>
7#include <dune/grid/common/capabilities.hh>
8#include <dune/grid/common/gridview.hh>
18 template <
class Gr
idImp>
19 class DefaultLevelGridView;
21 template <
class Gr
idImp>
22 class DefaultLeafGridView;
25 template <
class Gr
idImp>
31 using Grid = std::remove_const_t<GridImp>;
34 using IndexSet =
typename Grid::Traits::LevelIndexSet;
48 using Entity =
typename Grid::Traits::template Codim<cd>::Entity;
49 using Geometry =
typename Grid::template Codim<cd>::Geometry;
50 using LocalGeometry =
typename Grid::template Codim<cd>::LocalGeometry;
53 template <Dune::PartitionIteratorType pit>
63 enum { conforming = Dune::Capabilities::isLevelwiseConforming<Grid>::v };
67 template <
class Gr
idImp>
79 using Codim =
typename Traits::template Codim<cd>;
81 enum { conforming = Traits::conforming };
99 return grid().levelIndexSet(level_);
105 return grid().size(level_, codim);
109 int size(Dune::GeometryType
const& type)
const
111 return grid().size(level_, type);
115 template <
int cd, Dune::PartitionIteratorType pit = Dune::All_Partition>
116 typename Codim<cd>::template Partition<pit>::Iterator
begin()
const
118 return grid().template lbegin<cd, pit>(level_);
122 template <
int cd, Dune::PartitionIteratorType pit = Dune::All_Partition>
123 typename Codim<cd>::template Partition<pit>::Iterator
end()
const
125 return grid().template lend<cd, pit>(level_);
129 IntersectionIterator
ibegin(
typename Codim<0>::Entity
const& entity)
const
131 return grid().ilevelbegin(entity);
135 IntersectionIterator
iend(
typename Codim<0>::Entity
const& entity)
const
137 return grid().ilevelend(entity);
143 return grid().isLevelwiseConforming(level_);
147 Communication
const&
comm()
const
149 return grid().comm();
155 return grid().overlapSize(level_, codim);
161 return grid().ghostSize(level_, codim);
165 template <
class DataHandleImp,
class DataType>
166 void communicate(Dune::CommDataHandleIF<DataHandleImp, DataType>& data,
167 Dune::InterfaceType iftype,
168 Dune::CommunicationDirection dir)
const
170 return grid().communicate(data, iftype, dir, level_);
179 template <
class Gr
idImp>
185 using Grid = std::remove_const_t<GridImp>;
188 using IndexSet =
typename Grid::Traits::LeafIndexSet;
202 using Entity =
typename Grid::Traits::template Codim<cd>::Entity;
203 using Geometry =
typename Grid::template Codim<cd>::Geometry;
204 using LocalGeometry =
typename Grid::template Codim<cd>::LocalGeometry;
207 template <Dune::PartitionIteratorType pit>
217 enum { conforming = Dune::Capabilities::isLeafwiseConforming<Grid>::v };
221 template <
class Gr
idImp>
233 using Codim =
typename Traits::template Codim<cd>;
235 enum { conforming = Traits::conforming };
252 return grid().leafIndexSet();
258 return grid().size(codim);
262 int size(Dune::GeometryType
const& type)
const
264 return grid().size(type);
269 template <
int cd, Dune::PartitionIteratorType pit = Dune::All_Partition>
270 typename Codim<cd>::template Partition<pit>::Iterator
begin()
const
272 return grid().template leafbegin<cd, pit>();
276 template <
int cd, Dune::PartitionIteratorType pit = Dune::All_Partition>
277 typename Codim<cd>::template Partition<pit>::Iterator
end()
const
279 return grid().template leafend<cd, pit>();
283 IntersectionIterator
ibegin(
typename Codim<0>::Entity
const& entity)
const
285 return grid().ileafbegin(entity);
289 IntersectionIterator
iend(
typename Codim<0>::Entity
const& entity)
const
291 return grid().ileafend(entity);
297 return grid().isLeafwiseConforming();
301 Communication
const&
comm()
const
303 return grid().comm();
309 return grid().overlapSize(codim);
315 return grid().ghostSize(codim);
319 template <
class DataHandleImp,
class DataType>
320 void communicate(Dune::CommDataHandleIF<DataHandleImp, DataType>& data,
321 Dune::InterfaceType iftype,
322 Dune::CommunicationDirection dir)
const
324 return grid().communicate(data, iftype, dir);
Definition DefaultGridView.hpp:223
IntersectionIterator ibegin(typename Codim< 0 >::Entity const &entity) const
Obtain begin intersection iterator with respect to this view.
Definition DefaultGridView.hpp:283
IndexSet const & indexSet() const
Obtain the index set.
Definition DefaultGridView.hpp:250
int size(Dune::GeometryType const &type) const
Obtain number of entities with a given geometry type.
Definition DefaultGridView.hpp:262
void communicate(Dune::CommDataHandleIF< DataHandleImp, DataType > &data, Dune::InterfaceType iftype, Dune::CommunicationDirection dir) const
Communicate data on this view.
Definition DefaultGridView.hpp:320
int ghostSize(int codim) const
Return size of the ghost region for a given codim on the grid view.
Definition DefaultGridView.hpp:313
int overlapSize(int codim) const
Return size of the overlap region for a given codim on the grid view.
Definition DefaultGridView.hpp:307
Codim< cd >::template Partition< pit >::Iterator end() const
Obtain end iterator for this view.
Definition DefaultGridView.hpp:277
bool isConforming() const
Return true if current state of grid view represents a conforming grid.
Definition DefaultGridView.hpp:295
IntersectionIterator iend(typename Codim< 0 >::Entity const &entity) const
Obtain end intersection iterator with respect to this view.
Definition DefaultGridView.hpp:289
Communication const & comm() const
Obtain collective communication object.
Definition DefaultGridView.hpp:301
Grid const & grid() const
obtain a const reference to the underlying hierarchic grid
Definition DefaultGridView.hpp:243
Codim< cd >::template Partition< pit >::Iterator begin() const
Obtain begin iterator for this view.
Definition DefaultGridView.hpp:270
int size(int codim) const
Obtain number of entities in a given codimension.
Definition DefaultGridView.hpp:256
Definition DefaultGridView.hpp:69
IntersectionIterator ibegin(typename Codim< 0 >::Entity const &entity) const
Obtain begin intersection iterator with respect to this view.
Definition DefaultGridView.hpp:129
IndexSet const & indexSet() const
Obtain the index set.
Definition DefaultGridView.hpp:97
int size(Dune::GeometryType const &type) const
Obtain number of entities with a given geometry type.
Definition DefaultGridView.hpp:109
void communicate(Dune::CommDataHandleIF< DataHandleImp, DataType > &data, Dune::InterfaceType iftype, Dune::CommunicationDirection dir) const
Communicate data on this view.
Definition DefaultGridView.hpp:166
int ghostSize(int codim) const
Return size of the ghost region for a given codim on the grid view.
Definition DefaultGridView.hpp:159
int overlapSize(int codim) const
Return size of the overlap region for a given codim on the grid view.
Definition DefaultGridView.hpp:153
Codim< cd >::template Partition< pit >::Iterator end() const
Obtain end iterator for this view.
Definition DefaultGridView.hpp:123
bool isConforming() const
Return true if current state of grid view represents a conforming grid.
Definition DefaultGridView.hpp:141
IntersectionIterator iend(typename Codim< 0 >::Entity const &entity) const
Obtain end intersection iterator with respect to this view.
Definition DefaultGridView.hpp:135
Communication const & comm() const
Obtain collective communication object.
Definition DefaultGridView.hpp:147
Grid const & grid() const
Obtain a const reference to the underlying hierarchic grid.
Definition DefaultGridView.hpp:90
Codim< cd >::template Partition< pit >::Iterator begin() const
Obtain begin iterator for this view.
Definition DefaultGridView.hpp:116
int size(int codim) const
Obtain number of entities in a given codimension.
Definition DefaultGridView.hpp:103
Define types needed to iterate over entities of a given partition type.
Definition DefaultGridView.hpp:209
typename Grid::template Codim< cd >::template Partition< pit >::LeafIterator Iterator
iterator over a given codim and partition type
Definition DefaultGridView.hpp:211
Definition DefaultGridView.hpp:201
Definition DefaultGridView.hpp:181
std::remove_const_t< GridImp > Grid
type of the grid
Definition DefaultGridView.hpp:185
typename Grid::Traits::LeafIntersection Intersection
type of the intersection
Definition DefaultGridView.hpp:191
typename Grid::Traits::LeafIndexSet IndexSet
type of the index set
Definition DefaultGridView.hpp:188
typename Grid::Traits::Communication Communication
type of the collective communication
Definition DefaultGridView.hpp:197
typename Grid::Traits::LeafIntersectionIterator IntersectionIterator
type of the intersection iterator
Definition DefaultGridView.hpp:194
Define types needed to iterate over entities of a given partition type.
Definition DefaultGridView.hpp:55
typename Grid::template Codim< cd >::template Partition< pit >::LevelIterator Iterator
iterator over a given codim and partition type
Definition DefaultGridView.hpp:57
Definition DefaultGridView.hpp:47
Definition DefaultGridView.hpp:27
std::remove_const_t< GridImp > Grid
type of the grid
Definition DefaultGridView.hpp:31
typename Grid::Traits::Communication Communication
type of the collective communication
Definition DefaultGridView.hpp:43
typename Grid::Traits::LevelIntersection Intersection
type of the intersection
Definition DefaultGridView.hpp:37
typename Grid::Traits::LevelIntersectionIterator IntersectionIterator
type of the intersection iterator
Definition DefaultGridView.hpp:40
typename Grid::Traits::LevelIndexSet IndexSet
type of the index set
Definition DefaultGridView.hpp:34