1 #ifndef DUNE_FEM_GRIDPART_CAPABILITIES_HH 2 #define DUNE_FEM_GRIDPART_CAPABILITIES_HH 3 4 5 namespace Dune 6 { 7 8 namespace Fem 9 { 10 11 namespace GridPartCapabilities 12 { 13 /** \brief specialize with 'false' if grid part has no 14 * underlying dune grid (default=true) 15 */ 16 template< class GridPartType > 17 struct hasGrid 18 { 19 static const bool v = true; 20 }; 21 22 23 /** \brief specialize with 'true' for if the codimension 0 entity 24 * of the grid part has only one possible geometry type 25 * (default=false, topologyid=undefined) 26 */ 27 template< class GridPartType > 28 struct hasSingleGeometryType 29 { 30 static const bool v = false; 31 static const unsigned int topologyId = ~0u; 32 }; 33 34 35 /** \brief specialize with 'true' if the grid part is 36 * cartesian (default=false) 37 */ 38 template< class GridPartType > 39 struct isCartesian 40 { 41 static const bool v = false; 42 }; 43 44 45 /** \brief specialize with 'true' for all codims that a 46 grid implements entities for (default=false) 47 */ 48 template< class GridPartType, int codim > 49 struct hasEntity 50 { 51 static const bool v = false; 52 }; 53 54 55 /** \brief specialize with 'true' for all codims that a 56 * grid can communicate data on (default=false) 57 */ 58 template< class GridPartType, int codim > 59 struct canCommunicate 60 { 61 static const bool v = false; 62 }; 63 64 65 /** \brief specialize with 'true' if implementation guarantees 66 * conforming level grids. (default=false) 67 */ 68 template< class GridPartType > 69 struct isConforming 70 { 71 static const bool v = false; 72 }; 73 74 75 /* 76 * forward 77 * GridPartCapabilities::Something< const GridPartType > 78 * to 79 * GridPartCapabilities::Something< GridPartType > 80 */ 81 82 template< class GridPartType > 83 struct hasGrid< const GridPartType > 84 { 85 static const bool v = Dune::Fem::GridPartCapabilities::hasGrid< GridPartType >::v; 86 }; 87 88 89 template< class GridPartType > 90 struct hasSingleGeometryType< const GridPartType > 91 { 92 static const bool v = Dune::Fem::GridPartCapabilities::hasSingleGeometryType< GridPartType >::v; 93 static const unsigned int topologyId 94 = Dune::Fem::GridPartCapabilities::hasSingleGeometryType< GridPartType >::topologyId; 95 }; 96 97 98 template< class GridPartType > 99 struct isCartesian< const GridPartType > 100 { 101 static const bool v = Dune::Fem::GridPartCapabilities::isCartesian< GridPartType >::v; 102 }; 103 104 105 template< class GridPartType, int codim > 106 struct hasEntity< const GridPartType, codim > 107 { 108 static const bool v = Dune::Fem::GridPartCapabilities::hasEntity< GridPartType, codim >::v; 109 }; 110 111 112 template< class GridPartType, int codim > 113 struct canCommunicate< const GridPartType, codim > 114 { 115 static const bool v = Dune::Fem::GridPartCapabilities::canCommunicate< GridPartType, codim >::v; 116 }; 117 118 119 template< class GridPartType > 120 struct isConforming< const GridPartType > 121 { 122 static const bool v = Dune::Fem::GridPartCapabilities::isConforming< GridPartType >::v; 123 }; 124 125 } // namespace GridPartCapabilities 126 127 } // namespace Fem 128 129 } // namespace Dune 130 131 #endif // #ifndef DUNE_FEM_GRIDPART_CAPABILITIES_HH 132