00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023 #ifndef BL_SPACE_H
00024 #define BL_SPACE_H
00025
00026
00027
00028
00029
00030 #if defined(BL_SPACEDIM) && !defined(SPACEDIM)
00031 #define SPACEDIM BL_SPACEDIM
00032 #elif defined(SPACEDIM) && !defined(BL_SPACEDIM)
00033
00043 #define BL_SPACEDIM SPACEDIM
00044 #elif defined(BL_SPACEDIM) && defined(SPACEDIM)
00045 #elif BL_SPACEDIM != SPACEDIM
00046 #error SPACEDIM and BL_SPACEDIM must be identically defined
00047 #else
00048 #error At least one of BL_SPACEDIM or SPACEDIM must be defined
00049 #endif
00050
00051 #if (BL_SPACEDIM != 1 && BL_SPACEDIM !=2 && BL_SPACEDIM != 3)
00052 #error BL_SPACEDIM must be either 1, 2, or 3
00053 #endif
00054
00055 #if !defined(BL_LANG_FORT) || defined(BL_LANG_CC)
00056
00057
00069 namespace BoxLib
00070 {
00071 const int SpaceDim = BL_SPACEDIM;
00072 }
00073 #endif
00074
00075 #if BL_SPACEDIM==1
00076
00100 # define D_EXPR(a,b,c) ((void)((a),0))
00101
00123 # define D_DECL(a,b,c) a
00124
00146 # define D_TERM(a,b,c) a
00147
00168 # define D_PICK(a,b,c) a
00169 #elif BL_SPACEDIM==2
00170 # define D_EXPR(a,b,c) ((void)((a),(b),0))
00171 # define D_DECL(a,b,c) a,b
00172 # define D_TERM(a,b,c) a b
00173 # define D_PICK(a,b,c) b
00174 #elif BL_SPACEDIM==3
00175 # define D_EXPR(a,b,c) ((void)((a),(b),(c),0))
00176 # define D_DECL(a,b,c) a,b,c
00177 # define D_TERM(a,b,c) a b c
00178 # define D_PICK(a,b,c) c
00179 #endif
00180
00181 #endif