dune-grid  3.0-git
common/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_CAPABILITIES_HH
4 #define DUNE_CAPABILITIES_HH
5 
10 namespace Dune
11 {
12 
14  namespace Capabilities
15  {
16 
23  template<class Grid>
25  {
26  static const bool v = false;
27  // this value will be initialized with something big
28  // since it is invalid
29  static const unsigned int topologyId = ~0u;
30  };
31 
44  template<class Grid>
45  struct isCartesian
46  {
47  // default value is false
48  static const bool v = false;
49  };
50 
54  template<class Grid, int codim>
55  struct hasEntity
56  {
57  static const bool v = false;
58  };
59 
67  template< class Grid, int codim >
69  {
70  static const bool v = false;
71  };
72 
76  template<class Grid>
78  {
79  static const bool v = false;
80  };
81 
85  template<class Grid>
87  {
88  static const bool v = false;
89  };
90 
94  template<class Grid>
96  {
97  static const bool v = false;
98  };
99 
113  template <class Grid>
114  struct threadSafe {
115  static const bool v = false;
116  };
117 
140  template <class Grid>
141  struct viewThreadSafe {
142  static const bool v = false;
143  };
144 
145  /*
146  forward
147  Capabilities::Something<const Grid>
148  to
149  Capabilities::Something<Grid>
150  */
151 
152  template<class Grid>
153  struct hasSingleGeometryType< const Grid >
154  {
156  static const unsigned int topologyId =
158  };
159 
160  template<class Grid>
161  struct isCartesian< const Grid >
162  {
164  };
165 
166  template<class Grid, int codim>
167  struct hasEntity<const Grid, codim>
168  {
170  };
171 
172  template< class Grid, int codim >
173  struct canCommunicate< const Grid, codim >
174  {
176  };
177 
178  template<class Grid>
180  {
182  };
183 
184  template<class Grid>
186  {
188  };
189 
190  template<class Grid>
192  {
194  };
195 
196  template <class Grid>
197  struct threadSafe<const Grid> {
199  };
200 
201  template <class Grid>
202  struct viewThreadSafe<const Grid> {
204  };
205 
206  }
207 
208 }
209 
210 #endif // DUNE_CAPABILITIES_HH
Dune::Capabilities::hasSingleGeometryType::topologyId
static const unsigned int topologyId
Definition: common/capabilities.hh:29
Dune::Capabilities::canCommunicate
specialize with 'true' for all codims that a grid can communicate data on (default=false)
Definition: common/capabilities.hh:68
Dune
Include standard header files.
Definition: agrid.hh:59
Dune::Capabilities::threadSafe
Specialize with 'true' if the grid implementation is thread safe. (default=false)
Definition: common/capabilities.hh:114
Dune::Capabilities::canCommunicate::v
static const bool v
Definition: common/capabilities.hh:70
Dune::Capabilities::isLeafwiseConforming
Specialize with 'true' if implementation guarantees a conforming leaf grid. (default=false)
Definition: common/capabilities.hh:86
Dune::Capabilities::hasBackupRestoreFacilities::v
static const bool v
Definition: common/capabilities.hh:97
Dune::Capabilities::hasEntity
Specialize with 'true' for all codims that a grid implements entities for. (default=false)
Definition: common/capabilities.hh:55
Dune::Capabilities::hasBackupRestoreFacilities
Specialize with 'true' if implementation provides backup and restore facilities. (default=false)
Definition: common/capabilities.hh:95
Dune::Capabilities::isLeafwiseConforming::v
static const bool v
Definition: common/capabilities.hh:88
Dune::Capabilities::hasSingleGeometryType
Specialize with 'true' for if the codimension 0 entity of the grid has only one possible geometry typ...
Definition: common/capabilities.hh:24
Dune::Capabilities::isLevelwiseConforming
Specialize with 'true' if implementation guarantees conforming level grids. (default=false)
Definition: common/capabilities.hh:77
Dune::Capabilities::hasSingleGeometryType::v
static const bool v
Definition: common/capabilities.hh:26
Dune::Capabilities::viewThreadSafe::v
static const bool v
Definition: common/capabilities.hh:142
Dune::Grid
Grid abstract base class.
Definition: common/grid.hh:373
Dune::Capabilities::isCartesian
Specialize with 'true' if the grid is a Cartesian grid. Cartesian grids satisfy the following propert...
Definition: common/capabilities.hh:45
Dune::Capabilities::hasEntity::v
static const bool v
Definition: common/capabilities.hh:57
Dune::Capabilities::isLevelwiseConforming::v
static const bool v
Definition: common/capabilities.hh:79
Dune::Capabilities::threadSafe::v
static const bool v
Definition: common/capabilities.hh:115
Dune::Capabilities::isCartesian::v
static const bool v
Definition: common/capabilities.hh:48
Dune::Capabilities::viewThreadSafe
Specialize with 'true' if the grid implementation is thread safe, while it is not modified....
Definition: common/capabilities.hh:141