Dune-Fufem 2.11
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
15#if DUNE_VERSION_GTE(DUNE_FUNCTIONS, 2, 11)
17#endif
18
20
21
22
23namespace Dune::Fufem::Forms {
24
25namespace Impl {
26
32 class Bulk
33 {
34 public:
35 template<class Element>
36 static constexpr bool contains(const Element&)
37 {
38 return true;
39 }
40 };
41
47 class Skeleton
48 {
49 public:
50 template<class Intersection>
51 static constexpr bool contains(const Intersection&)
52 {
53 return true;
54 }
55 };
56
57}
58
59
60
61
62
63
72 template<class T>
73 struct IsBulkDomain : public std::false_type {};
74
75
76
85 template<class T>
87
88
89
98 template<class T>
100
101
102
111 template<class T>
112 struct IsDomain : public std::disjunction<IsBulkDomain<T>, IsBoundaryDomain<T>, IsSkeletonDomain<T>> {};
113
114
115
121 class Bulk
122 {
123 public:
124 template<class Element>
125 static constexpr bool contains(const Element&)
126 {
127 return true;
128 }
129 };
130
131
132
138 template<>
139 struct IsBulkDomain<Bulk> : public std::true_type {};
140
141
142
149 {
150 public:
151 template<class Intersection>
152 static constexpr bool contains(const Intersection& intersection)
153 {
154 return true;
155 }
156
157 template<class Element>
158 static constexpr bool containsFaceOf(const Element& element)
159 {
160 return element.hasBoundaryIntersections();
161 }
162 };
163
164
165
171 template<>
173
174
175
181 template<>
182 struct IsSkeletonDomain<Impl::Skeleton> : public std::true_type {};
183
184
185
191 template<class GridView>
192 struct IsBoundaryDomain<Dune::Fufem::Boundary<GridView>> : public std::true_type {};
193
194
195
201 template<class GridView>
203
204
205
211 template<class GridView>
212 struct IsBoundaryDomain<::BoundaryPatch<GridView>> : public std::true_type {};
213
214
215
216#if DUNE_VERSION_GTE(DUNE_FUNCTIONS, 2, 11)
222 template<class GridView>
224
225
226
232 template<class SubDomainA, class SubDomainB>
233 struct IsSkeletonDomain<Dune::Functions::Experimental::SubDomainInterface<SubDomainA, SubDomainB>> : public std::true_type {};
234
235
236
242 template<class SubDomain>
243 struct IsSkeletonDomain<Dune::Functions::Experimental::SubDomainSkeleton<SubDomain>> : public std::true_type {};
244#endif
245
246
247
257 inline constexpr Impl::Bulk bulk = {};
258
259
260
266 inline constexpr Boundary boundary = {};
267
268
269
279 inline constexpr Impl::Skeleton skeleton = {};
280
281
282
283} // namespace Dune::Fufem::Forms
284
285
286#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:149
static constexpr bool containsFaceOf(const Element &element)
Definition domains.hh:158
static constexpr bool contains(const Intersection &intersection)
Definition domains.hh:152
Class representing the grid view elements as integration domain.
Definition domains.hh:122
static constexpr bool contains(const Element &)
Definition domains.hh:125
constexpr Impl::Skeleton skeleton
Object representing the full grid view skeleton as integration domain.
Definition domains.hh:279
constexpr Impl::Bulk bulk
Object representing the full grid view as integration domain.
Definition domains.hh:257
constexpr Boundary boundary
Object representing the full grid view boundary as integration domain.
Definition domains.hh:266
Definition baseclass.hh:22
Traits class to identify boundary integration domains.
Definition domains.hh:86
Traits class to identify bulk integration domains.
Definition domains.hh:73
Traits class to identify integration domains.
Definition domains.hh:112
Traits class to identify skeleton integration domains.
Definition domains.hh:99