dune-alugrid  2.8-git
capabilities.hh
Go to the documentation of this file.
1 #ifndef DUNE_ALUGRID_CAPABILITIES_HH
2 #define DUNE_ALUGRID_CAPABILITIES_HH
3 
4 #include <dune/common/version.hh>
5 #include <dune/geometry/type.hh>
6 #include <dune/grid/common/capabilities.hh>
8 
14 namespace Dune
15 {
16 
17  namespace Capabilities
18  {
19 
20  // Capabilities for ALUGrid
21  // ------------------------
22 
26  template< int dim, int dimworld, ALUGridElementType eltype, ALUGridRefinementType refinementtype, class Comm >
27  struct hasSingleGeometryType< ALUGrid< dim, dimworld, eltype, refinementtype, Comm > >
28  {
29  static const bool v = true;
30  static const unsigned int topologyId = (eltype == cube) ?
31  GeometryTypes::cube(dim).id() : GeometryTypes::simplex(dim).id();
32  };
33 
37  template< int dim, int dimworld, ALUGridElementType eltype, ALUGridRefinementType refinementtype, class Comm, int cdim >
38  struct hasEntity< ALUGrid< dim, dimworld, eltype, refinementtype, Comm >, cdim >
39  {
40  static const bool v = true;
41  };
42 
46  template< int dim, int dimworld, ALUGridElementType eltype, ALUGridRefinementType refinementtype, class Comm, int cdim >
47  struct hasEntityIterator< ALUGrid< dim, dimworld, eltype, refinementtype, Comm >, cdim >
48  : public hasEntity< ALUGrid< dim, dimworld, eltype, refinementtype, Comm >, cdim >
49  {
50  };
51 
55  template< int dim, int dimworld, ALUGridElementType eltype, ALUGridRefinementType refinementtype, int codim >
56  struct canCommunicate< ALUGrid< dim, dimworld, eltype, refinementtype, ALUGridNoComm >, codim >
57  {
58  static const bool v = false;
59  };
60 
64  template< int dim, int dimworld, ALUGridElementType eltype, ALUGridRefinementType refinementtype, int codim >
65  struct canCommunicate< ALUGrid< dim, dimworld, eltype, refinementtype, ALUGridMPIComm >, codim >
66  {
67  static const bool v = true;
68  };
69 
73  template< int dim, int dimworld, ALUGridElementType eltype, ALUGridRefinementType refinementtype, class Comm >
74  struct isLevelwiseConforming< ALUGrid< dim, dimworld, eltype, refinementtype, Comm > >
75  {
76  static const bool v = refinementtype == nonconforming;
77  };
78 
82  template< int dim, int dimworld, ALUGridElementType eltype, ALUGridRefinementType refinementtype, class Comm >
83  struct isLeafwiseConforming< ALUGrid< dim, dimworld, eltype, refinementtype, Comm > >
84  {
85  static const bool v = refinementtype == conforming ;
86  };
87 
91  template< int dim, int dimworld, ALUGridElementType eltype, ALUGridRefinementType refinementtype, class Comm >
92  struct hasBackupRestoreFacilities< ALUGrid< dim, dimworld, eltype, refinementtype, Comm > >
93  {
94  static const bool v = true;
95  };
96 
97  } // end namespace Capabilities
98 
99 } //end namespace Dune
100 
101 #endif // #ifdef DUNE_ALUGRID_CAPABILITIES_HH
Definition: alu3dinclude.hh:33
Definition: alu3dinclude.hh:63
@ simplex
use only simplex elements (i.e., triangles or tetrahedra)
Definition: declaration.hh:18
@ cube
use only cube elements (i.e., quadrilaterals or hexahedra)
Definition: declaration.hh:19
@ nonconforming
use non-conforming (red) refinement
Definition: declaration.hh:26
@ conforming
use conforming bisection refinement
Definition: declaration.hh:25
type of class for specialization of serial ALUGrid (No_Comm as communicator)
Definition: declaration.hh:31
type of class for specialization of parallel ALUGrid (MPI_Comm as communicator)
Definition: declaration.hh:43