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;
43 using CollectiveCommunication_t =
typename G::Traits::Communication;
44 using CollectiveCommunication = Dune::Std::detected_t<CollectiveCommunication_t, Grid>;
49 using Communication = Dune::Std::detected_or_t<CollectiveCommunication, Communication_t, Grid>;
54 using Entity =
typename Grid::Traits::template Codim<cd>::Entity;
55 using Geometry =
typename Grid::template Codim<cd>::Geometry;
56 using LocalGeometry =
typename Grid::template Codim<cd>::LocalGeometry;
59 template <Dune::PartitionIteratorType pit>
69 enum { conforming = Dune::Capabilities::isLevelwiseConforming<Grid>::v };
73 template <
class Gr
idImp>
82 using CollectiveCommunication =
typename Traits::CollectiveCommunication;
83 using Communication =
typename Traits::Communication;
86 using Codim =
typename Traits::template Codim<cd>;
88 enum { conforming = Traits::conforming };
106 return grid().levelIndexSet(level_);
112 return grid().size(level_, codim);
116 int size(Dune::GeometryType
const& type)
const
118 return grid().size(level_, type);
122 template <
int cd, Dune::PartitionIteratorType pit = Dune::All_Partition>
123 typename Codim<cd>::template Partition<pit>::Iterator
begin()
const
125 return grid().template lbegin<cd, pit>(level_);
129 template <
int cd, Dune::PartitionIteratorType pit = Dune::All_Partition>
130 typename Codim<cd>::template Partition<pit>::Iterator
end()
const
132 return grid().template lend<cd, pit>(level_);
136 IntersectionIterator
ibegin(
typename Codim<0>::Entity
const& entity)
const
138 return grid().ilevelbegin(entity);
142 IntersectionIterator
iend(
typename Codim<0>::Entity
const& entity)
const
144 return grid().ilevelend(entity);
150 return grid().isLevelwiseConforming(level_);
154 Communication
const&
comm()
const
156 return grid().comm();
162 return grid().overlapSize(level_, codim);
168 return grid().ghostSize(level_, codim);
172 template <
class DataHandleImp,
class DataType>
173 void communicate(Dune::CommDataHandleIF<DataHandleImp, DataType>& data,
174 Dune::InterfaceType iftype,
175 Dune::CommunicationDirection dir)
const
177 return grid().communicate(data, iftype, dir, level_);
186 template <
class Gr
idImp>
192 using Grid = std::remove_const_t<GridImp>;
195 using IndexSet =
typename Grid::Traits::LeafIndexSet;
204 using CollectiveCommunication_t =
typename G::Traits::Communication;
205 using CollectiveCommunication = Dune::Std::detected_t<CollectiveCommunication_t, Grid>;
210 using Communication = Dune::Std::detected_or_t<CollectiveCommunication, Communication_t, Grid>;
215 using Entity =
typename Grid::Traits::template Codim<cd>::Entity;
216 using Geometry =
typename Grid::template Codim<cd>::Geometry;
217 using LocalGeometry =
typename Grid::template Codim<cd>::LocalGeometry;
220 template <Dune::PartitionIteratorType pit>
230 enum { conforming = Dune::Capabilities::isLeafwiseConforming<Grid>::v };
234 template <
class Gr
idImp>
243 using CollectiveCommunication =
typename Traits::CollectiveCommunication;
244 using Communication =
typename Traits::Communication;
247 using Codim =
typename Traits::template Codim<cd>;
249 enum { conforming = Traits::conforming };
266 return grid().leafIndexSet();
272 return grid().size(codim);
276 int size(Dune::GeometryType
const& type)
const
278 return grid().size(type);
283 template <
int cd, Dune::PartitionIteratorType pit = Dune::All_Partition>
284 typename Codim<cd>::template Partition<pit>::Iterator
begin()
const
286 return grid().template leafbegin<cd, pit>();
290 template <
int cd, Dune::PartitionIteratorType pit = Dune::All_Partition>
291 typename Codim<cd>::template Partition<pit>::Iterator
end()
const
293 return grid().template leafend<cd, pit>();
297 IntersectionIterator
ibegin(
typename Codim<0>::Entity
const& entity)
const
299 return grid().ileafbegin(entity);
303 IntersectionIterator
iend(
typename Codim<0>::Entity
const& entity)
const
305 return grid().ileafend(entity);
311 return grid().isLeafwiseConforming();
315 Communication
const&
comm()
const
317 return grid().comm();
323 return grid().overlapSize(codim);
329 return grid().ghostSize(codim);
333 template <
class DataHandleImp,
class DataType>
334 void communicate(Dune::CommDataHandleIF<DataHandleImp, DataType>& data,
335 Dune::InterfaceType iftype,
336 Dune::CommunicationDirection dir)
const
338 return grid().communicate(data, iftype, dir);
Definition: DefaultGridView.hpp:236
IntersectionIterator ibegin(typename Codim< 0 >::Entity const &entity) const
Obtain begin intersection iterator with respect to this view.
Definition: DefaultGridView.hpp:297
IndexSet const & indexSet() const
Obtain the index set.
Definition: DefaultGridView.hpp:264
int size(Dune::GeometryType const &type) const
Obtain number of entities with a given geometry type.
Definition: DefaultGridView.hpp:276
void communicate(Dune::CommDataHandleIF< DataHandleImp, DataType > &data, Dune::InterfaceType iftype, Dune::CommunicationDirection dir) const
Communicate data on this view.
Definition: DefaultGridView.hpp:334
int ghostSize(int codim) const
Return size of the ghost region for a given codim on the grid view.
Definition: DefaultGridView.hpp:327
int overlapSize(int codim) const
Return size of the overlap region for a given codim on the grid view.
Definition: DefaultGridView.hpp:321
Codim< cd >::template Partition< pit >::Iterator end() const
Obtain end iterator for this view.
Definition: DefaultGridView.hpp:291
bool isConforming() const
Return true if current state of grid view represents a conforming grid.
Definition: DefaultGridView.hpp:309
IntersectionIterator iend(typename Codim< 0 >::Entity const &entity) const
Obtain end intersection iterator with respect to this view.
Definition: DefaultGridView.hpp:303
Communication const & comm() const
Obtain collective communication object.
Definition: DefaultGridView.hpp:315
Grid const & grid() const
obtain a const reference to the underlying hierarchic grid
Definition: DefaultGridView.hpp:257
Codim< cd >::template Partition< pit >::Iterator begin() const
Obtain begin iterator for this view.
Definition: DefaultGridView.hpp:284
int size(int codim) const
Obtain number of entities in a given codimension.
Definition: DefaultGridView.hpp:270
Definition: DefaultGridView.hpp:75
IntersectionIterator ibegin(typename Codim< 0 >::Entity const &entity) const
Obtain begin intersection iterator with respect to this view.
Definition: DefaultGridView.hpp:136
IndexSet const & indexSet() const
Obtain the index set.
Definition: DefaultGridView.hpp:104
int size(Dune::GeometryType const &type) const
Obtain number of entities with a given geometry type.
Definition: DefaultGridView.hpp:116
void communicate(Dune::CommDataHandleIF< DataHandleImp, DataType > &data, Dune::InterfaceType iftype, Dune::CommunicationDirection dir) const
Communicate data on this view.
Definition: DefaultGridView.hpp:173
int ghostSize(int codim) const
Return size of the ghost region for a given codim on the grid view.
Definition: DefaultGridView.hpp:166
int overlapSize(int codim) const
Return size of the overlap region for a given codim on the grid view.
Definition: DefaultGridView.hpp:160
Codim< cd >::template Partition< pit >::Iterator end() const
Obtain end iterator for this view.
Definition: DefaultGridView.hpp:130
bool isConforming() const
Return true if current state of grid view represents a conforming grid.
Definition: DefaultGridView.hpp:148
IntersectionIterator iend(typename Codim< 0 >::Entity const &entity) const
Obtain end intersection iterator with respect to this view.
Definition: DefaultGridView.hpp:142
Communication const & comm() const
Obtain collective communication object.
Definition: DefaultGridView.hpp:154
Grid const & grid() const
Obtain a const reference to the underlying hierarchic grid.
Definition: DefaultGridView.hpp:97
Codim< cd >::template Partition< pit >::Iterator begin() const
Obtain begin iterator for this view.
Definition: DefaultGridView.hpp:123
int size(int codim) const
Obtain number of entities in a given codimension.
Definition: DefaultGridView.hpp:110
Define types needed to iterate over entities of a given partition type.
Definition: DefaultGridView.hpp:222
typename Grid::template Codim< cd >::template Partition< pit >::LeafIterator Iterator
iterator over a given codim and partition type
Definition: DefaultGridView.hpp:224
Definition: DefaultGridView.hpp:214
Definition: DefaultGridView.hpp:188
std::remove_const_t< GridImp > Grid
type of the grid
Definition: DefaultGridView.hpp:192
typename Grid::Traits::LeafIntersection Intersection
type of the intersection
Definition: DefaultGridView.hpp:198
typename Grid::Traits::LeafIndexSet IndexSet
type of the index set
Definition: DefaultGridView.hpp:195
typename G::Traits::Communication Communication_t
type of the collective communication
Definition: DefaultGridView.hpp:209
typename Grid::Traits::LeafIntersectionIterator IntersectionIterator
type of the intersection iterator
Definition: DefaultGridView.hpp:201
Define types needed to iterate over entities of a given partition type.
Definition: DefaultGridView.hpp:61
typename Grid::template Codim< cd >::template Partition< pit >::LevelIterator Iterator
iterator over a given codim and partition type
Definition: DefaultGridView.hpp:63
Definition: DefaultGridView.hpp:53
Definition: DefaultGridView.hpp:27
std::remove_const_t< GridImp > Grid
type of the grid
Definition: DefaultGridView.hpp:31
typename Grid::Traits::LevelIntersection Intersection
type of the intersection
Definition: DefaultGridView.hpp:37
typename G::Traits::Communication Communication_t
type of the collective communication
Definition: DefaultGridView.hpp:48
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