dune-grid  2.11
common/capabilities.hh
Go to the documentation of this file.
1 // SPDX-FileCopyrightText: Copyright © DUNE Project contributors, see file LICENSE.md in module root
2 // SPDX-License-Identifier: LicenseRef-GPL-2.0-only-with-DUNE-exception
3 // -*- tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-
4 // vi: set et ts=4 sw=2 sts=2:
5 #ifndef DUNE_GRID_COMMON_CAPABILITIES_HH
6 #define DUNE_GRID_COMMON_CAPABILITIES_HH
7 
12 namespace Dune
13 {
14 
16  namespace Capabilities
17  {
18 
25  template<class Grid>
27  {
28  static const bool v = false;
29  // this value will be initialized with something big
30  // since it is invalid
31  static const unsigned int topologyId = ~0u;
32  };
33 
46  template<class Grid>
47  struct isCartesian
48  {
49  // default value is false
50  static const bool v = false;
51  };
52 
56  template<class Grid, int codim>
57  struct hasEntity
58  {
59  static const bool v = false;
60  };
61 
72  template< class Grid, int codim >
74  {
75  static const bool v = hasEntity<Grid, codim>::v;
76  };
77 
82  template<class Grid, int codim>
83  struct hasGeometry
84  {
85  static const bool v = true;
86  };
87 
95  template< class Grid, int codim >
97  {
98  static const bool v = false;
99  };
100 
104  template<class Grid>
106  {
107  static const bool v = false;
108  };
109 
113  template<class Grid>
115  {
116  static const bool v = false;
117  };
118 
122  template<class Grid>
124  {
125  static const bool v = false;
126  };
127 
141  template <class Grid>
142  struct threadSafe {
143  static const bool v = false;
144  };
145 
168  template <class Grid>
169  struct viewThreadSafe {
170  static const bool v = false;
171  };
172 
173  /*
174  forward
175  Capabilities::Something<const Grid>
176  to
177  Capabilities::Something<Grid>
178  */
179 
180  template<class Grid>
181  struct hasSingleGeometryType< const Grid >
182  {
184  static const unsigned int topologyId =
186  };
187 
188  template<class Grid>
189  struct isCartesian< const Grid >
190  {
192  };
193 
194  template<class Grid, int codim>
195  struct hasEntity<const Grid, codim>
196  {
198  };
199 
200  template< class Grid, int codim >
201  struct hasEntityIterator< const Grid, codim >
202  {
204  };
205 
206  template< class Grid, int codim >
207  struct canCommunicate< const Grid, codim >
208  {
210  };
211 
212  template<class Grid>
214  {
216  };
217 
218  template<class Grid>
220  {
222  };
223 
224  template<class Grid>
226  {
228  };
229 
230  template <class Grid>
231  struct threadSafe<const Grid> {
233  };
234 
235  template <class Grid>
236  struct viewThreadSafe<const Grid> {
238  };
239 
240  }
241 
242 }
243 
244 #endif // DUNE_GRID_COMMON_CAPABILITIES_HH
static const bool v
Definition: common/capabilities.hh:85
Specialize with &#39;true&#39; if the grid is a Cartesian grid. Cartesian grids satisfy the following propert...
Definition: common/capabilities.hh:47
static const bool v
Definition: common/capabilities.hh:50
static const bool v
Definition: common/capabilities.hh:98
Specialize with &#39;true&#39; for if the codimension 0 entity of the grid has only one possible geometry typ...
Definition: common/capabilities.hh:26
Grid abstract base classThis class is the base class for all grid implementations. Although no virtual functions are used we call it abstract since its methods do not contain an implementation but forward to the methods of the derived class via the Barton-Nackman trick.
Definition: common/grid.hh:375
static const bool v
Definition: common/capabilities.hh:116
static const bool v
Definition: common/capabilities.hh:125
Specialize with &#39;true&#39; for all codims that a grid implements entities for. (default=false) ...
Definition: common/capabilities.hh:57
Specialize with &#39;true&#39; if implementation guarantees a conforming leaf grid. (default=false) ...
Definition: common/capabilities.hh:114
Specialize with &#39;false&#39; for all codims that a grid does not implement geometries for. (default=true)
Definition: common/capabilities.hh:83
Include standard header files.
Definition: agrid.hh:59
static const bool v
Definition: common/capabilities.hh:75
Specialize with &#39;true&#39; if the grid implementation is thread safe. (default=false) ...
Definition: common/capabilities.hh:142
Specialize with &#39;true&#39; if implementation guarantees conforming level grids. (default=false) ...
Definition: common/capabilities.hh:105
static const bool v
Definition: common/capabilities.hh:107
static const bool v
Definition: common/capabilities.hh:28
specialize with &#39;true&#39; for all codims that a grid provides an iterator for (default=hasEntity<codim>:...
Definition: common/capabilities.hh:73
static const bool v
Definition: common/capabilities.hh:59
static const unsigned int topologyId
Definition: common/capabilities.hh:31
static const bool v
Definition: common/capabilities.hh:170
Specialize with &#39;true&#39; if implementation provides backup and restore facilities. (default=false) ...
Definition: common/capabilities.hh:123
specialize with &#39;true&#39; for all codims that a grid can communicate data on (default=false) ...
Definition: common/capabilities.hh:96
Specialize with &#39;true&#39; if the grid implementation is thread safe, while it is not modified...
Definition: common/capabilities.hh:169
static const bool v
Definition: common/capabilities.hh:143