utility/gridtype.hh

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

Generated on 9 Apr 2008 with Doxygen (ver 1.5.2) [logfile].