DUNE-FEM (unstable)

capabilities.hh
1#ifndef DUNE_FEM_SPACE_COMMON_CAPABILITIES_HH
2#define DUNE_FEM_SPACE_COMMON_CAPABILITIES_HH
3
4#include <type_traits>
5
6#include <dune/fem/quadrature/defaultquadratures.hh>
7
8namespace Dune
9{
10
11 namespace Fem
12 {
13
14 namespace Capabilities
15 {
16
22 template< class DiscreteFunctionSpace >
24 {
25 static const bool v = false;
26 };
27
28
29
35 template< class DiscreteFunctionSpace >
37 {
38 static const bool v = false;
39 static const int order = -1;
40 };
41
42
43
48 template< class DiscreteFunctionSpace >
50 {
51 static const bool v = false;
52 };
53
54
55
66 template< class DiscreteFunctionSpace >
68 {
69 static const bool v = false;
70 };
71
72
73
79 template< class DiscreteFunctionSpace >
81 {
82 static const bool v = false;
83 };
84
85
91 template< class DiscreteFunctionSpace >
93 {
94 static const bool v = false;
95 };
96
97
103 template< class DiscreteFunctionSpace >
105 {
106 static const bool v = false;
107 };
108
109
110
117 template< class DiscreteFunctionSpace >
119 {
120 static const bool v = false;
121 };
122
123
129 template< class DiscreteFunctionSpace >
131 {
132 static const bool v = false;
133 };
134
135
141 template< class DiscreteFunctionSpace >
143 {
144 // traits specifying the quadrature points used for CachingQuadrature or ElementQuadrature.
145 template <class F, int d>
146 using DefaultQuadratureTraits = Dune::Fem::DefaultQuadratureTraits< F, d >;
147
149 static int volumeOrder( const int k ) { return 2 * k; }
151 static int surfaceOrder( const int k ) { return 2 * k + 1; }
152 };
153
154
155 namespace Impl
156 {
157
158 template< class DFS >
159 std::true_type hasInterpolation ( const DFS &, decltype( std::declval< const DFS & >().interpolation() ) * = nullptr );
160
161 std::false_type hasInterpolation ( ... );
162
163 } // namespace Impl
164
165
174 template< class DiscreteFunctionSpace >
176 {
177 static const bool v = decltype( Impl::hasInterpolation( std::declval< const DiscreteFunctionSpace & >() ) )::value;
178 };
179
180
181
182 // const specialization
183 // --------------------
184
185 template< class DiscreteFunctionSpace >
187 {
189 };
190
191 template< class DiscreteFunctionSpace >
192 struct hasStaticPolynomialOrder< const DiscreteFunctionSpace >
193 {
194 static const bool v = hasStaticPolynomialOrder< DiscreteFunctionSpace >::v;
195 static const int order = hasStaticPolynomialOrder< DiscreteFunctionSpace >::order;
196 };
197
198 template< class DiscreteFunctionSpace >
199 struct isContinuous < const DiscreteFunctionSpace >
200 {
201 static const bool v = isContinuous< DiscreteFunctionSpace >::v;
202 };
203
204 template< class DiscreteFunctionSpace >
205 struct isLocalized< const DiscreteFunctionSpace >
206 {
207 static const bool v = isLocalized< DiscreteFunctionSpace >::v;
208 };
209
210 template< class DiscreteFunctionSpace >
211 struct isAdaptive< const DiscreteFunctionSpace >
212 {
213 static const bool v = isAdaptive< DiscreteFunctionSpace >::v;
214 };
215
216 template< class DiscreteFunctionSpace >
217 struct isPAdaptiveSpace< const DiscreteFunctionSpace >
218 {
219 static const bool v = isPAdaptiveSpace< DiscreteFunctionSpace >::v;
220 };
221
222 template< class DiscreteFunctionSpace >
223 struct threadSafe< const DiscreteFunctionSpace >
224 {
225 static const bool v = threadSafe< DiscreteFunctionSpace >::v;
226 };
227
228 template< class DiscreteFunctionSpace >
229 struct viewThreadSafe< const DiscreteFunctionSpace >
230 {
231 static const bool v = viewThreadSafe< DiscreteFunctionSpace >::v;
232 };
233
234 template< class DiscreteFunctionSpace >
235 struct isHierarchic< const DiscreteFunctionSpace >
236 {
237 static const bool v = isHierarchic< DiscreteFunctionSpace >::v;
238 };
239
240 template< class DiscreteFunctionSpace >
241 struct hasInterpolation< const DiscreteFunctionSpace >
242 {
243 static const bool v = hasInterpolation< DiscreteFunctionSpace >::v;
244 };
245
246 template< class DiscreteFunctionSpace >
247 struct DefaultQuadrature< const DiscreteFunctionSpace >
248 : public DefaultQuadrature< DiscreteFunctionSpace >
249 {};
250
251 } // namespace Capabilities
252
253 } // namespace Fem
254
255} // namespace Dune
256
257#endif // #ifndef DUNE_FEM_SPACE_COMMON_CAPABILITIES_HH
discrete function space
Dune namespace.
Definition: alignedallocator.hh:13
specialize when quadrature other than the standard quadrature should be used for volume and surface i...
Definition: capabilities.hh:143
static int volumeOrder(const int k)
return quadrature order for volume quadratures for given polynomial order k
Definition: capabilities.hh:149
static int surfaceOrder(const int k)
return quadrature order for surface quadratures (i.e. over intersections) for given polynomial order ...
Definition: capabilities.hh:151
specialize with true if polynomial order does not depend on the grid (part) entity
Definition: capabilities.hh:24
determine whether a discrete function space provides a (local) interpolation
Definition: capabilities.hh:176
specialize with true if polynomial order fixed and compile time static
Definition: capabilities.hh:37
specialize with true if space can be used with AdaptiveDiscreteFunction
Definition: capabilities.hh:81
specialize with true if space is always continuous
Definition: capabilities.hh:50
specialize with true if for a space the basis functions are sorted by the polynomial order,...
Definition: capabilities.hh:131
specialize with true if the space is localized, * i.e., the basis function set is based on a shape fu...
Definition: capabilities.hh:68
specialize with true if space can be used with p-adaptation
Definition: capabilities.hh:93
specialize with true if the space implementation is thread safe
Definition: capabilities.hh:105
specialize with true if the space implementation is thread safe, while it is not modified
Definition: capabilities.hh:119
Creative Commons License   |  Legal Statements / Impressum  |  Hosted by TU Dresden & Uni Heidelberg  |  generated with Hugo v0.111.3 (Apr 7, 22:57, 2025)