Dune Core Modules (2.9.0)

capabilities.hh
Go to the documentation of this file.
1#ifndef DUNE_SPGRID_CAPABILITIES_HH
2#define DUNE_SPGRID_CAPABILITIES_HH
3
4#if HAVE_MPI
5#include <mpi.h>
6#endif
7
9
11
13
14#include <dune/grid/spgrid/declaration.hh>
15
21namespace Dune
22{
23
24 // Capabilities
25 // ------------
26
28 namespace Capabilities
29 {
30
35 template< class ct, int dim, template< int > class Ref, class Comm >
36 struct hasSingleGeometryType< SPGrid< ct, dim, Ref, Comm > >
37 {
40 static const bool v = true;
42 static const unsigned int topologyId = GeometryTypes::cube(dim).id();
43 };
44
58 template< class ct, int dim, template< int > class Ref, class Comm >
59 struct isCartesian< SPGrid< ct, dim, Ref, Comm > >
60 {
62 static const bool v = true;
63 };
64
70 template< class ct, int dim, template< int > class Ref, class Comm, int codim >
71 struct hasEntity< SPGrid< ct, dim, Ref, Comm >, codim >
72 {
75 static const bool v = ((codim >= 0) && (codim <= dim));
76 };
77
83 template< class ct, int dim, template< int > class Ref, class Comm, int codim >
84 struct hasEntityIterator< SPGrid< ct, dim, Ref, Comm >, codim >
85 : public hasEntity< SPGrid< ct, dim, Ref, Comm >, codim >
86 {
87 };
88
89#if HAVE_MPI
98 template< class ct, int dim, template< int > class Ref, int codim >
99 struct canCommunicate< SPGrid< ct, dim, Ref, MPI_Comm >, codim >
100 {
103 static const bool v = ((codim >= 0) && (codim <= dim));
104 };
105#endif // #if HAVE_MPI
106
111 template< class ct, int dim, template< int > class Ref, class Comm >
112 struct isLevelwiseConforming< SPGrid< ct, dim, Ref, Comm > >
113 {
115 static const bool v = true;
116 };
117
122 template< class ct, int dim, template< int > class Ref, class Comm >
123 struct isLeafwiseConforming< SPGrid< ct, dim, Ref, Comm > >
124 {
126 static const bool v = true;
127 };
128
133 template< class ct, int dim, template< int > class Ref, class Comm >
134 struct hasBackupRestoreFacilities< SPGrid< ct, dim, Ref, Comm > >
135 {
137 static const bool v = true;
138 };
139
144 template< class ct, int dim, template< int > class Ref, class Comm >
145 struct threadSafe< SPGrid< ct, dim, Ref, Comm > >
146 {
148 static const bool v = false;
149 };
150
155 template< class ct, int dim, template< int > class Ref, class Comm >
156 struct viewThreadSafe< SPGrid< ct, dim, Ref, Comm > >
157 {
159 static const bool v = true;
160 };
161
162
163
164 // non-standard capabilities (see dune-fem)
165 // ----------------------------------------
166
167 template< class Grid >
168 struct hasHierarchicIndexSet;
169
170 template< class ct, int dim, template< int > class Ref, class Comm >
171 struct hasHierarchicIndexSet< SPGrid< ct, dim, Ref, Comm > >
172 {
173 static const bool v = true;
174 };
175
176
177 template< class Grid >
178 struct supportsCallbackAdaptation;
179
186 template< class ct, int dim, template< int > class Ref, class Comm >
187 struct supportsCallbackAdaptation< SPGrid< ct, dim, Ref, Comm > >
188 {
190 static const bool v = true;
191 };
192
193 } // namespace Capabilities
194
195
196
197 // Extensions
198 // ----------
199
200 namespace Extensions
201 {
202
208 template< class ct, int dim, template< int > class Ref, class Comm, int codim >
209 struct SuperEntityIterator< SPGrid< ct, dim, Ref, Comm >, codim >
210 {
213 static const bool v = ((codim >= 0) && (codim <= dim));
214 };
215
216 } // namespace Extensions
217
218} // namespace Dune
219
220#endif // #ifndef DUNE_SPGRID_CAPABILITIES_HH
constexpr unsigned int id() const
Return the topology id of the type.
Definition: type.hh:376
structured, parallel DUNE grid
Definition: grid.hh:137
A set of traits classes to store static information about grid implementation.
interface classes for superentity iterators
constexpr GeometryType cube(unsigned int dim)
Returns a GeometryType representing a hypercube of dimension dim.
Definition: type.hh:472
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 '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
Does a grid support superentity iterators of a codimension?
Definition: superentityiterator.hh:82
static const bool v
by default, a grid does not support superentity iterators
Definition: superentityiterator.hh:84
A unique label for each type of element that can occur in a grid.
Creative Commons License   |  Legal Statements / Impressum  |  Hosted by TU Dresden  |  generated with Hugo v0.111.3 (Jul 15, 22:36, 2024)