DUNE PDELab (git)

intersection.hh
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>
12#include <dune/grid/concepts/entity.hh>
13#include <dune/grid/concepts/geometry.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
Model of a grid entity for any codimension.
Definition: entity.hh:40
Model of a geometry object.
Definition: geometry.hh:29
Model of an intersection.
Definition: intersection.hh:23
Namespace for concepts.
Definition: concept.hh:34
A unique label for each type of element that can occur in a grid.
Creative Commons License   |  Legal Statements / Impressum  |  Hosted by TU Dresden  |  generated with Hugo v0.111.3 (Jul 15, 22:36, 2024)