5#ifndef DUNE_GRID_CONCEPT_ENTITY_HH
6#define DUNE_GRID_CONCEPT_ENTITY_HH
13#include <dune/grid/common/gridenums.hh>
14#include <dune/grid/concepts/geometry.hh>
15#include <dune/grid/concepts/archetypes/entity.hh>
25concept EntitySeed = std::semiregular<S> &&
requires(
const S seed)
27 { S::codimension } -> std::convertible_to<int>;
28 { seed.isValid() } -> std::convertible_to<bool>;
43requires(
const E e,
unsigned int codim)
45 requires E::mydimension == (E::dimension - E::codimension);
46 { e.level() } -> std::convertible_to<int>;
47 { e.partitionType() } -> std::same_as<Dune::PartitionType>;
48 { e.geometry() } -> std::same_as<typename E::Geometry>;
49 { e.type() } -> std::same_as<Dune::GeometryType>;
50 { e.subEntities(codim) } -> std::convertible_to<unsigned int>;
51 { e.seed() } -> std::same_as<typename E::EntitySeed>;
59 template<
class E,
int codim>
60 concept EntityCodimExtended =
requires(
const E e,
int subEntity)
62 { e.template subEntity<codim>(subEntity) } -> EntityGeneral;
65 template<
typename E, std::size_t... c>
66 void entityAllCodimsExtended(std::integer_sequence<std::size_t,c...>)
67 requires (EntityCodimExtended<E,int(c)> &&...);
79requires(
const E e,
int maxLevel)
81 requires (E::codimension == 0);
82 { e.father() } -> std::same_as<E>;
83 { e.hasFather() } -> std::convertible_to<bool>;
84 { e.isLeaf() } -> std::convertible_to<bool>;
85 { e.isRegular() } -> std::convertible_to<bool>;
86 { e.geometryInFather() } -> std::same_as<typename E::LocalGeometry>;
87 { e.hbegin(maxLevel) } -> std::same_as<typename E::HierarchicIterator>;
88 { e.hend(maxLevel) } -> std::same_as<typename E::HierarchicIterator>;
89 { e.isNew() } -> std::convertible_to<bool>;
90 { e.mightVanish() } -> std::convertible_to<bool>;
91 { e.hasBoundaryIntersections() } -> std::convertible_to<bool>;
93 requires std::same_as<E, typename E::template Codim<0>::Entity>;
95Impl::EntityCodimExtended<E,0> &&
97 Impl::entityAllCodimsExtended<E>(range(from, to).to_integer_sequence());
Model of a grid entity with extended requirements for codimension 0.
Definition: entity.hh:77
Model of a grid entity for any codimension.
Definition: entity.hh:40
Model of an entity seed.
Definition: entity.hh:25
Model of a grid entity.
Definition: entity.hh:107
Model of a geometry object.
Definition: geometry.hh:29
std::integral_constant< std::size_t, i > index_constant
An index constant with value i.
Definition: indices.hh:29
Namespace for concepts.
Definition: concept.hh:34
Utilities for reduction like operations on ranges.
A unique label for each type of element that can occur in a grid.