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 >
41 struct isParallel< GeometryGrid< HostGrid, CoordFunction, Allocator > >
43 static const bool v = isParallel< HostGrid >::v;
47 template<
class HostGr
id,
class CoordFunction,
class Allocator,
int codim >
48 struct canCommunicate< GeometryGrid< HostGrid, CoordFunction, Allocator >, codim >
50 static const bool v = canCommunicate< HostGrid, codim >::v;
54 template<
class HostGr
id,
class CoordFunction,
class Allocator >
55 struct hasBackupRestoreFacilities< GeometryGrid< HostGrid, CoordFunction, Allocator > >
57 static const bool v = hasBackupRestoreFacilities< HostGrid >::v;
60 template<
class HostGr
id,
class CoordFunction,
class Allocator >
61 struct isLevelwiseConforming< GeometryGrid< HostGrid, CoordFunction, Allocator > >
63 static const bool v = isLevelwiseConforming< HostGrid >::v;
66 template<
class HostGr
id,
class CoordFunction,
class Allocator >
67 struct isLeafwiseConforming< GeometryGrid< HostGrid, CoordFunction, Allocator > >
69 static const bool v = isLeafwiseConforming< HostGrid >::v;
72 template<
class HostGr
id,
class CoordFunction,
class Allocator >
73 struct threadSafe< GeometryGrid< HostGrid, CoordFunction, Allocator > >
75 static const bool v =
false;
78 template<
class HostGr
id,
class CoordFunction,
class Allocator >
79 struct viewThreadSafe< GeometryGrid< HostGrid, CoordFunction, Allocator > >
81 static const bool v =
false;
90 template<
class Gr
id,
int codim >
93 template<
class Gr
id,
int codim >
94 struct hasHostEntity< const Grid, codim >
96 static const bool v = hasHostEntity< Grid, codim >::v;
99 template<
class HostGr
id,
class CoordFunction,
class Allocator,
int codim >
100 struct hasHostEntity< GeometryGrid< HostGrid, CoordFunction, Allocator >, codim >
102 static const bool v = hasEntity< HostGrid, codim >::v;
110 template<
class Gr
id >
115 template<
int codim >
125 static CodimCache &instance ()
127 static CodimCache singleton;
132 static bool hasHostEntity (
int codim )
134 assert( (codim >= 0) && (codim <= dimension) );
135 return instance().hasHostEntity_[ codim ];
139 template<
class Gr
id >
140 template<
int codim >
141 struct CodimCache< Grid >::BuildCache
143 static void apply (
bool (&hasHostEntity)[ dimension + 1 ] )
145 hasHostEntity[ codim ] = Capabilities::hasHostEntity< Grid, codim >::v;
A static loop using TMP.
Definition: forloop.hh:223
@ dimension
The dimension of the grid.
Definition: grid.hh:400
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:14