3#ifndef DUNE_GEOGRID_CAPABILITIES_HH
4#define DUNE_GEOGRID_CAPABILITIES_HH
11#include <dune/grid/geometrygrid/declaration.hh>
19 namespace Capabilities
25 template<
class HostGr
id,
class CoordFunction,
class Allocator >
26 struct hasSingleGeometryType< GeometryGrid< HostGrid, CoordFunction, Allocator > >
28 static const bool v = hasSingleGeometryType< HostGrid > :: v;
29 static const unsigned int topologyId = hasSingleGeometryType< HostGrid > :: topologyId;
33 template<
class HostGr
id,
class CoordFunction,
class Allocator,
int codim >
34 struct hasEntity< GeometryGrid< HostGrid, CoordFunction, Allocator >, codim >
36 static const bool v =
true;
40 template<
class HostGr
id,
class CoordFunction,
class Allocator,
int codim >
41 struct canCommunicate< GeometryGrid< HostGrid, CoordFunction, Allocator >, codim >
43 static const bool v = canCommunicate< HostGrid, codim >::v && hasEntity< HostGrid, codim >::v;
47 template<
class HostGr
id,
class CoordFunction,
class Allocator >
48 struct hasBackupRestoreFacilities< GeometryGrid< HostGrid, CoordFunction, Allocator > >
50 static const bool v = hasBackupRestoreFacilities< HostGrid >::v;
53 template<
class HostGr
id,
class CoordFunction,
class Allocator >
54 struct isLevelwiseConforming< GeometryGrid< HostGrid, CoordFunction, Allocator > >
56 static const bool v = isLevelwiseConforming< HostGrid >::v;
59 template<
class HostGr
id,
class CoordFunction,
class Allocator >
60 struct isLeafwiseConforming< GeometryGrid< HostGrid, CoordFunction, Allocator > >
62 static const bool v = isLeafwiseConforming< HostGrid >::v;
65 template<
class HostGr
id,
class CoordFunction,
class Allocator >
66 struct threadSafe< GeometryGrid< HostGrid, CoordFunction, Allocator > >
68 static const bool v =
false;
71 template<
class HostGr
id,
class CoordFunction,
class Allocator >
72 struct viewThreadSafe< GeometryGrid< HostGrid, CoordFunction, Allocator > >
74 static const bool v =
false;
83 template<
class Gr
id,
int codim >
86 template<
class Gr
id,
int codim >
87 struct hasHostEntity< const Grid, codim >
89 static const bool v = hasHostEntity< Grid, codim >::v;
92 template<
class HostGr
id,
class CoordFunction,
class Allocator,
int codim >
93 struct hasHostEntity< GeometryGrid< HostGrid, CoordFunction, Allocator >, codim >
95 static const bool v = hasEntity< HostGrid, codim >::v;
103 template<
class Gr
id >
108 template<
int codim >
118 static CodimCache &instance ()
120 static CodimCache singleton;
125 static bool hasHostEntity (
int codim )
127 assert( (codim >= 0) && (codim <= dimension) );
128 return instance().hasHostEntity_[ codim ];
132 template<
class Gr
id >
133 template<
int codim >
134 struct CodimCache< Grid >::BuildCache
136 static void apply (
bool (&hasHostEntity)[ dimension + 1 ] )
138 hasHostEntity[ codim ] = Capabilities::hasHostEntity< Grid, codim >::v;
@ dimension
The dimension of the grid.
Definition: grid.hh:387
A set of traits classes to store static information about grid implementation.
A static for loop for template meta-programming.
Dune namespace.
Definition: alignment.hh:11
A static loop using TMP.
Definition: forloop.hh:67