3#ifndef DUNE_GEOGRID_CAPABILITIES_HH
4#define DUNE_GEOGRID_CAPABILITIES_HH
10#include <dune/common/hybridutilities.hh>
13#include <dune/grid/geometrygrid/declaration.hh>
21 namespace Capabilities
27 template<
class HostGr
id,
class CoordFunction,
class Allocator >
28 struct hasSingleGeometryType< GeometryGrid< HostGrid, CoordFunction, Allocator > >
30 static const bool v = hasSingleGeometryType< HostGrid > :: v;
31 static const unsigned int topologyId = hasSingleGeometryType< HostGrid > :: topologyId;
35 template<
class HostGr
id,
class CoordFunction,
class Allocator,
int codim >
36 struct hasEntity< GeometryGrid< HostGrid, CoordFunction, Allocator >, codim >
38 static const bool v =
true;
42 template<
class HostGr
id,
class CoordFunction,
class Allocator,
int codim >
43 struct hasEntityIterator< GeometryGrid< HostGrid, CoordFunction, Allocator >, codim >
45 static const bool v = hasEntityIterator<HostGrid, codim>::v;
49 template<
class HostGr
id,
class CoordFunction,
class Allocator,
int codim >
50 struct canCommunicate< GeometryGrid< HostGrid, CoordFunction, Allocator >, codim >
52 static const bool v = canCommunicate< HostGrid, codim >::v && hasEntity< HostGrid, codim >::v;
56 template<
class HostGr
id,
class CoordFunction,
class Allocator >
57 struct hasBackupRestoreFacilities< GeometryGrid< HostGrid, CoordFunction, Allocator > >
59 static const bool v = hasBackupRestoreFacilities< HostGrid >::v && std::is_default_constructible< CoordFunction >::value;
62 template<
class HostGr
id,
class CoordFunction,
class Allocator >
63 struct isLevelwiseConforming< GeometryGrid< HostGrid, CoordFunction, Allocator > >
65 static const bool v = isLevelwiseConforming< HostGrid >::v;
68 template<
class HostGr
id,
class CoordFunction,
class Allocator >
69 struct isLeafwiseConforming< GeometryGrid< HostGrid, CoordFunction, Allocator > >
71 static const bool v = isLeafwiseConforming< HostGrid >::v;
74 template<
class HostGr
id,
class CoordFunction,
class Allocator >
75 struct threadSafe< GeometryGrid< HostGrid, CoordFunction, Allocator > >
77 static const bool v =
false;
80 template<
class HostGr
id,
class CoordFunction,
class Allocator >
81 struct viewThreadSafe< GeometryGrid< HostGrid, CoordFunction, Allocator > >
83 static const bool v =
false;
92 template<
class Gr
id,
int codim >
95 template<
class Gr
id,
int codim >
96 struct hasHostEntity< const Grid, codim >
98 static const bool v = hasHostEntity< Grid, codim >::v;
101 template<
class HostGr
id,
class CoordFunction,
class Allocator,
int codim >
102 struct hasHostEntity< GeometryGrid< HostGrid, CoordFunction, Allocator >, codim >
104 static const bool v = hasEntity< HostGrid, codim >::v;
112 template<
class Gr
id >
122 [ & ](
auto i ){ hasHostEntity_[ i ] = Capabilities::hasHostEntity< Grid, i >::v; } );
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 ];
@ dimension
The dimension of the grid.
Definition: grid.hh:386
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:266
Dune namespace.
Definition: alignedallocator.hh:11