dune-grid  2.3beta2
alugrid/2d/capabilities.hh
Go to the documentation of this file.
1 // -*- tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-
2 // vi: set et ts=4 sw=2 sts=2:
3 #ifndef DUNE_ALU2DGRID_CAPABILITIES_HH
4 #define DUNE_ALU2DGRID_CAPABILITIES_HH
5 
6 // only include this code, if ENABLE_ALUGRID is defined
7 #if HAVE_ALUGRID
8 
9 #include <dune/geometry/genericgeometry/topologytypes.hh>
10 
14 
15 
21 namespace Dune
22 {
23 
24  template< int dim, int dimworld >
25  class ALUSimplexGrid;
26 
27  template< int dim, int dimw >
28  class ALUCubeGrid;
29 
30  template< int dim, int dimworld >
31  class ALUConformGrid;
32 
33 
34 
35  namespace Capabilities
36  {
37 
38 
39  // Capabilities for ALUSimplexGrid
40  // -------------------------------
41 
45  template< int dimworld >
46  struct hasSingleGeometryType< ALUSimplexGrid< 2, dimworld > >
47  {
48  static const bool v = true;
49  static const unsigned int topologyId = GenericGeometry :: SimplexTopology< 2 > :: type :: id ;
50  };
51 
52 
56  template< int dimworld, int cdim >
57  struct hasEntity< ALUSimplexGrid< 2, dimworld >, cdim >
58  {
59  static const bool v = true;
60  };
61 
62 #if ALU2DGRID_PARALLEL
63 
66  //- default is false
67  template< int dimworld >
68  struct isParallel< ALUSimplexGrid< 2, dimworld > >
69  {
70  static const bool v = true;
71  };
72 #endif // #if ALU2DGRID_PARALLEL
73 
74 #if ALU2DGRID_PARALLEL
75 
78  //- default is false
79  template< int dimworld >
80  struct canCommunicate< ALUSimplexGrid< 2, dimworld >, 0 >
81  {
82  static const bool v = true;
83  };
84 #endif // #if ALU2DGRID_PARALLEL
85 
89  template< int dimworld >
90  struct isLevelwiseConforming< ALUSimplexGrid< 2, dimworld > >
91  {
92  static const bool v = true;
93  };
94 
98  template< int dimworld >
99  struct hasBackupRestoreFacilities< ALUSimplexGrid< 2, dimworld > >
100  {
101  static const bool v = true;
102  };
103 
104 
105 
106  // Capabilities for ALUCubeGrid
107  // ----------------------------
108 
112  template< int wdim >
113  struct hasSingleGeometryType< ALUCubeGrid< 2, wdim > >
114  {
115  static const bool v = true;
116  static const unsigned int topologyId = GenericGeometry :: CubeTopology< 2 > :: type :: id ;
117  };
118 
122  template< int wdim, int cdim >
123  struct hasEntity< Dune::ALUCubeGrid< 2, wdim >, cdim >
124  {
125  static const bool v = true;
126  };
127 
128 #if ALU2DGRID_PARALLEL
129 
132  //- default is false
133  template< int dimworld >
134  struct isParallel< ALUCubeGrid< 2, dimworld > >
135  {
136  static const bool v = true;
137  };
138 #endif // #if ALU2DGRID_PARALLEL
139 
140 #if ALU2DGRID_PARALLEL
141 
144  //- default is false
145  template< int dimworld >
146  struct canCommunicate< ALUCubeGrid< 2, dimworld >, 0 >
147  {
148  static const bool v = true;
149  };
150 #endif // #if ALU2DGRID_PARALLEL
151 
155  template<int wdim>
156  struct isLevelwiseConforming< Dune::ALUCubeGrid< 2, wdim > >
157  {
158  static const bool v = true;
159  };
160 
164  template<int wdim>
165  struct hasBackupRestoreFacilities< Dune::ALUCubeGrid< 2, wdim > >
166  {
167  static const bool v = true;
168  };
169 
170 
171 
172  // Capabilities for ALUConformGrid
173  // -------------------------------
174 
178  template< int dimworld >
179  struct hasSingleGeometryType< ALUConformGrid< 2, dimworld > >
180  {
181  static const bool v = true;
182  static const unsigned int topologyId = GenericGeometry :: SimplexTopology< 2 > :: type :: id ;
183  };
184 
188  template< int dimworld, int cdim >
189  struct hasEntity< ALUConformGrid< 2, dimworld >, cdim >
190  {
191  static const bool v = true;
192  };
193 
194 #if ALU2DGRID_PARALLEL
195 
198  //- default is false
199  template< int dimworld >
200  struct isParallel< ALUConformGrid< 2, dimworld > >
201  {
202  static const bool v = true;
203  };
204 #endif // #if ALU2DGRID_PARALLEL
205 
206 #if ALU2DGRID_PARALLEL
207 
210  //- default is false
211  template< int dimworld >
212  struct canCommunicate< ALUConformGrid< 2, dimworld >, 0 >
213  {
214  static const bool v = true;
215  };
216 #endif // #if ALU2DGRID_PARALLEL
217 
221  template< int dimworld >
222  struct isLeafwiseConforming< ALUConformGrid< 2, dimworld > >
223  {
224  static const bool v = true;
225  };
226 
230  template< int dimworld >
231  struct hasBackupRestoreFacilities< ALUConformGrid< 2, dimworld > >
232  {
233  static const bool v = true;
234  };
235 
236  } // namespace Capabilities
237 
238 } // namespace Dune
239 
240 #endif // #if HAVE_ALUGRID
241 
242 #endif // #ifndef DUNE_ALU2DGRID_CAPABILITIES_HH