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
86
92 template< class DiscreteFunctionSpace >
94 {
95 static const bool v = false;
96 };
97
98
99
106 template< class DiscreteFunctionSpace >
108 {
109 static const bool v = false;
110 };
111
112
118 template< class DiscreteFunctionSpace >
120 {
121 static const bool v = false;
122 };
123
124
130 template< class DiscreteFunctionSpace >
132 {
133 // traits specifying the quadrature points used for CachingQuadrature or ElementQuadrature.
134 template <class F, int d>
135 using DefaultQuadratureTraits = Dune::Fem::DefaultQuadratureTraits< F, d >;
136
138 static int volumeOrder( const int k ) { return 2 * k; }
140 static int surfaceOrder( const int k ) { return 2 * k + 1; }
141 };
142
143
144 namespace Impl
145 {
146
147 template< class DFS >
148 std::true_type hasInterpolation ( const DFS &, decltype( std::declval< const DFS & >().interpolation() ) * = nullptr );
149
150 std::false_type hasInterpolation ( ... );
151
152 } // namespace Impl
153
154
163 template< class DiscreteFunctionSpace >
165 {
166 static const bool v = decltype( Impl::hasInterpolation( std::declval< const DiscreteFunctionSpace & >() ) )::value;
167 };
168
169
170
171 // const specialization
172 // --------------------
173
174 template< class DiscreteFunctionSpace >
176 {
178 };
179
180 template< class DiscreteFunctionSpace >
181 struct hasStaticPolynomialOrder< const DiscreteFunctionSpace >
182 {
183 static const bool v = hasStaticPolynomialOrder< DiscreteFunctionSpace >::v;
184 static const int order = hasStaticPolynomialOrder< DiscreteFunctionSpace >::order;
185 };
186
187 template< class DiscreteFunctionSpace >
188 struct isContinuous < const DiscreteFunctionSpace >
189 {
190 static const bool v = isContinuous< DiscreteFunctionSpace >::v;
191 };
192
193 template< class DiscreteFunctionSpace >
194 struct isLocalized< const DiscreteFunctionSpace >
195 {
196 static const bool v = isLocalized< DiscreteFunctionSpace >::v;
197 };
198
199 template< class DiscreteFunctionSpace >
200 struct isAdaptive< const DiscreteFunctionSpace >
201 {
202 static const bool v = isAdaptive< DiscreteFunctionSpace >::v;
203 };
204
205 template< class DiscreteFunctionSpace >
206 struct threadSafe< const DiscreteFunctionSpace >
207 {
208 static const bool v = threadSafe< DiscreteFunctionSpace >::v;
209 };
210
211 template< class DiscreteFunctionSpace >
212 struct viewThreadSafe< const DiscreteFunctionSpace >
213 {
214 static const bool v = viewThreadSafe< DiscreteFunctionSpace >::v;
215 };
216
217 template< class DiscreteFunctionSpace >
218 struct isHierarchic< const DiscreteFunctionSpace >
219 {
220 static const bool v = isHierarchic< DiscreteFunctionSpace >::v;
221 };
222
223 template< class DiscreteFunctionSpace >
224 struct hasInterpolation< const DiscreteFunctionSpace >
225 {
226 static const bool v = hasInterpolation< DiscreteFunctionSpace >::v;
227 };
228
229 template< class DiscreteFunctionSpace >
230 struct DefaultQuadrature< const DiscreteFunctionSpace >
231 : public DefaultQuadrature< DiscreteFunctionSpace >
232 {};
233
234 } // namespace Capabilities
235
236 } // namespace Fem
237
238} // namespace Dune
239
240#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:132
static int volumeOrder(const int k)
return quadrature order for volume quadratures for given polynomial order k
Definition: capabilities.hh:138
static int surfaceOrder(const int k)
return quadrature order for surface quadratures (i.e. over intersections) for given polynomial order ...
Definition: capabilities.hh:140
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:165
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:120
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 the space implementation is thread safe
Definition: capabilities.hh:94
specialize with true if the space implementation is thread safe, while it is not modified
Definition: capabilities.hh:108
Creative Commons License   |  Legal Statements / Impressum  |  Hosted by TU Dresden  |  generated with Hugo v0.111.3 (Jul 27, 22:29, 2024)