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 class Bulk
118 {
119 public:
120 template<class Element>
121 static constexpr bool contains(const Element&)
122 {
123 return true;
124 }
125 };
126
127
128
134 template<>
135 struct IsBulkDomain<Bulk> : public std::true_type {};
136
137
138
145 {
146 public:
147 template<class Intersection>
148 static constexpr bool contains(const Intersection& intersection)
149 {
150 return true;
151 }
152
153 template<class Element>
154 static constexpr bool containsFaceOf(const Element& element)
155 {
156 return element.hasBoundaryIntersections();
157 }
158 };
159
160
161
167 template<>
169
170
171
177 template<>
178 struct IsSkeletonDomain<Impl::Skeleton> : public std::true_type {};
179
180
181
187 template<class GridView>
188 struct IsBoundaryDomain<Dune::Fufem::Boundary<GridView>> : public std::true_type {};
189
190
191
197 template<class GridView>
199
200
201
207 template<class GridView>
208 struct IsBoundaryDomain<::BoundaryPatch<GridView>> : public std::true_type {};
209
210
211
217 template<class GridView>
219
220
221
227 template<class SubDomainA, class SubDomainB>
229
230
231
237 template<class SubDomain>
239
240
241
251 inline constexpr Impl::Bulk bulk = {};
252
253
254
260 inline constexpr Boundary boundary = {};
261
262
263
273 inline constexpr Impl::Skeleton skeleton = {};
274
275
276
277} // namespace Dune::Fufem::Forms
278
279
280#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:145
static constexpr bool containsFaceOf(const Element &element)
Definition domains.hh:154
static constexpr bool contains(const Intersection &intersection)
Definition domains.hh:148
Class representing the grid view elements as integration domain.
Definition domains.hh:118
static constexpr bool contains(const Element &)
Definition domains.hh:121
constexpr Impl::Skeleton skeleton
Object representing the full grid view skeleton as integration domain.
Definition domains.hh:273
constexpr Impl::Bulk bulk
Object representing the full grid view as integration domain.
Definition domains.hh:251
constexpr Boundary boundary
Object representing the full grid view boundary as integration domain.
Definition domains.hh:260
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