dune-fem 2.12-git
Loading...
Searching...
No Matches
space/localfiniteelement/capabilities.hh
Go to the documentation of this file.
1#ifndef DUNE_FEM_SPACE_LOCALFINITEELEMENT_CAPABILITIES_HH
2#define DUNE_FEM_SPACE_LOCALFINITEELEMENT_CAPABILITIES_HH
3
4
5
9
11
12namespace Dune
13{
14
15 namespace Fem
16 {
17
18 // External Forward Declarations
19 // -----------------------------
20
21 template< class LFEMap, class FunctionSpace, class Storage = CachingStorage >
22 class LocalFiniteElementSpace;
23
24 template< class LFEMap, class FunctionSpace, class Storage = CachingStorage >
25 class DiscontinuousLocalFiniteElementSpace;
26
27 template< class FunctionSpace, class GridPart, unsigned int order,
28 template< class, unsigned int > class PointSet>
30
31
32 namespace Capabilities
33 {
34
35 template< class LFEMap, class FunctionSpace, class Storage >
37 {
38 static const bool v = false;
39 };
40
41 template< class LFEMap, class FunctionSpace, class Storage >
43 {
44 static const bool v = false;
45 };
46
47
48 template< class LFEMap, class FunctionSpace, class Storage >
50 {
51 static const bool v = false;
52 static const int order = 6; // default polynomial order if not specified otherwise
53 };
54
55 template< class LFEMap, class FunctionSpace, class Storage >
57 {
58 static const bool v = false;
59 static const int order = 6; // default polynomial order if not specified otherwise
60 };
61
62
63 template< class LFEMap, class FunctionSpace, class Storage >
65 {
66 static const bool v = false;
67 };
68
69 template< class LFEMap, class FunctionSpace, class Storage >
71 {
72 static const bool v = false;
73 };
74
75
76 template< class LFEMap, class FunctionSpace, class Storage >
78 {
79 static const bool v = true;
80 };
81
82 template< class LFEMap, class FunctionSpace, class Storage >
84 {
85 static const bool v = true;
86 };
87
88
89 template< class LFEMap, class FunctionSpace, class Storage >
90 struct isAdaptive< LocalFiniteElementSpace< LFEMap, FunctionSpace, Storage > >
91 {
92 static const bool v = false;
93 };
94
95 template< class LFEMap, class FunctionSpace, class Storage >
97 {
98 static const bool v = false;
99 };
100
101
102 template< class LFEMap, class FunctionSpace, class Storage >
104 {
105 static const bool v = false;
106 };
107
108 template< class LFEMap, class FunctionSpace, class Storage >
110 {
111 static const bool v = false;
112 };
113
114
115 template< class LFEMap, class FunctionSpace, class Storage >
117 {
118 static const bool v = false;
119 };
120
121 template< class LFEMap, class FunctionSpace, class Storage >
123 {
124 static const bool v = false;
125 };
126
127
128#if HAVE_DUNE_LOCALFUNCTIONS
129 namespace detail
130 {
131
132 struct DefaultQuadratureEquidistant
133 {
134 template <class F, int d>
135 using DefaultQuadratureTraits = Dune::Fem::EquidistantQuadratureTraits< F, d >;
136
137 // TODO: double check this
138 static int volumeOrder ( const int k ) { return k; }
139 static int surfaceOrder( const int k ) { return k; }
140 };
141
142 struct DefaultQuadratureGaussLobatto
143 {
144 template <class F, int d>
145 using DefaultQuadratureTraits = Dune::Fem::GaussLobattoQuadratureTraits< F, d >;
146
147 static int volumeOrder ( const int k ) { return (k > 0) ? (2 * k - 1) : 0; }
148 static int surfaceOrder( const int k ) { return (k > 0) ? (2 * k - 1) : 0; }
149 };
150
151 struct DefaultQuadratureGaussLegendre
152 {
153 template <class F, int d>
154 using DefaultQuadratureTraits = Dune::Fem::GaussLegendreQuadratureTraits< F, d >;
155
156 static int volumeOrder ( const int k ) { return 2 * k + 1; }
157 static int surfaceOrder( const int k ) { return 2 * k + 1; }
158 };
159
160 struct DefaultQuadratureCellCenters
161 {
162 template <class F, int d>
163 using DefaultQuadratureTraits = Dune::Fem::CellCentersQuadratureTraits< F, d >;
164
165 static int volumeOrder ( const int k ) { return k; }
166 static int surfaceOrder( const int k ) { return k; }
167 };
168
169 // default uses the default values for all spaces (see space/common/capabilities.hh)
170 template< class LFEMap >
171 struct DefaultQuadratureSpec : public Dune::Fem::Capabilities::DefaultQuadrature< LFEMap >
172 {};
173
174
176 template < class FunctionSpace, class GridPart, unsigned int order >
177 struct DefaultQuadratureSpec< Dune::Fem::FixedOrderLagrangeFiniteElementMap< FunctionSpace, GridPart, order, Dune::EquidistantPointSetDerived > >
178 : public DefaultQuadratureEquidistant {};
179
181 template < class FunctionSpace, class GridPart, unsigned int order >
182 struct DefaultQuadratureSpec< Dune::Fem::FixedOrderLagrangeFiniteElementMap< FunctionSpace, GridPart, order, Dune::GaussLobattoPointSet > >
183 : public DefaultQuadratureGaussLobatto {};
184
186 template < class FunctionSpace, class GridPart, unsigned int order >
187 struct DefaultQuadratureSpec< Dune::Fem::FixedOrderLagrangeFiniteElementMap< FunctionSpace, GridPart, order, Dune::GaussLegendrePointSet > >
188 : public DefaultQuadratureGaussLegendre {};
189
191 template < class FunctionSpace, class GridPart, unsigned int order >
192 struct DefaultQuadratureSpec< Dune::Fem::FixedOrderLagrangeFiniteElementMap< FunctionSpace, GridPart, order, Dune::CellCentersPointSet > >
193 : public DefaultQuadratureCellCenters {};
194 } // end namespace detail
195
196 template< class LFEMap, class FunctionSpace, class Storage >
197 struct DefaultQuadrature< LocalFiniteElementSpace< LFEMap, FunctionSpace, Storage > >
198 : public detail::DefaultQuadratureSpec< LFEMap >
199 {
200 };
201
202 template< class LFEMap, class FunctionSpace, class Storage >
203 struct DefaultQuadrature< DiscontinuousLocalFiniteElementSpace< LFEMap, FunctionSpace, Storage > >
204 : public detail::DefaultQuadratureSpec< LFEMap >
205 {
206 };
207#endif // #ifndef HAVE_DUNE_LOCALFUNCTIONS
208
209
210 } // namespace Capabilities
211
212 } // namespace Fem
213
214} // namespace Dune
215
216
217#endif // #ifndef DUNE_FEM_SPACE_LOCALFINITEELEMENT_CAPABILITIES_HH
Definition defaultquadratures.hh:40
specialize with true if polynomial order does not depend on the grid (part) entity
Definition space/common/capabilities.hh:24
static const bool v
Definition space/common/capabilities.hh:25
specialize with true if polynomial order fixed and compile time static
Definition space/common/capabilities.hh:37
static const bool v
Definition space/common/capabilities.hh:38
static const int order
Definition space/common/capabilities.hh:39
specialize with true if space is always continuous
Definition space/common/capabilities.hh:50
static const bool v
Definition space/common/capabilities.hh:51
specialize with true if the space is localized, * i.e., the basis function set is based on a shape fu...
Definition space/common/capabilities.hh:68
static const bool v
Definition space/common/capabilities.hh:69
specialize with true if space can be used with AdaptiveDiscreteFunction
Definition space/common/capabilities.hh:81
static const bool v
Definition space/common/capabilities.hh:82
specialize with true if the space implementation is thread safe
Definition space/common/capabilities.hh:105
static const bool v
Definition space/common/capabilities.hh:106
specialize with true if the space implementation is thread safe, while it is not modified
Definition space/common/capabilities.hh:119
static const bool v
Definition space/common/capabilities.hh:120
specialize when quadrature other than the standard quadrature should be used for volume and surface i...
Definition space/common/capabilities.hh:143
A vector valued function space.
Definition functionspace.hh:60
Rannacher-Turek Space.
Definition localfiniteelement/space.hh:115
Rannacher-Turek Space.
Definition dgspace.hh:130
Definition space/localfiniteelement/capabilities.hh:29