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_P4ESTGRID
139
140#if HAVE_DUNE_PERIODIC
141 template <class HG>
142 struct supportsCallbackAdaptation< Dune::Periodic::FlatPeriodicGrid<HG> >
143 {
144 using G = Dune::Periodic::FlatPeriodicGrid<HG>;
145 static const bool v = supportsCallbackAdaptation<typename G::HostEmbeddedGrid> :: v;
146 };
147#endif // #if HAVE_DUNE_PERIODIC
148
149 template< int dim, int dimworld >
151 {
152 static const bool v = true;
153 };
154
155 template< class HostGrid, class CoordFunction, class Allocator >
156 struct supportsCallbackAdaptation< GeometryGrid< HostGrid, CoordFunction, Allocator > >
157 {
159 };
160
161#if HAVE_DUNE_METAGRID
162 template< class HostGrid >
163 struct supportsCallbackAdaptation< CartesianGrid< HostGrid > >
164 {
166 };
167#endif // #if HAVE_DUNE_METAGRID
168
169
170
171 // isLocallyAdaptive
172 // -----------------
173
174 template< class Grid >
176 {
177 static const bool v = false;
178 };
179
180 template< class Grid >
181 struct isLocallyAdaptive< const Grid >
182 {
184 };
185
186#if HAVE_DUNE_ALUGRID
187 template< int dim, int dimworld, ALUGridElementType elType, ALUGridRefinementType refineType, class Comm >
188 struct isLocallyAdaptive< ALUGrid< dim, dimworld, elType, refineType, Comm > >
189 {
190 static const bool v = true;
191 };
192#endif //#f HAVE_DUNE_ALUGRID
193
194#if HAVE_DUNE_P4ESTGRID
195 template< int dim, int dimworld, P4estType elType, class ctype >
196 struct isLocallyAdaptive< P4estGrid< dim, dimworld, elType, ctype > >
197 {
198 static const bool v = true;
199 };
200#endif // #if HAVE_DUNE_P4ESTGRID
201
202#if HAVE_DUNE_PERIODIC
203 template <class HG>
204 struct isLocallyAdaptive< Dune::Periodic::FlatPeriodicGrid<HG> >
205 {
206 using G = Dune::Periodic::FlatPeriodicGrid<HG>;
207 static const bool v = isLocallyAdaptive<typename G::HostEmbeddedGrid> :: v;
208 };
209#endif //#f HAVE_DUNE_PERIODIC
210
211 template< int dim, int dimworld >
212 struct isLocallyAdaptive< AlbertaGrid< dim, dimworld > >
213 {
214 static const bool v = true;
215 };
216
217 template< int dim >
219 {
220 static const bool v = true;
221 };
222
223 template<>
225 {
226 static const bool v = true;
227 };
228
229 template< class HostGrid, class CoordFunction, class Allocator >
230 struct isLocallyAdaptive< GeometryGrid< HostGrid, CoordFunction, Allocator > >
231 {
233 };
234
235#if HAVE_DUNE_METAGRID
236 template< class HostGrid >
237 struct isLocallyAdaptive< CartesianGrid< HostGrid > >
238 {
239 static const bool v = isLocallyAdaptive< HostGrid > :: v;
240 };
241#endif // #if HAVE_DUNE_METAGRID
242
243
244
245 // isMMesh
246 // -------
247
248 template< class Grid >
249 struct isMMesh
250 {
251 static const bool v = false;
252 };
253
254 } // namespace Capabilities
255
256 } // namespace Fem
257
258} // namespace Dune
259
260#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:176
static const bool v
Definition misc/capabilities.hh:177
Definition misc/capabilities.hh:250
static const bool v
Definition misc/capabilities.hh:251