1#ifndef DUNE_FEM_ADAPTIVELEAFGRIDPART_HH
2#define DUNE_FEM_ADAPTIVELEAFGRIDPART_HH
5#include <dune/grid/common/gridview.hh>
39 template <PartitionIteratorType ittype>
42 static const InterfaceType
value = InteriorBorder_All_Interface;
47 static const InterfaceType
value = InteriorBorder_InteriorBorder_Interface;
63 template<
class TraitsImp >
88 typedef typename GridType::LeafGridView LeafGridView;
112 std::unique_ptr< IndexSetType, typename IndexSetProviderType::Deleter >
indexSet_;
150 template<
int codim >
151 typename Codim< codim > :: IteratorType
154 return begin< codim, InteriorBorder_Partition >();
158 template<
int codim, PartitionIteratorType pitype >
159 typename Codim< codim > :: template Partition< pitype > :: IteratorType
166 template<
int codim >
167 typename Codim< codim > :: IteratorType
170 return end< codim, InteriorBorder_Partition >();
174 template<
int codim, PartitionIteratorType pitype >
175 typename Codim< codim > :: template Partition< pitype > :: IteratorType
198 return grid().maxLevel();
202 template<
class DataHandle,
class Data >
203 decltype( auto )
communicate ( CommDataHandleIF< DataHandle, Data > &data, InterfaceType iftype, CommunicationDirection dir )
const
227 template<
class Gr
id, PartitionIteratorType
idxpitype = All_Partition,
bool onlyCodimensionZero = false >
228 class AdaptiveLeafGridPart;
231 template<
class Gr
id, PartitionIteratorType
idxpitype ,
bool onlyCodimensionZero >
249 template <
int dummy,
bool onlyCodimZero >
278 template<
int codim >
287 template< PartitionIteratorType pitype >
295 static const bool conforming = Dune::Capabilities::isLeafwiseConforming< GridType > :: v;
298 template<
class Gr
id, PartitionIteratorType
idxpitype ,
bool onlyCodimensionZero >
300 :
public AdaptiveGridPartBase< AdaptiveLeafGridPartTraits< Grid, idxpitype, onlyCodimensionZero > >
301 ,
public AddGridView< AdaptiveLeafGridPartTraits< Grid, idxpitype, onlyCodimensionZero > >
340 template<
class Gr
id, PartitionIteratorType
idxpitype = All_Partition >
344 template<
class Gr
id, PartitionIteratorType
idxpitype = All_Partition >
354 template<
class Gr
id, PartitionIteratorType
idxpitype >
372 template<
class Gr
id, PartitionIteratorType
idxpitype >
401 namespace GridPartCapabilities
407 template<
class Gr
id, PartitionIteratorType
idxpitype,
bool onlyCodimensionZero >
410 static const bool v =
true;
413 template<
class Gr
id, PartitionIteratorType
idxpitype,
bool onlyCodimensionZero >
416 static const bool v = Dune::Capabilities::hasSingleGeometryType< Grid >::v;
418 = Dune::Capabilities::hasSingleGeometryType< Grid >::topologyId;
421 template<
class Gr
id, PartitionIteratorType
idxpitype,
bool onlyCodimensionZero >
424 static const bool v = Dune::Capabilities::isCartesian< Grid >::v;
427 template<
class Gr
id, PartitionIteratorType
idxpitype,
bool onlyCodimensionZero,
int codim >
430 static const bool v = Dune::Capabilities::hasEntity< Grid, codim >::v;
433 template<
class Gr
id, PartitionIteratorType
idxpitype,
bool onlyCodimensionZero,
int codim >
436 static const bool v = Dune::Capabilities::canCommunicate< Grid, codim >::v;
439 template<
class Gr
id, PartitionIteratorType
idxpitype,
bool onlyCodimensionZero >
442 static const bool v = Dune::Capabilities::isLeafwiseConforming< Grid >::v;
449 template<
class Gr
id, PartitionIteratorType
idxpitype >
452 static const bool v =
true;
455 template<
class Gr
id, PartitionIteratorType
idxpitype >
458 static const bool v = Dune::Capabilities::hasSingleGeometryType< Grid >::v;
460 = Dune::Capabilities::hasSingleGeometryType< Grid >::topologyId;
463 template<
class Gr
id, PartitionIteratorType
idxpitype >
466 static const bool v = Dune::Capabilities::isCartesian< Grid >::v;
469 template<
class Gr
id, PartitionIteratorType
idxpitype,
int codim >
472 static const bool v = Dune::Capabilities::hasEntity< Grid, codim >::v;
475 template<
class Gr
id, PartitionIteratorType
idxpitype,
int codim >
478 static const bool v = Dune::Capabilities::canCommunicate< Grid, codim >::v;
481 template<
class Gr
id, PartitionIteratorType
idxpitype >
484 static const bool v = Dune::Capabilities::isLeafwiseConforming< Grid >::v;
491 template<
class Gr
id, PartitionIteratorType
idxpitype >
494 static const bool v =
true;
497 template<
class Gr
id, PartitionIteratorType
idxpitype >
500 static const bool v = Dune::Capabilities::hasSingleGeometryType< Grid >::v;
502 = Dune::Capabilities::hasSingleGeometryType< Grid >::topologyId;
505 template<
class Gr
id, PartitionIteratorType
idxpitype >
508 static const bool v = Dune::Capabilities::isCartesian< Grid >::v;
511 template<
class Gr
id, PartitionIteratorType
idxpitype,
int codim >
514 static const bool v = Dune::Capabilities::hasEntity< Grid, codim >::v;
517 template<
class Gr
id, PartitionIteratorType
idxpitype,
int codim >
520 static const bool v = Dune::Capabilities::canCommunicate< Grid, codim >::v;
523 template<
class Gr
id, PartitionIteratorType
idxpitype >
526 static const bool v = Dune::Capabilities::isLeafwiseConforming< Grid >::v;
Definition: bindguard.hh:11
Definition: adaptiveleafgridpart.hh:41
static const InterfaceType value
Definition: adaptiveleafgridpart.hh:42
A grid part with an index set specially designed for adaptive calculations.
Definition: adaptiveleafgridpart.hh:66
SingletonList< const GridType *, IndexSetType > IndexSetProviderType
Definition: adaptiveleafgridpart.hh:103
Traits::GridType GridType
Grid implementation type.
Definition: adaptiveleafgridpart.hh:77
Traits::IndexSetType IndexSetType
The leaf index set of the grid implementation.
Definition: adaptiveleafgridpart.hh:79
Codim< codim >::template Partition< pitype >::IteratorType begin() const
Begin iterator on the leaf level.
Definition: adaptiveleafgridpart.hh:160
std::integral_constant< bool, false > NoIndexSetType
Definition: adaptiveleafgridpart.hh:97
IntersectionIteratorType iend(const ElementType &entity) const
iend of corresponding intersection iterator for given entity
Definition: adaptiveleafgridpart.hh:190
GridPartType & asImp()
Definition: adaptiveleafgridpart.hh:214
IntersectionIteratorType ibegin(const ElementType &entity) const
ibegin of corresponding intersection iterator for given entity
Definition: adaptiveleafgridpart.hh:183
std::unique_ptr< IndexSetType, typename IndexSetProviderType::Deleter > indexSet_
Definition: adaptiveleafgridpart.hh:112
int level() const
Returns maxlevel of the grid.
Definition: adaptiveleafgridpart.hh:196
LeafGridView leafGridView_
Definition: adaptiveleafgridpart.hh:109
Codim< codim >::IteratorType begin() const
Begin iterator on the leaf level.
Definition: adaptiveleafgridpart.hh:152
GridPart2GridViewImpl< GridPartType > GridViewType
Definition: adaptiveleafgridpart.hh:99
decltype(auto) communicate(CommDataHandleIF< DataHandle, Data > &data, InterfaceType iftype, CommunicationDirection dir) const
corresponding communication method for this grid part
Definition: adaptiveleafgridpart.hh:203
Codim< 0 >::EntityType ElementType
Definition: adaptiveleafgridpart.hh:106
AdaptiveGridPartBase(GridType &grid, const NoIndexSetType &noIndexSet)
Constructor constructing object held by index set (for iterator access)
Definition: adaptiveleafgridpart.hh:133
TraitsImp Traits
Type definitions.
Definition: adaptiveleafgridpart.hh:72
Codim< codim >::IteratorType end() const
Begin iterator on the leaf level.
Definition: adaptiveleafgridpart.hh:168
const GridPartType & asImp() const
Definition: adaptiveleafgridpart.hh:209
AdaptiveGridPartBase(const ThisType &other)
Copy Constructor.
Definition: adaptiveleafgridpart.hh:125
Traits::GridPartType GridPartType
Grid implementation type.
Definition: adaptiveleafgridpart.hh:75
const IndexSetType & indexSet() const
Returns reference to index set of the underlying grid.
Definition: adaptiveleafgridpart.hh:143
AdaptiveGridPartBase(GridType &grid)
constructor
Definition: adaptiveleafgridpart.hh:118
Codim< codim >::template Partition< pitype >::IteratorType end() const
End iterator on the leaf level.
Definition: adaptiveleafgridpart.hh:176
IntersectionIteratorType::Intersection IntersectionType
type of intersection
Definition: adaptiveleafgridpart.hh:95
Traits::IntersectionIteratorType IntersectionIteratorType
type of intersection iterator
Definition: adaptiveleafgridpart.hh:92
Struct providing types of the leaf iterators on codimension codim.
Definition: adaptiveleafgridpart.hh:85
Definition: adaptiveleafgridpart.hh:302
~AdaptiveLeafGridPart()
Definition: adaptiveleafgridpart.hh:329
BaseType::NoIndexSetType NoIndexSetType
Definition: adaptiveleafgridpart.hh:306
AdaptiveLeafGridPart(GridType &grid)
Constructor.
Definition: adaptiveleafgridpart.hh:311
AdaptiveLeafGridPart(const AdaptiveLeafGridPart &other)=default
copy constructor
BaseType::GridViewType GridViewType
Definition: adaptiveleafgridpart.hh:308
AdaptiveLeafGridPart(GridType &grid, const GridViewType *gridView)
Definition: adaptiveleafgridpart.hh:315
BaseType::GridType GridType
Definition: adaptiveleafgridpart.hh:307
BaseType::GridPartType GridPartType
Definition: adaptiveleafgridpart.hh:309
AdaptiveLeafGridPart(GridType &grid, const NoIndexSetType &dummy)
copy constructor (for construction from IndexSet, no public use)
Definition: adaptiveleafgridpart.hh:321
Type definitions for the LeafGridPart class.
Definition: adaptiveleafgridpart.hh:233
AdaptiveLeafGridPart< GridType, idxpitype, onlyCodimensionZero > GridPartType
type of the grid part , i.e. this type
Definition: adaptiveleafgridpart.hh:239
Grid GridType
type of the grid
Definition: adaptiveleafgridpart.hh:236
static const bool conforming
is true if grid on this view only has conforming intersections
Definition: adaptiveleafgridpart.hh:295
IndexSetChooserType::IndexSetType IndexSetType
type of the index set
Definition: adaptiveleafgridpart.hh:270
AdaptiveLeafIndexSetChooser<-1, onlyCodimensionZero > IndexSetChooserType
Definition: adaptiveleafgridpart.hh:266
GridType::CollectiveCommunication CollectiveCommunicationType
Definition: adaptiveleafgridpart.hh:244
static const InterfaceType indexSetInterfaceType
Definition: adaptiveleafgridpart.hh:273
GridType::LeafGridView::IntersectionIterator IntersectionIteratorType
Definition: adaptiveleafgridpart.hh:276
static const PartitionIteratorType indexSetPartitionType
Definition: adaptiveleafgridpart.hh:272
TwistUtility< GridType > TwistUtilityType
The type of the corresponding TwistUtility.
Definition: adaptiveleafgridpart.hh:242
Definition: adaptiveleafgridpart.hh:251
AdaptiveLeafIndexSet< GridPartType > IndexSetType
Definition: adaptiveleafgridpart.hh:254
static const PartitionIteratorType indexSetPartitionType
Definition: adaptiveleafgridpart.hh:252
static const InterfaceType indexSetInterfaceType
Definition: adaptiveleafgridpart.hh:253
DGAdaptiveLeafIndexSet< GridPartType > IndexSetType
Definition: adaptiveleafgridpart.hh:262
Definition: adaptiveleafgridpart.hh:280
GridType::template Codim< codim >::Geometry GeometryType
Definition: adaptiveleafgridpart.hh:281
GridType::template Codim< codim >::EntitySeed EntitySeedType
Definition: adaptiveleafgridpart.hh:285
GridType::template Codim< codim >::LocalGeometry LocalGeometryType
Definition: adaptiveleafgridpart.hh:282
GridType::template Codim< codim >::Entity EntityType
Definition: adaptiveleafgridpart.hh:284
Definition: adaptiveleafgridpart.hh:289
GridType::template Codim< codim >::template Partition< pitype >::LeafIterator IteratorType
Definition: adaptiveleafgridpart.hh:290
A grid part with an index set specially designed for adaptive calculations including indices for inte...
Definition: adaptiveleafgridpart.hh:375
IntersectionAdaptiveLeafGridPart(const IntersectionAdaptiveLeafGridPart &other)=default
copy constructor
IntersectionAdaptiveLeafGridPart(GridType &grid, const NoIndexSetType &noIndexSet)
copy constructor (for construction from IndexSet, no public use)
Definition: adaptiveleafgridpart.hh:387
BaseType::GridType GridType
Definition: adaptiveleafgridpart.hh:379
IntersectionAdaptiveLeafGridPart(GridType &grid)
Constructor.
Definition: adaptiveleafgridpart.hh:381
BaseType::NoIndexSetType NoIndexSetType
Definition: adaptiveleafgridpart.hh:378
A grid part with an index set specially designed for adaptive calculations including indices for inte...
Definition: adaptiveleafgridpart.hh:356
IntersectionAdaptiveLeafGridPart< Grid, idxpitype > GridPartType
type of the grid part , i.e. this type
Definition: adaptiveleafgridpart.hh:359
IntersectionAdaptiveLeafIndexSet< GridPartType > IndexSetType
type of the index set
Definition: adaptiveleafgridpart.hh:362
consecutive, persistent index set for the leaf level based on the grid's hierarchy index set
Definition: adaptiveleafindexset.hh:1345
Definition: adaptiveleafindexset.hh:1418
consecutive, persistent index set for the leaf level based on the grid's hierarchy index set
Definition: adaptiveleafindexset.hh:1489
specialize with 'false' if grid part has no underlying dune grid (default=true)
Definition: gridpart/common/capabilities.hh:18
static const bool v
Definition: gridpart/common/capabilities.hh:19
specialize with 'true' for if the codimension 0 entity of the grid part has only one possible geometr...
Definition: gridpart/common/capabilities.hh:29
static const bool v
Definition: gridpart/common/capabilities.hh:30
static const unsigned int topologyId
Definition: gridpart/common/capabilities.hh:31
specialize with 'true' if the grid part is cartesian (default=false)
Definition: gridpart/common/capabilities.hh:40
static const bool v
Definition: gridpart/common/capabilities.hh:41
specialize with 'true' for all codims that a grid implements entities for (default=false)
Definition: gridpart/common/capabilities.hh:50
static const bool v
Definition: gridpart/common/capabilities.hh:51
specialize with 'true' for all codims that a grid can communicate data on (default=false)
Definition: gridpart/common/capabilities.hh:60
static const bool v
Definition: gridpart/common/capabilities.hh:61
specialize with 'true' if implementation guarantees conforming level grids. (default=false)
Definition: gridpart/common/capabilities.hh:70
static const bool v
Definition: gridpart/common/capabilities.hh:71
Default implementation for the GridPart classes.
Definition: gridpart.hh:299
GridType & grid_
Definition: gridpart.hh:326
Traits::template Codim< EntitySeed::codimension >::EntityType entity(const EntitySeed &seed) const
obtain entity pointer from entity seed
Definition: gridpart.hh:362
const GridType & grid() const
Returns const reference to the underlying grid.
Definition: gridpart.hh:342
Definition: gridpart.hh:419
const GridViewType & gridView() const
Definition: gridpart.hh:441
Definition: gridpart2gridview.hh:69
Utility to get twist from IntersectionIterator, if provided by grid (i.e. AlbertaGrid,...
Definition: twistutility.hh:84
Singleton list for key/object pairs.
Definition: singletonlist.hh:53