Dune-Fufem 2.12-git
Loading...
Searching...
No Matches
domains.hh
Go to the documentation of this file.
1// -*- tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-
2// vi: set et ts=4 sw=2 sts=2:
3
4// SPDX-FileCopyrightText: Copyright © DUNE-FUFEM Project contributors, see file AUTHORS.md
5// SPDX-License-Identifier: LicenseRef-GPL-2.0-only-with-DUNE-exception OR LGPL-3.0-or-later
6
7#ifndef DUNE_FUFEM_FORMS_DOMAINS_HH
8#define DUNE_FUFEM_FORMS_DOMAINS_HH
9
10#include <type_traits>
11#include <utility>
12
14
16
17
18
19namespace Dune::Fufem::Forms {
20
21namespace Impl {
22
28 class Bulk
29 {
30 public:
31 template<class Element>
32 static constexpr bool contains(const Element&)
33 {
34 return true;
35 }
36 };
37
43 class Skeleton
44 {
45 public:
46 template<class Intersection>
47 static constexpr bool contains(const Intersection&)
48 {
49 return true;
50 }
51 };
52
53}
54
55
56
57
58
59
68 template<class T>
69 struct IsBulkDomain : public std::false_type {};
70
71
72
81 template<class T>
83
84
85
94 template<class T>
96
97
98
107 template<class T>
108 struct IsDomain : public std::disjunction<IsBulkDomain<T>, IsBoundaryDomain<T>, IsSkeletonDomain<T>> {};
109
110
111
117 template<>
118 struct IsBulkDomain<Impl::Bulk> : public std::true_type {};
119
120
121
128 {
129 public:
130 template<class Intersection>
131 static constexpr bool contains(const Intersection& intersection)
132 {
133 return true;
134 }
135
136 template<class Element>
137 static constexpr bool containsFaceOf(const Element& element)
138 {
139 return element.hasBoundaryIntersections();
140 }
141 };
142
143
144
150 template<>
152
153
154
160 template<>
161 struct IsSkeletonDomain<Impl::Skeleton> : public std::true_type {};
162
163
164
170 template<class GridView>
171 struct IsBoundaryDomain<Dune::Fufem::Boundary<GridView>> : public std::true_type {};
172
173
174
180 template<class GridView>
182
183
184
190 template<class GridView>
191 struct IsBoundaryDomain<::BoundaryPatch<GridView>> : public std::true_type {};
192
193
194
200 template<class GridView>
202
203
204
210 template<class SubDomainA, class SubDomainB>
212
213
214
220 template<class SubDomain>
222
223
224
234 inline constexpr Impl::Bulk bulk = {};
235
236
237
243 inline constexpr Boundary boundary = {};
244
245
246
256 inline constexpr Impl::Skeleton skeleton = {};
257
258
259
260} // namespace Dune::Fufem::Forms
261
262
263#endif // DUNE_FUFEM_FORMS_DOMAINS_HH
constexpr std::bool_constant<((II==value)||...)> contains(std::integer_sequence< T, II... >, std::integral_constant< T, value >)
Encapsulate the set of the boundary intersections of a GridView.
Definition boundary.hh:27
Encapsulate a subset of the boundary intersections of a GridView.
Definition domains/boundarypatch.hh:37
Class representing the grid view boundary as integration domain.
Definition domains.hh:128
static constexpr bool containsFaceOf(const Element &element)
Definition domains.hh:137
static constexpr bool contains(const Intersection &intersection)
Definition domains.hh:131
constexpr Impl::Skeleton skeleton
Object representing the full grid view skeleton as integration domain.
Definition domains.hh:256
constexpr Impl::Bulk bulk
Object representing the full grid view as integration domain.
Definition domains.hh:234
constexpr Boundary boundary
Object representing the full grid view boundary as integration domain.
Definition domains.hh:243
Definition baseclass.hh:22
Traits class to identify boundary integration domains.
Definition domains.hh:82
Traits class to identify bulk integration domains.
Definition domains.hh:69
Traits class to identify integration domains.
Definition domains.hh:108
Traits class to identify skeleton integration domains.
Definition domains.hh:95