5#ifndef DUNE_GEOGRID_CAPABILITIES_HH
6#define DUNE_GEOGRID_CAPABILITIES_HH
12#include <dune/common/hybridutilities.hh>
15#include <dune/grid/geometrygrid/declaration.hh>
23 namespace Capabilities
29 template<
class HostGr
id,
class CoordFunction,
class Allocator >
30 struct hasSingleGeometryType< GeometryGrid< HostGrid, CoordFunction, Allocator > >
32 static const bool v = hasSingleGeometryType< HostGrid > :: v;
33 static const unsigned int topologyId = hasSingleGeometryType< HostGrid > :: topologyId;
37 template<
class HostGr
id,
class CoordFunction,
class Allocator,
int codim >
38 struct hasEntity< GeometryGrid< HostGrid, CoordFunction, Allocator >, codim >
40 static const bool v =
true;
44 template<
class HostGr
id,
class CoordFunction,
class Allocator,
int codim >
45 struct hasEntityIterator< GeometryGrid< HostGrid, CoordFunction, Allocator >, codim >
47 static const bool v = hasEntityIterator<HostGrid, codim>::v;
51 template<
class HostGr
id,
class CoordFunction,
class Allocator,
int codim >
52 struct canCommunicate< GeometryGrid< HostGrid, CoordFunction, Allocator >, codim >
54 static const bool v = canCommunicate< HostGrid, codim >::v && hasEntity< HostGrid, codim >::v;
58 template<
class HostGr
id,
class CoordFunction,
class Allocator >
59 struct hasBackupRestoreFacilities< GeometryGrid< HostGrid, CoordFunction, Allocator > >
61 static const bool v = hasBackupRestoreFacilities< HostGrid >::v && std::is_default_constructible< CoordFunction >::value;
64 template<
class HostGr
id,
class CoordFunction,
class Allocator >
65 struct isLevelwiseConforming< GeometryGrid< HostGrid, CoordFunction, Allocator > >
67 static const bool v = isLevelwiseConforming< HostGrid >::v;
70 template<
class HostGr
id,
class CoordFunction,
class Allocator >
71 struct isLeafwiseConforming< GeometryGrid< HostGrid, CoordFunction, Allocator > >
73 static const bool v = isLeafwiseConforming< HostGrid >::v;
76 template<
class HostGr
id,
class CoordFunction,
class Allocator >
77 struct threadSafe< GeometryGrid< HostGrid, CoordFunction, Allocator > >
79 static const bool v =
false;
82 template<
class HostGr
id,
class CoordFunction,
class Allocator >
83 struct viewThreadSafe< GeometryGrid< HostGrid, CoordFunction, Allocator > >
85 static const bool v =
false;
94 template<
class Gr
id,
int codim >
97 template<
class Gr
id,
int codim >
98 struct hasHostEntity< const Grid, codim >
100 static const bool v = hasHostEntity< Grid, codim >::v;
103 template<
class HostGr
id,
class CoordFunction,
class Allocator,
int codim >
104 struct hasHostEntity< GeometryGrid< HostGrid, CoordFunction, Allocator >, codim >
106 static const bool v = hasEntity< HostGrid, codim >::v;
114 template<
class Gr
id >
124 [ & ](
auto i ){ hasHostEntity_[ i ] = Capabilities::hasHostEntity< Grid, i >::v; } );
127 static CodimCache &instance ()
129 static CodimCache singleton;
134 static bool hasHostEntity (
int codim )
136 assert( (codim >= 0) && (codim <= dimension) );
137 return instance().hasHostEntity_[ codim ];
static constexpr int 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:256
Dune namespace.
Definition: alignedallocator.hh:13