capabilities.hh 3.57 KB
Newer Older
Stenger, Florian's avatar
v0.1.0  
Stenger, Florian committed
1
2
// -*- tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-
// vi: set et ts=4 sw=2 sts=2:
Praetorius, Simon's avatar
Praetorius, Simon committed
3
4
#ifndef DUNE_CURVED_SURFACE_GRID_CAPABILITIES_HH
#define DUNE_CURVED_SURFACE_GRID_CAPABILITIES_HH
Stenger, Florian's avatar
v0.1.0  
Stenger, Florian committed
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26

#include <cassert>

#include <dune/common/hybridutilities.hh>
#include <dune/common/std/utility.hh>

#include <dune/grid/common/capabilities.hh>
#include <dune/grid/geometrygrid/capabilities.hh>
#include <dune/curvedsurfacegrid/declaration.hh>

namespace Dune
{

  // Capabilities
  // ------------

  namespace Capabilities
  {

    // Capabilities from dune-grid
    // ---------------------------

Stenger, Florian's avatar
Stenger, Florian committed
27
28
    template< class HostGrid, class CoordFunction, int order, bool geoCaching, class Allocator >
    struct hasSingleGeometryType< CurvedSurfaceGrid< HostGrid, CoordFunction, order, geoCaching, Allocator > >
Stenger, Florian's avatar
v0.1.0  
Stenger, Florian committed
29
30
31
32
33
34
    {
      static const bool v = hasSingleGeometryType< HostGrid > :: v;
      static const unsigned int topologyId = hasSingleGeometryType< HostGrid > :: topologyId;
    };


Stenger, Florian's avatar
Stenger, Florian committed
35
36
    template< class HostGrid, class CoordFunction, int order, bool geoCaching, class Allocator, int codim >
    struct hasEntity< CurvedSurfaceGrid< HostGrid, CoordFunction, order, geoCaching, Allocator >, codim >
Stenger, Florian's avatar
v0.1.0  
Stenger, Florian committed
37
38
39
40
41
    {
      static const bool v = true;
    };


Stenger, Florian's avatar
Stenger, Florian committed
42
43
    template< class HostGrid, class CoordFunction, int order, bool geoCaching, class Allocator, int codim >
    struct hasEntityIterator< CurvedSurfaceGrid< HostGrid, CoordFunction, order, geoCaching, Allocator >, codim >
Stenger, Florian's avatar
v0.1.0  
Stenger, Florian committed
44
45
46
47
48
    {
      static const bool v = true;
    };


Stenger, Florian's avatar
Stenger, Florian committed
49
50
    template< class HostGrid, class CoordFunction, int order, bool geoCaching, class Allocator, int codim >
    struct canCommunicate< CurvedSurfaceGrid< HostGrid, CoordFunction, order, geoCaching, Allocator >, codim >
Stenger, Florian's avatar
v0.1.0  
Stenger, Florian committed
51
52
53
54
55
    {
      static const bool v = canCommunicate< HostGrid, codim >::v && hasEntity< HostGrid, codim >::v;
    };


Stenger, Florian's avatar
Stenger, Florian committed
56
57
    template< class HostGrid, class CoordFunction, int order, bool geoCaching, class Allocator >
    struct hasBackupRestoreFacilities< CurvedSurfaceGrid< HostGrid, CoordFunction, order, geoCaching, Allocator > >
Stenger, Florian's avatar
v0.1.0  
Stenger, Florian committed
58
59
60
61
    {
      static const bool v = hasBackupRestoreFacilities< HostGrid >::v;
    };

Stenger, Florian's avatar
Stenger, Florian committed
62
63
    template< class HostGrid, class CoordFunction, int order, bool geoCaching, class Allocator >
    struct isLevelwiseConforming< CurvedSurfaceGrid< HostGrid, CoordFunction, order, geoCaching, Allocator > >
Stenger, Florian's avatar
v0.1.0  
Stenger, Florian committed
64
65
66
67
    {
      static const bool v = isLevelwiseConforming< HostGrid >::v;
    };

Stenger, Florian's avatar
Stenger, Florian committed
68
69
    template< class HostGrid, class CoordFunction, int order, bool geoCaching, class Allocator >
    struct isLeafwiseConforming< CurvedSurfaceGrid< HostGrid, CoordFunction, order, geoCaching, Allocator > >
Stenger, Florian's avatar
v0.1.0  
Stenger, Florian committed
70
71
72
73
    {
      static const bool v = isLeafwiseConforming< HostGrid >::v;
    };

Stenger, Florian's avatar
Stenger, Florian committed
74
75
    template< class HostGrid, class CoordFunction, int order, bool geoCaching, class Allocator >
    struct threadSafe< CurvedSurfaceGrid< HostGrid, CoordFunction, order, geoCaching, Allocator > >
Stenger, Florian's avatar
v0.1.0  
Stenger, Florian committed
76
77
78
79
    {
      static const bool v = false;
    };

Stenger, Florian's avatar
Stenger, Florian committed
80
81
    template< class HostGrid, class CoordFunction, int order, bool geoCaching, class Allocator >
    struct viewThreadSafe< CurvedSurfaceGrid< HostGrid, CoordFunction, order, geoCaching, Allocator > >
Stenger, Florian's avatar
v0.1.0  
Stenger, Florian committed
82
83
84
85
86
87
88
89
90
    {
      static const bool v = false;
    };



    // hasHostEntity
    // -------------

Stenger, Florian's avatar
Stenger, Florian committed
91
92
    template< class HostGrid, class CoordFunction, int order, bool geoCaching, class Allocator, int codim >
    struct hasHostEntity< CurvedSurfaceGrid< HostGrid, CoordFunction, order, geoCaching, Allocator >, codim >
Stenger, Florian's avatar
v0.1.0  
Stenger, Florian committed
93
94
95
96
97
98
99
100
    {
      static const bool v = hasEntity< HostGrid, codim >::v;
    };

  } // namespace Capabilities

} // namespace Dune

Praetorius, Simon's avatar
Praetorius, Simon committed
101
#endif // DUNE_CURVED_SURFACE_GRID_CAPABILITIES_HH