utility/griddim.hh
00001 #ifndef DUNE_GRIDDIM_HH
00002 #define DUNE_GRIDDIM_HH
00003
00004 #ifndef GRIDDIM
00005 #warning "GRIDDIM not defined, defaulting to GRIDDIM=3"
00006 #define GRIDDIM 3
00007 #endif
00008 #if not (GRIDDIM > 0)
00009 #error "GRIDDIM must be a positive integer."
00010 #endif
00011
00012 #ifndef WORLDDIM
00013 #define WORLDDIM GRIDDIM
00014 #endif
00015 #if (WORLDDIM < GRIDDIM)
00016 #error "WORLDDIM < GRIDDIM does not make sense."
00017 #endif
00018
00019 const int dimgrid = GRIDDIM;
00020 const int dimworld = WORLDDIM;
00021
00022 #endif