/usr/include/dune/grid/geometrygrid/capabilities.hh is in libdune-grid-dev 2.2.1-2.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 | #ifndef DUNE_GEOGRID_CAPABILITIES_HH
#define DUNE_GEOGRID_CAPABILITIES_HH
#include <cassert>
#include <dune/common/forloop.hh>
#include <dune/grid/common/capabilities.hh>
#include <dune/grid/geometrygrid/declaration.hh>
namespace Dune
{
// Capabilities
// ------------
namespace Capabilities
{
// Capabilities from dune-grid
// ---------------------------
template< class HostGrid, class CoordFunction, class Allocator >
struct hasSingleGeometryType< GeometryGrid< HostGrid, CoordFunction, Allocator > >
{
static const bool v = hasSingleGeometryType< HostGrid > :: v;
static const unsigned int topologyId = hasSingleGeometryType< HostGrid > :: topologyId;
};
template< class HostGrid, class CoordFunction, class Allocator, int codim >
struct hasEntity< GeometryGrid< HostGrid, CoordFunction, Allocator >, codim >
{
static const bool v = true;
};
template< class HostGrid, class CoordFunction, class Allocator >
struct isParallel< GeometryGrid< HostGrid, CoordFunction, Allocator > >
{
static const bool v = isParallel< HostGrid >::v;
};
template< class HostGrid, class CoordFunction, class Allocator, int codim >
struct canCommunicate< GeometryGrid< HostGrid, CoordFunction, Allocator >, codim >
{
static const bool v = canCommunicate< HostGrid, codim >::v;
};
template< class HostGrid, class CoordFunction, class Allocator >
struct hasBackupRestoreFacilities< GeometryGrid< HostGrid, CoordFunction, Allocator > >
{
static const bool v = hasBackupRestoreFacilities< HostGrid >::v;
};
template< class HostGrid, class CoordFunction, class Allocator >
struct isLevelwiseConforming< GeometryGrid< HostGrid, CoordFunction, Allocator > >
{
static const bool v = isLevelwiseConforming< HostGrid >::v;
};
template< class HostGrid, class CoordFunction, class Allocator >
struct isLeafwiseConforming< GeometryGrid< HostGrid, CoordFunction, Allocator > >
{
static const bool v = isLeafwiseConforming< HostGrid >::v;
};
template< class HostGrid, class CoordFunction, class Allocator >
struct threadSafe< GeometryGrid< HostGrid, CoordFunction, Allocator > >
{
static const bool v = false;
};
template< class HostGrid, class CoordFunction, class Allocator >
struct viewThreadSafe< GeometryGrid< HostGrid, CoordFunction, Allocator > >
{
static const bool v = false;
};
// hasHostEntity
// -------------
template< class Grid, int codim >
struct hasHostEntity;
template< class Grid, int codim >
struct hasHostEntity< const Grid, codim >
{
static const bool v = hasHostEntity< Grid, codim >::v;
};
template< class HostGrid, class CoordFunction, class Allocator, int codim >
struct hasHostEntity< GeometryGrid< HostGrid, CoordFunction, Allocator >, codim >
{
static const bool v = hasEntity< HostGrid, codim >::v;
};
// CodimCache
// ----------
template< class Grid >
class CodimCache
{
static const int dimension = Grid::dimension;
template< int codim >
struct BuildCache;
bool hasHostEntity_[ Grid::dimension + 1 ];
CodimCache ()
{
Dune::ForLoop< BuildCache, 0, dimension >::apply( hasHostEntity_ );
}
static CodimCache &instance ()
{
static CodimCache singleton;
return singleton;
}
public:
static bool hasHostEntity ( int codim )
{
assert( (codim >= 0) && (codim <= dimension) );
return instance().hasHostEntity_[ codim ];
}
};
template< class Grid >
template< int codim >
struct CodimCache< Grid >::BuildCache
{
static void apply ( bool (&hasHostEntity)[ dimension + 1 ] )
{
hasHostEntity[ codim ] = Capabilities::hasHostEntity< Grid, codim >::v;
}
};
} // namespace Capabilities
} // namespace Dune
#endif // #ifndef DUNE_GEOGRID_CAPABILITIES_HH
|