utility/gridtype.hh
Go to the documentation of this file.00001 #ifndef DUNE_GRIDTYPE_HH
00002 #define DUNE_GRIDTYPE_HH
00003
00083 #include <dune/grid/utility/griddim.hh>
00084
00085
00086 #if defined ALBERTAGRID
00087 #if HAVE_GRIDTYPE
00088 #error "Ambiguous definition of GRIDTYPE."
00089 #endif
00090 #if not HAVE_ALBERTA
00091 #error "ALBERTAGRID defined but no ALBERTA version found!"
00092 #endif
00093 #if (GRIDDIM < 2) || (GRIDDIM > 3)
00094 #error "ALBERTAGRID is only available for GRIDDIM=2 and GRIDDIM=3."
00095 #endif
00096 #if (WORLDDIM != GRIDDIM)
00097 #error "ALBERTAGRID currently only supports WORLDDIM=GRIDDIM."
00098 #endif
00099
00100 #include <dune/grid/albertagrid.hh>
00101 typedef Dune :: AlbertaGrid< dimgrid, dimworld > GridType;
00102 #define HAVE_GRIDTYPE 1
00103 #endif
00104
00105
00106
00107 #if defined ALUGRID_CUBE
00108 #if HAVE_GRIDTYPE
00109 #error "Ambiguous definition of GRIDTYPE."
00110 #endif
00111 #if not HAVE_ALUGRID
00112 #error "ALUGRID_CUBE defined but no ALUGRID version found!"
00113 #endif
00114 #if (GRIDDIM != 3) || (WORLDDIM != GRIDDIM)
00115 #error "ALUGRID_CUBE is only available for GRIDDIM=3 and WORLDDIM=GRIDDIM."
00116 #endif
00117
00118 #include <dune/grid/alugrid.hh>
00119 typedef Dune :: ALUCubeGrid< dimgrid, dimworld > GridType;
00120 #define HAVE_GRIDTYPE 1
00121 #endif
00122
00123 #if defined ALUGRID_SIMPLEX
00124 #if HAVE_GRIDTYPE
00125 #error "Ambiguous definition of GRIDTYPE."
00126 #endif
00127 #if not HAVE_ALUGRID
00128 #error "ALUGRID_SIMPLEX defined but no ALUGRID version found!"
00129 #endif
00130 #if (GRIDDIM < 2) || (GRIDDIM > 3)
00131 #error "ALUGRID_SIMPLEX is only available for GRIDDIM=2 and GRIDDIM=3."
00132 #endif
00133 #if (WORLDDIM != GRIDDIM)
00134 #error "ALUGRID_SIMPLEX is only available for WORLDDIM=GRIDDIM."
00135 #endif
00136
00137 #include <dune/grid/alugrid.hh>
00138 typedef Dune :: ALUSimplexGrid< dimgrid, dimworld > GridType;
00139 #define HAVE_GRIDTYPE 1
00140 #endif
00141
00142 #if defined ALUGRID_CONFORM
00143 #if HAVE_GRIDTYPE
00144 #error "Ambiguous definition of GRIDTYPE."
00145 #endif
00146 #if not HAVE_ALUGRID
00147 #error "ALUGRID_CONFORM defined but no ALUGRID version found!"
00148 #endif
00149 #if (GRIDDIM != 2) || (WORLDDIM != GRIDDIM)
00150 #error "ALUGRID_CONFORM is only available for GRIDDIM=2 and WORLDDIM=GRIDDIM."
00151 #endif
00152 #include <dune/grid/alugrid.hh>
00153 typedef Dune :: ALUConformGrid< dimgrid, dimworld > GridType;
00154 #define HAVE_GRIDTYPE 1
00155 #endif
00156
00157
00158
00159 #if defined ONEDGRID
00160 #if HAVE_GRIDTYPE
00161 #error "Ambiguous definition of GRIDTYPE."
00162 #endif
00163 #if (GRIDDIM != 1) || (WORLDDIM != GRIDDIM)
00164 #error "ONEDGRID is only available for GRIDDIM=1 and WORLDDIM=GRIDDIM."
00165 #endif
00166
00167 #include <dune/grid/onedgrid.hh>
00168 typedef Dune :: OneDGrid GridType;
00169 #define HAVE_GRIDTYPE 1
00170 #endif
00171
00172
00173
00174 #if defined SGRID
00175 #if HAVE_GRIDTYPE
00176 #error "Ambiguous definition of GRIDTYPE."
00177 #endif
00178 #if (GRIDDIM != WORLDDIM)
00179 #error "SGRID is only available for GRIDDIM=WORLDDIM."
00180 #endif
00181
00182 #include <dune/grid/sgrid.hh>
00183 typedef Dune :: SGrid< dimgrid, dimworld > GridType;
00184 #define HAVE_GRIDTYPE 1
00185 #endif
00186
00187
00188
00189 #if defined UGGRID
00190 #if HAVE_GRIDTYPE
00191 #error "Ambiguous definition of GRIDTYPE."
00192 #endif
00193 #if not HAVE_UG
00194 #error "UGGRID defined but no UG version found!"
00195 #endif
00196 #if (GRIDDIM < 2) || (GRIDDIM > 3)
00197 #error "UGGRID is only available for GRIDDIM=2 and GRIDDIM=3."
00198 #endif
00199 #if (GRIDDIM != WORLDDIM)
00200 #error "UGGRID only supports GRIDDIM=WORLDDIM."
00201 #endif
00202
00203 #include <dune/grid/uggrid.hh>
00204 typedef Dune :: UGGrid< dimgrid > GridType;
00205 #define HAVE_GRIDTYPE 1
00206 #endif
00207
00208
00209
00210 #if defined YASPGRID
00211 #if HAVE_GRIDTYPE
00212 #error "Ambiguous definition of GRIDTYPE."
00213 #endif
00214 #if (GRIDDIM != WORLDDIM)
00215 #error "YASPGRID only supports GRIDDIM=WORLDDIM."
00216 #endif
00217
00218 #include <dune/grid/yaspgrid.hh>
00219 typedef Dune :: YaspGrid< dimgrid > GridType;
00220 #define HAVE_GRIDTYPE 1
00221 #endif
00222
00223
00224
00225 #ifndef HAVE_GRIDTYPE
00226 #if (GRIDDIM != WORLDDIM)
00227 #error "No default grid available for GRIDDIM<WORLDDIM."
00228 #define HAVE_GRIDTYPE 0
00229 #else
00230 #warning "No GRIDTYPE defined, defaulting to YASPGRID."
00231
00232 #define YASPGRID
00233 #include <dune/grid/yaspgrid.hh>
00234 typedef Dune :: YaspGrid< dimgrid > GridType;
00235 #define HAVE_GRIDTYPE 1
00236 #endif
00237 #endif
00238
00239 #endif