Dune-Fufem 2.11-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
15#if DUNE_VERSION_GTE(DUNE_FUNCTIONS, 2, 11)
17#endif
18
20
21
22
23namespace Dune::Fufem::Forms {
24
25
26
35 template<class T>
36 struct IsBulkDomain : public std::false_type {};
37
38
39
48 template<class T>
50
51
52
61 template<class T>
63
64
65
74 template<class T>
75 struct IsDomain : public std::disjunction<IsBulkDomain<T>, IsBoundaryDomain<T>, IsSkeletonDomain<T>> {};
76
77
78
84 class Bulk
85 {
86 public:
87 template<class Element>
88 static constexpr bool contains(const Element&)
89 {
90 return true;
91 }
92 };
93
94
95
101 template<>
102 struct IsBulkDomain<Bulk> : public std::true_type {};
103
104
105
112 {
113 public:
114 template<class Intersection>
115 static constexpr bool contains(const Intersection& intersection)
116 {
117 return true;
118 }
119
120 template<class Element>
121 static constexpr bool containsFaceOf(const Element& element)
122 {
123 return element.hasBoundaryIntersections();
124 }
125 };
126
127
128
134 template<>
136
137
138
145 {
146 public:
147 template<class Intersection>
148 static constexpr bool contains(const Intersection&)
149 {
150 return true;
151 }
152 };
153
154
155
161 template<>
163
164
165
171 template<class GridView>
172 struct IsBoundaryDomain<Dune::Fufem::Boundary<GridView>> : public std::true_type {};
173
174
175
181 template<class GridView>
183
184
185
191 template<class GridView>
192 struct IsBoundaryDomain<::BoundaryPatch<GridView>> : public std::true_type {};
193
194
195
196#if DUNE_VERSION_GTE(DUNE_FUNCTIONS, 2, 11)
202 template<class GridView>
204
205
206
212 template<class SubDomainA, class SubDomainB>
213 struct IsSkeletonDomain<Dune::Functions::Experimental::SubDomainInterface<SubDomainA, SubDomainB>> : public std::true_type {};
214
215
216
222 template<class SubDomain>
223 struct IsSkeletonDomain<Dune::Functions::Experimental::SubDomainSkeleton<SubDomain>> : public std::true_type {};
224#endif
225
226
227
233 inline constexpr Bulk bulk = {};
234
235
236
242 inline constexpr Boundary boundary = {};
243
244
245
251 inline constexpr Skeleton skeleton = {};
252
253
254
255} // namespace Dune::Fufem::Forms
256
257
258#endif // DUNE_FUFEM_FORMS_DOMAINS_HH
constexpr Skeleton skeleton
Object representing the full grid view skeleton as integration domain.
Definition domains.hh:251
constexpr Boundary boundary
Object representing the full grid view boundary as integration domain.
Definition domains.hh:242
constexpr Bulk bulk
Object representing the full grid view as integration domain.
Definition domains.hh:233
Definition baseclass.hh:22
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
Traits class to identify bulk integration domains.
Definition domains.hh:36
Traits class to identify boundary integration domains.
Definition domains.hh:49
Traits class to identify skeleton integration domains.
Definition domains.hh:62
Traits class to identify integration domains.
Definition domains.hh:75
Class representing the grid view elements as integration domain.
Definition domains.hh:85
static constexpr bool contains(const Element &)
Definition domains.hh:88
Class representing the grid view boundary as integration domain.
Definition domains.hh:112
static constexpr bool containsFaceOf(const Element &element)
Definition domains.hh:121
static constexpr bool contains(const Intersection &intersection)
Definition domains.hh:115
Class representing the grid view skeleton as integration domain.
Definition domains.hh:145
static constexpr bool contains(const Intersection &)
Definition domains.hh:148