dune-grid  2.4
alugrid/common/capabilities.hh
Go to the documentation of this file.
1 // -*- tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-
2 // vi: set et ts=4 sw=2 sts=2:
3 #ifndef DUNE_ALUGRID_CAPABILITIES_HH
4 #define DUNE_ALUGRID_CAPABILITIES_HH
5 
6 // only include this code, if ENABLE_ALUGRID is defined
7 #if HAVE_ALUGRID
8 
9 #include <dune/common/deprecated.hh>
10 
14 #include <dune/geometry/genericgeometry/topologytypes.hh>
15 
21 namespace Dune
22 {
23 
24  namespace Capabilities
25  {
26 
27  // Capabilities for ALUGrid
28  // -------------------------------
29 
33  template< int dim, int dimworld, ALUGridElementType eltype, ALUGridRefinementType refinementtype, class Comm >
34  struct hasSingleGeometryType< ALUGrid< dim, dimworld, eltype, refinementtype, Comm > >
35  {
36  static const bool v = true;
37  static const unsigned int topologyId = (eltype == cube) ?
38  GenericGeometry :: CubeTopology< dim > :: type :: id :
39  GenericGeometry :: SimplexTopology< dim > :: type :: id ;
40  };
41 
45  template< int dim, int dimworld, ALUGridElementType eltype, ALUGridRefinementType refinementtype, class Comm, int cdim >
46  struct hasEntity< ALUGrid< dim, dimworld, eltype, refinementtype, Comm >, cdim >
47  {
48  static const bool v = true;
49  };
50 
54  template< int dim, int dimworld, ALUGridElementType eltype, ALUGridRefinementType refinementtype >
55  struct DUNE_DEPRECATED_MSG("Capabilities::isParallel will be removed after dune-grid-2.4.") isParallel< ALUGrid< dim, dimworld, eltype, refinementtype, No_Comm > >
56  {
57  static const bool DUNE_DEPRECATED_MSG("Capabilities::isParallel will be removed after dune-grid-2.4.") v = false;
58  };
59 
63 #if ALU3DGRID_PARALLEL
64  template< ALUGridElementType eltype, ALUGridRefinementType refinementtype >
65  struct DUNE_DEPRECATED_MSG("Capabilities::isParallel will be removed after dune-grid-2.4.") isParallel< ALUGrid< 3, 3, eltype, refinementtype, MPI_Comm > >
66  {
67  static const bool DUNE_DEPRECATED_MSG("Capabilities::isParallel will be removed after dune-grid-2.4.") v = true;
68  };
69 #endif
70 
74  template< int dim, int dimworld, ALUGridElementType eltype, ALUGridRefinementType refinementtype, int codim >
75  struct canCommunicate< ALUGrid< dim, dimworld, eltype, refinementtype, No_Comm >, codim >
76  {
77  static const bool v = false;
78  };
79 
83 #if ALU3DGRID_PARALLEL
84  template< ALUGridElementType eltype, ALUGridRefinementType refinementtype, int codim >
85  struct canCommunicate< ALUGrid< 3, 3, eltype, refinementtype, MPI_Comm >, codim >
86  {
87  static const bool v = true;
88  };
89 #endif
90 
94  template< int dim, int dimworld, ALUGridElementType eltype, ALUGridRefinementType refinementtype, class Comm >
95  struct isLevelwiseConforming< ALUGrid< dim, dimworld, eltype, refinementtype, Comm > >
96  {
97  static const bool v = refinementtype == nonconforming;
98  };
99 
103  template< int dim, int dimworld, ALUGridElementType eltype, ALUGridRefinementType refinementtype, class Comm >
104  struct isLeafwiseConforming< ALUGrid< dim, dimworld, eltype, refinementtype, Comm > >
105  {
106  static const bool v = refinementtype == conforming ;
107  };
108 
112  template< int dim, int dimworld, ALUGridElementType eltype, ALUGridRefinementType refinementtype, class Comm >
113  struct hasBackupRestoreFacilities< ALUGrid< dim, dimworld, eltype, refinementtype, Comm > >
114  {
115  static const bool v = true;
116  };
117 
118  } // end namespace Capabilities
119 
120 } //end namespace Dune
121 
122 #endif // #if HAVE_ALUGRID
123 
124 #endif // #ifdef DUNE_ALUGRID_CAPABILITIES_HH
Include standard header files.
Definition: agrid.hh:59
Definition: alugrid/common/declaration.hh:18
Definition: alugrid/common/declaration.hh:20
Definition: alugrid/common/declaration.hh:20
static const bool v
Definition: common/capabilities.hh:28
static const unsigned int topologyId
Definition: common/capabilities.hh:31
static const bool v
Definition: common/capabilities.hh:59
A set of traits classes to store static information about grid implementation.