dune-grid 2.10
Loading...
Searching...
No Matches
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
15namespace Dune::Concept {
16
22template<class I>
23concept Intersection = std::regular<I> &&
27requires(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
Definition concepts/datahandle.hh:14
Model of a grid entity for any codimension.
Definition concepts/entity.hh:40
Model of a geometry object.
Definition concepts/geometry.hh:29
Model of an intersection.
Definition concepts/intersection.hh:23