00001 #ifndef DUNE_GRIDTYPE_HH
00002 #define DUNE_GRIDTYPE_HH
00003
00086 #ifndef GRIDDIM
00087 #warning --- No GRIDDIM defined, defaulting to 3
00088 const int dimworld = 3;
00089 #define GRIDDIM 3
00090 #else
00091 const int dimworld = GRIDDIM;
00092 #endif
00093
00094 #include <dune/grid/yaspgrid.hh>
00095 #include <dune/grid/onedgrid.hh>
00096 #include <dune/grid/sgrid.hh>
00097 #ifdef HAVE_UG
00098 #include <dune/grid/uggrid.hh>
00099 #endif
00100 #ifdef HAVE_ALUGRID
00101 #include <dune/grid/alugrid.hh>
00102 #endif
00103
00104 #if defined ALBERTAGRID
00105 #if not HAVE_ALBERTA
00106 #error "ALBERTAGRID defined but no ALBERTA version found!"
00107 #endif
00108
00109 #include <dune/grid/albertagrid.hh>
00110 #if GRIDDIM < 2 || GRIDDIM > 3
00111 #error "ALBERTAGRID is only available for GRIDDIM=2 and GRIDDIM=3"
00112 #endif
00113 typedef Dune::AlbertaGrid<dimworld,dimworld> GridType;
00114 #elif defined ALUGRID_CUBE
00115 #if not HAVE_ALUGRID
00116 #error "ALUGRID_CUBE defined but no ALUGRID version found!"
00117 #endif
00118 #if GRIDDIM != 3
00119 #error ALUGRID_CUBE is only available for GRIDDIM=3
00120 #endif
00121 typedef Dune::ALUCubeGrid<dimworld,dimworld> GridType;
00122 #elif defined ALUGRID_SIMPLEX
00123 #if not HAVE_ALUGRID
00124 #error "ALUGRID_SIMPLEX defined but no ALUGRID version found!"
00125 #endif
00126 #if GRIDDIM < 2 || GRIDDIM > 3
00127 #error ALUGRID_SIMPLEX is only available for GRIDDIM=2 and GRIDDIM=3
00128 #endif
00129 typedef Dune::ALUSimplexGrid<dimworld,dimworld> GridType;
00130 #elif defined ALUGRID_CONFORM && HAVE_ALUGRID
00131 #if not HAVE_ALUGRID
00132 #error "ALUGRID_CONFORM defined but no ALUGRID version found!"
00133 #endif
00134 #if GRIDDIM != 3
00135 #error ALUGRID_CONFORM is only available for GRIDDIM=3
00136 #endif
00137 typedef Dune::ALUConformGrid<dimworld,dimworld> GridType;
00138 #elif defined ONEDGRID
00139 #if GRIDDIM != 1
00140 #error ONEDGRID is only available for GRIDDIM=1
00141 #endif
00142 typedef Dune::OneDGrid GridType;
00143 #elif defined SGRID
00144 typedef Dune::SGrid<dimworld,dimworld> GridType;
00145 #elif defined UGGRID
00146 #if not HAVE_UG
00147 #error "UGGRID defined but no UG version found!"
00148 #endif
00149 #if GRIDDIM < 2 || GRIDDIM > 3
00150 #error UGGRID is only available for GRIDDIM=2 and GRIDDIM=3
00151 #endif
00152 typedef Dune::UGGrid<dimworld> GridType;
00153 #elif defined YASPGRID
00154 typedef Dune::YaspGrid<dimworld,dimworld> GridType;
00155 #else
00156
00157 typedef Dune::YaspGrid<dimworld,dimworld> GridType;
00158 #warning --- No GRIDTYPE defined, defaulting to YASPGRID
00159 #endif
00160 #undef GRIDDIM
00161 #endif