dune-grid  2.11
concepts/intersection.hh
Go to the documentation of this file.
1 // SPDX-FileCopyrightText: Copyright © DUNE Project contributors, see file LICENSE.md in module root
2 // SPDX-License-Identifier: LicenseRef-GPL-2.0-only-with-DUNE-exception
3 // -*- tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-
4 // vi: set et ts=4 sw=2 sts=2:
5 #ifndef DUNE_GRID_CONCEPTS_INTERSECTION_HH
6 #define DUNE_GRID_CONCEPTS_INTERSECTION_HH
7 
8 #include <concepts>
9 #include <cstddef>
10 
11 #include <dune/geometry/type.hh>
14 
15 namespace Dune::Concept {
16 
22 template<class I>
23 concept Intersection = std::regular<I> &&
24  EntityGeneral<typename I::Entity> &&
27 requires(const I i, typename I::LocalCoordinate local)
28 {
29  typename I::ctype;
30  { I::mydimension } -> std::convertible_to<int>;
31  { I::dimensionworld } -> std::convertible_to<int>;
32  { i.boundary() } -> std::convertible_to<bool>;
33  { i.boundarySegmentIndex() } -> std::convertible_to<std::size_t>;
34  { i.neighbor() } -> std::convertible_to<bool>;
35  { i.inside() } -> std::same_as<typename I::Entity>;
36  { i.outside() } -> std::same_as<typename I::Entity>;
37  { i.conforming() } -> std::convertible_to<bool>;
38  { i.geometryInInside() } -> std::same_as<typename I::LocalGeometry>;
39  { i.geometryInOutside() } -> std::same_as<typename I::LocalGeometry>;
40  { i.geometry() } -> std::same_as<typename I::Geometry>;
41  { i.type() } -> std::same_as<Dune::GeometryType>;
42  { i.indexInInside() } -> std::convertible_to<int>;
43  { i.indexInOutside() } -> std::convertible_to<int>;
44  { i.outerNormal(local) } -> std::convertible_to<typename I::GlobalCoordinate>;
45  { i.integrationOuterNormal(local) } -> std::convertible_to<typename I::GlobalCoordinate>;
46  { i.unitOuterNormal(local) } -> std::convertible_to<typename I::GlobalCoordinate>;
47  { i.centerUnitOuterNormal() } -> std::convertible_to<typename I::GlobalCoordinate>;
48 };
49 
50 } // end namespace Dune::Concept
51 
52 #endif // DUNE_GRID_CONCEPTS_INTERSECTION_HH
Wrapper class for geometries.
Definition: common/geometry.hh:70
GeometryType type() const
Return the type of the reference element. The type can be used to access the Dune::ReferenceElement.
Definition: common/geometry.hh:194
Definition: concepts/datahandle.hh:14
Intersection of a mesh entity of codimension 0 ("element") with a "neighboring" element or with the d...
Definition: albertagrid/dgfparser.hh:28