dune-fem 2.12-git
Loading...
Searching...
No Matches
misc/capabilities.hh
Go to the documentation of this file.
1#ifndef DUNE_FEM_CAPABILITIES_HH
2#define DUNE_FEM_CAPABILITIES_HH
3
5
6#include <dune/grid/common/capabilities.hh>
7
9#include <dune/fem/misc/metaprogramming.hh>
10
11namespace Dune
12{
13
14 // Core Capabilities
15 // -----------------
16
17 namespace Capabilities
18 {
19
20 // hasHierarchicIndexSet
21 // ---------------------
22
23 template< class Grid >
24 struct hasHierarchicIndexSet;
25
26 template< class Grid >
28 {
29 static const bool v = false;
30 };
31
32 template< class Grid >
34 {
35 static const bool v = false;
36 };
37
38#if HAVE_DUNE_ALUGRID
39 template< int dim, int dimw, ALUGridElementType elType, ALUGridRefinementType refineType, class Comm >
40 struct hasHierarchicIndexSet< ALUGrid< dim, dimw, elType, refineType, Comm > >
41 {
42 static const bool v = true;
43 };
44#endif // #if HAVE_DUNE_ALUGRID
45
46#if HAVE_DUNE_P4ESTGRID
47 template< int dim, int dimworld, P4estType elType, class ctype >
48 struct hasHierarchicIndexSet< P4estGrid< dim, dimworld, elType, ctype > >
49 {
50 static const bool v = true;
51 };
52#endif // #if HAVE_DUNE_ALUGRID
53
54 template<>
56 {
57 static const bool v = false;
58 };
59
60 template< int dim >
62 {
63 static const bool v = false;
64 };
65
66 template< int dim, class CoordCont >
67 struct hasHierarchicIndexSet< YaspGrid< dim, CoordCont > >
68 {
69 static const bool v = false;
70 };
71
72
73 template< class HostGrid, class CoordFunction, class Allocator >
74 struct hasHierarchicIndexSet< GeometryGrid< HostGrid, CoordFunction, Allocator > >
75 {
76 //static const bool v = hasHierarchicIndexSet< HostGrid > :: v;
77 static const bool v = false ;
78 };
79
80 } // namespace Capabilities
81
82
83 namespace Fem
84 {
85
86 // Fem Capabilities
87 // ----------------
88
89 namespace Capabilities
90 {
91
92 // hasAllCodimEntities
93 // -------------------
94
95 template< class Grid >
97 {
98 template< unsigned int codim >
99 struct Codim
100 : public Dune::Capabilities::hasEntity< Grid, codim >
101 {};
102
103 public:
104 static const bool v = Loop< MetaAnd, Codim, Grid :: dimension > :: v;
105 static const bool value = v;
106 };
107
108
109 // supportsCallbackAdaptation
110 // --------------------------
111
112 template< class Grid >
114 {
115 static const bool v = false;
116 };
117
118 template< class Grid >
123
124#if HAVE_DUNE_ALUGRID
125 template< int dim, int dimworld, ALUGridElementType elType, ALUGridRefinementType refineType, class Comm >
126 struct supportsCallbackAdaptation< ALUGrid< dim, dimworld, elType, refineType, Comm > >
127 {
128 static const bool v = true;
129 };
130#endif // #if HAVE_DUNE_ALUGRID
131
132#if HAVE_DUNE_P4ESTGRID
133 template< int dim, int dimworld, P4estType elType, class ctype >
134 struct supportsCallbackAdaptation< P4estGrid< dim, dimworld, elType, ctype > >
135 {
136 static const bool v = true;
137 };
138#endif // #if HAVE_DUNE_ALUGRID
139
140 template< int dim, int dimworld >
142 {
143 static const bool v = true;
144 };
145
146 template< class HostGrid, class CoordFunction, class Allocator >
147 struct supportsCallbackAdaptation< GeometryGrid< HostGrid, CoordFunction, Allocator > >
148 {
150 };
151
152#if HAVE_DUNE_METAGRID
153 template< class HostGrid >
154 struct supportsCallbackAdaptation< CartesianGrid< HostGrid > >
155 {
157 };
158#endif // #if HAVE_DUNE_METAGRID
159
160
161
162 // isLocallyAdaptive
163 // -----------------
164
165 template< class Grid >
167 {
168 static const bool v = false;
169 };
170
171 template< class Grid >
172 struct isLocallyAdaptive< const Grid >
173 {
175 };
176
177#if HAVE_DUNE_ALUGRID
178 template< int dim, int dimworld, ALUGridElementType elType, ALUGridRefinementType refineType, class Comm >
179 struct isLocallyAdaptive< ALUGrid< dim, dimworld, elType, refineType, Comm > >
180 {
181 static const bool v = true;
182 };
183#endif //#f HAVE_DUNE_ALUGRID
184
185#if HAVE_DUNE_P4ESTGRID
186 template< int dim, int dimworld, P4estType elType, class ctype >
187 struct isLocallyAdaptive< P4estGrid< dim, dimworld, elType, ctype > >
188 {
189 static const bool v = true;
190 };
191#endif // #if HAVE_DUNE_P4ESTGRID
192
193 template< int dim, int dimworld >
194 struct isLocallyAdaptive< AlbertaGrid< dim, dimworld > >
195 {
196 static const bool v = true;
197 };
198
199 template< int dim >
201 {
202 static const bool v = true;
203 };
204
205 template<>
207 {
208 static const bool v = true;
209 };
210
211 template< class HostGrid, class CoordFunction, class Allocator >
212 struct isLocallyAdaptive< GeometryGrid< HostGrid, CoordFunction, Allocator > >
213 {
215 };
216
217#if HAVE_DUNE_METAGRID
218 template< class HostGrid >
219 struct isLocallyAdaptive< CartesianGrid< HostGrid > >
220 {
221 static const bool v = isLocallyAdaptive< HostGrid > :: v;
222 };
223#endif // #if HAVE_DUNE_METAGRID
224
225
226
227 // isMMesh
228 // -------
229
230 template< class Grid >
231 struct isMMesh
232 {
233 static const bool v = false;
234 };
235
236 } // namespace Capabilities
237
238 } // namespace Fem
239
240} // namespace Dune
241
242#endif // #ifndef DUNE_FEM_CAPABILITIES_HH
size_type dim() const
Definition misc/capabilities.hh:97
static const bool v
Definition misc/capabilities.hh:104
static const bool value
Definition misc/capabilities.hh:105
Definition misc/capabilities.hh:114
static const bool v
Definition misc/capabilities.hh:115
Definition misc/capabilities.hh:167
static const bool v
Definition misc/capabilities.hh:168
Definition misc/capabilities.hh:232
static const bool v
Definition misc/capabilities.hh:233