Dune Core Modules (unstable)

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  {
191  static const bool v = Dune::Capabilities::isCartesian<Grid>::v;
192  };
193 
194  template<class Grid, int codim>
195  struct hasEntity<const Grid, codim>
196  {
197  static const bool v = Dune::Capabilities::hasEntity<Grid,codim>::v;
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>
213  struct isLevelwiseConforming<const Grid>
214  {
216  };
217 
218  template<class Grid>
219  struct isLeafwiseConforming<const Grid>
220  {
222  };
223 
224  template<class Grid>
225  struct hasBackupRestoreFacilities<const Grid>
226  {
228  };
229 
230  template <class Grid>
231  struct threadSafe<const Grid> {
232  static const bool v = Dune::Capabilities::threadSafe<Grid>::v;
233  };
234 
235  template <class Grid>
236  struct viewThreadSafe<const Grid> {
237  static const bool v = Dune::Capabilities::viewThreadSafe<Grid>::v;
238  };
239 
240  }
241 
242 }
243 
244 #endif // DUNE_GRID_COMMON_CAPABILITIES_HH
Grid abstract base class.
Definition: grid.hh:375
concept Grid
Requirements for implementations of the Dune::Grid interface.
Definition: grid.hh:98
Dune namespace.
Definition: alignedallocator.hh:13
specialize with 'true' for all codims that a grid can communicate data on (default=false)
Definition: capabilities.hh:97
Specialize with 'true' if implementation provides backup and restore facilities. (default=false)
Definition: capabilities.hh:124
specialize with 'true' for all codims that a grid provides an iterator for (default=hasEntity<codim>:...
Definition: capabilities.hh:74
Specialize with 'true' for all codims that a grid implements entities for. (default=false)
Definition: capabilities.hh:58
Specialize with 'false' for all codims that a grid does not implement geometries for....
Definition: capabilities.hh:84
Specialize with 'true' for if the codimension 0 entity of the grid has only one possible geometry typ...
Definition: capabilities.hh:27
Specialize with 'true' if the grid is a Cartesian grid. Cartesian grids satisfy the following propert...
Definition: capabilities.hh:48
Specialize with 'true' if implementation guarantees a conforming leaf grid. (default=false)
Definition: capabilities.hh:115
Specialize with 'true' if implementation guarantees conforming level grids. (default=false)
Definition: capabilities.hh:106
Specialize with 'true' if the grid implementation is thread safe. (default=false)
Definition: capabilities.hh:142
Specialize with 'true' if the grid implementation is thread safe, while it is not modified....
Definition: capabilities.hh:169
Creative Commons License   |  Legal Statements / Impressum  |  Hosted by TU Dresden  |  generated with Hugo v0.80.0 (Apr 24, 22:30, 2024)