5 #ifndef DUNE_GRID_CONCEPTS_GRID_HH 6 #define DUNE_GRID_CONCEPTS_GRID_HH 10 #include <type_traits> 13 #include <dune/common/indices.hh> 14 #include <dune/geometry/type.hh> 38 template<
class G,
int codim, Dune::PartitionIteratorType partition>
39 concept GridCodimPartition =
40 EntityIterator<typename G::template Codim<codim>::template Partition<partition>::LevelIterator> &&
41 EntityIterator<typename G::template Codim<codim>::template Partition<partition>::LeafIterator>;
43 template<
class G,
int codim>
44 concept GridCodimAllPartitions =
48 GridCodimPartition<G,codim,Dune::PartitionIteratorType::Interior_Partition> &&
49 GridCodimPartition<G,codim,Dune::PartitionIteratorType::InteriorBorder_Partition> &&
50 GridCodimPartition<G,codim,Dune::PartitionIteratorType::Overlap_Partition> &&
51 GridCodimPartition<G,codim,Dune::PartitionIteratorType::OverlapFront_Partition> &&
52 GridCodimPartition<G,codim,Dune::PartitionIteratorType::All_Partition> &&
53 GridCodimPartition<G,codim,Dune::PartitionIteratorType::Ghost_Partition>
56 template<
class G,
int codim>
62 Geometry<typename G::template Codim<codim>::LocalGeometry> &&
73 requires(G g, Archetypes::CommDataHandle<std::byte>& handle)
75 { g.loadBalance(handle) } -> std::convertible_to<bool>;
77 } && GridCodimAllPartitions<G,codim>
80 template<
class G, std::size_t... c>
81 void gridAllCodims(std::index_sequence<c...>)
82 requires (GridCodim<G,
int(c)> &&...);
123 { G::dimension } -> std::convertible_to<int>;
124 { G::dimensionworld } -> std::convertible_to<int>;
127 requires std::same_as<G,typename G::LeafGridView::Grid>;
128 requires std::same_as<G,typename G::LevelGridView::Grid>;
130 typename G::HierarchicIterator;
133 { cg.maxLevel() } -> std::convertible_to<int>;
134 { cg.size(level, codim) } -> std::convertible_to<int>;
135 { cg.size(codim) } -> std::convertible_to<int>;
136 { cg.size(level, type) } -> std::convertible_to<int>;
137 { cg.size(type) } -> std::convertible_to<int>;
138 { cg.numBoundarySegments() } -> std::convertible_to<std::size_t>;
139 { cg.levelGridView(level) } -> std::same_as<typename G::LevelGridView>;
140 { cg.leafGridView() } -> std::same_as<typename G::LeafGridView>;
141 { cg.globalIdSet() } -> std::same_as<const typename G::GlobalIdSet&>;
142 { cg.localIdSet() } -> std::same_as<const typename G::LocalIdSet&>;
143 { cg.levelIndexSet(level) } -> std::same_as<const typename G::LevelIndexSet&>;
144 { cg.leafIndexSet() } -> std::same_as<const typename G::LeafIndexSet&>;
145 { cg.comm() } -> std::convertible_to<typename G::Communication>;
148 requires requires(G g,
int refCount,
const typename G::template
Codim<0>::Entity& entity)
150 { g.mark(refCount,entity) } -> std::convertible_to<bool>;
151 { g.getMark(entity) } -> std::convertible_to<int>;
152 { g.preAdapt() } -> std::convertible_to<bool>;
153 { g.adapt() } -> std::convertible_to<bool>;
154 { g.loadBalance() } -> std::convertible_to<bool>;
155 g.globalRefine(refCount);
159 Impl::GridCodim<G,0> &&
160 requires (index_constant<1> from, index_constant<G::dimension+1> to) {
161 Impl::gridAllCodims<G>(range(from, to).to_integer_sequence());
166 #endif // DUNE_GRID_CONCEPTS_GRID_HH
concept Entity
Model of a grid entity.
Definition: concepts/entity.hh:119
Index Set Interface base class.
Definition: common/grid.hh:348
Grid abstract base classThis class is the base class for all grid implementations. Although no virtual functions are used we call it abstract since its methods do not contain an implementation but forward to the methods of the derived class via the Barton-Nackman trick.
Definition: common/grid.hh:375
EntitySeed()
Construct an empty (i.e. isValid() == false) seed.
Definition: common/entityseed.hh:40
Specialize with 'true' for all codims that a grid implements entities for. (default=false) ...
Definition: common/capabilities.hh:57
Geometry(const Implementation &impl)
copy constructor from implementation
Definition: common/geometry.hh:384
Entity()
Definition: common/entity.hh:181
Grid view abstract base class.
Definition: common/gridview.hh:65
Definition: concepts/datahandle.hh:14
Mesh entities of codimension 0 ("elements") allow to visit all intersections with "neighboring" eleme...
Definition: common/grid.hh:347
specialize with 'true' for all codims that a grid provides an iterator for (default=hasEntity<codim>:...
Definition: common/capabilities.hh:73
Intersection of a mesh entity of codimension 0 ("element") with a "neighboring" element or with the d...
Definition: albertagrid/dgfparser.hh:28
specialize with 'true' for all codims that a grid can communicate data on (default=false) ...
Definition: common/capabilities.hh:96
GeometryType
Type representing VTK's entity geometry types.
Definition: common.hh:132
A set of traits classes to store static information about grid implementation.
concept EntitySeed
Model of an entity seed.
Definition: concepts/entity.hh:25
Id Set Interface.
Definition: common/grid.hh:349