3#ifndef DUNE_GEOGRID_CAPABILITIES_HH
4#define DUNE_GEOGRID_CAPABILITIES_HH
8#include <dune/common/hybridutilities.hh>
9#include <dune/common/std/utility.hh>
12#include <dune/grid/geometrygrid/declaration.hh>
20 namespace Capabilities
26 template<
class HostGr
id,
class CoordFunction,
class Allocator >
27 struct hasSingleGeometryType< GeometryGrid< HostGrid, CoordFunction, Allocator > >
29 static const bool v = hasSingleGeometryType< HostGrid > :: v;
30 static const unsigned int topologyId = hasSingleGeometryType< HostGrid > :: topologyId;
34 template<
class HostGr
id,
class CoordFunction,
class Allocator,
int codim >
35 struct hasEntity< GeometryGrid< HostGrid, CoordFunction, Allocator >, codim >
37 static const bool v =
true;
41 template<
class HostGr
id,
class CoordFunction,
class Allocator,
int codim >
42 struct hasEntityIterator< GeometryGrid< HostGrid, CoordFunction, Allocator >, codim >
44 static const bool v =
true;
48 template<
class HostGr
id,
class CoordFunction,
class Allocator,
int codim >
49 struct canCommunicate< GeometryGrid< HostGrid, CoordFunction, Allocator >, codim >
51 static const bool v = canCommunicate< HostGrid, codim >::v && hasEntity< HostGrid, codim >::v;
55 template<
class HostGr
id,
class CoordFunction,
class Allocator >
56 struct hasBackupRestoreFacilities< GeometryGrid< HostGrid, CoordFunction, Allocator > >
58 static const bool v = hasBackupRestoreFacilities< HostGrid >::v;
61 template<
class HostGr
id,
class CoordFunction,
class Allocator >
62 struct isLevelwiseConforming< GeometryGrid< HostGrid, CoordFunction, Allocator > >
64 static const bool v = isLevelwiseConforming< HostGrid >::v;
67 template<
class HostGr
id,
class CoordFunction,
class Allocator >
68 struct isLeafwiseConforming< GeometryGrid< HostGrid, CoordFunction, Allocator > >
70 static const bool v = isLeafwiseConforming< HostGrid >::v;
73 template<
class HostGr
id,
class CoordFunction,
class Allocator >
74 struct threadSafe< GeometryGrid< HostGrid, CoordFunction, Allocator > >
76 static const bool v =
false;
79 template<
class HostGr
id,
class CoordFunction,
class Allocator >
80 struct viewThreadSafe< GeometryGrid< HostGrid, CoordFunction, Allocator > >
82 static const bool v =
false;
91 template<
class Gr
id,
int codim >
94 template<
class Gr
id,
int codim >
95 struct hasHostEntity< const Grid, codim >
97 static const bool v = hasHostEntity< Grid, codim >::v;
100 template<
class HostGr
id,
class CoordFunction,
class Allocator,
int codim >
101 struct hasHostEntity< GeometryGrid< HostGrid, CoordFunction, Allocator >, codim >
103 static const bool v = hasEntity< HostGrid, codim >::v;
111 template<
class Gr
id >
121 [ & ](
auto i ){ hasHostEntity_[ i ] = Capabilities::hasHostEntity< Grid, i >::v; } );
124 static CodimCache &instance ()
126 static CodimCache singleton;
131 static bool hasHostEntity (
int codim )
133 assert( (codim >= 0) && (codim <= dimension) );
134 return instance().hasHostEntity_[ codim ];
@ dimension
The dimension of the grid.
Definition: grid.hh:387
A set of traits classes to store static information about grid implementation.
constexpr void forEach(Range &&range, F &&f)
Range based for loop.
Definition: hybridutilities.hh:308
Dune namespace.
Definition: alignedallocator.hh:10