• Main Page
  • Classes
  • Files
  • File List
  • File Members

show_config.c

Go to the documentation of this file.
00001 #include "copyright.h"
00002 /*============================================================================*/
00003 /*! \file show_config.c 
00004  *  \brief Outputs information on configuration of Athena.
00005  *
00006  * PURPOSE: Outputs information on configuration of Athena.
00007  *
00008  * CONTAINS PUBLIC FUNCTIONS:
00009  * - show_config()     - prints diagnostic message showinf code configuration 
00010  * - show_config_par() - adds configuration information to database used by par
00011  *============================================================================*/
00012 
00013 #include <stdio.h>
00014 #include "defs.h"
00015 #include "prototypes.h"
00016 
00017 /*----------------------------------------------------------------------------*/
00018 /*! \fn void show_config(void)
00019  *  \brief The packages and features reported on by this functin should
00020  *   be kept consistent with the optional packages and features added by the
00021  *   file configure.ac in the top-level directory   */
00022 
00023 void show_config(void)
00024 {
00025   int nscal;
00026   ath_pout(0,"\nConfiguration details:\n\n");
00027   ath_pout(0," Problem:                 %s\n",A_PROBLEM);
00028 
00029 #if defined(HYDRO)
00030   ath_pout(0," Gas properties:          HYDRO\n");
00031 #elif defined(MHD)
00032   ath_pout(0," Gas properties:          MHD\n");
00033 #endif
00034 
00035 #if defined(ADIABATIC)
00036   ath_pout(0," Equation of State:       ADIABATIC\n");
00037 #elif defined(ISOTHERMAL)
00038   ath_pout(0," Equation of State:       ISOTHERMAL\n");
00039 #else
00040   ath_pout(0," Equation of State:       " EOS_STR "\n");
00041 #endif
00042 
00043   nscal = NSCALARS;
00044   ath_pout(0," Passive scalars:         %d\n",nscal);
00045 
00046 #if defined(SELF_GRAVITY_USING_MULTIGRID)
00047   ath_pout(0," Self-gravity:            using multigrid\n");
00048 #elif defined(SELF_GRAVITY_USING_FFT)
00049   ath_pout(0," Self-gravity:            using FFTs\n");
00050 #elif defined(SELF_GRAVITY_USING_FFT_OBC)
00051   ath_pout(0," Self-gravity:            using FFT_OBC\n");
00052 #else
00053   ath_pout(0," Self-gravity:            OFF\n");
00054 #endif
00055 
00056 #if defined(RESISTIVITY)
00057   ath_pout(0," Resistivity:             ON\n");
00058 #else
00059   ath_pout(0," Resistivity:             OFF\n");
00060 #endif
00061 
00062 #if defined(VISCOSITY)
00063   ath_pout(0," Viscosity:               ON\n");
00064 #else
00065   ath_pout(0," Viscosity:               OFF\n");
00066 #endif
00067 
00068 #if defined(THERMAL_CONDUCTION)
00069   ath_pout(0," Thermal conduction:      ON\n");
00070 #else
00071   ath_pout(0," Thermal conduction:      OFF\n");
00072 #endif
00073 
00074 #if defined(PARTICLES)
00075   #if defined(FEEDBACK)
00076     ath_pout(0," Particles:               feedback\n");
00077   #else
00078     ath_pout(0," Particles:               passive\n");
00079   #endif
00080 #else
00081   ath_pout(0," Particles:               OFF\n");
00082 #endif
00083 
00084 #if defined(CYLINDRICAL)
00085   ath_pout(0," Coordinate System:       cylindrical\n");
00086 #else
00087   ath_pout(0," Coordinate System:       Cartesian\n");
00088 #endif
00089 
00090 #ifdef SPECIAL_RELATIVITY
00091   ath_pout(0," Special relativity:      ON\n");
00092 #else
00093   ath_pout(0," Special Relativity:      OFF\n");
00094 #endif
00095 
00096 #if defined(FIRST_ORDER)
00097   ath_pout(0," Order of Accuracy:       1 (FIRST_ORDER)\n");
00098 #elif defined(SECOND_ORDER_CHAR)
00099   ath_pout(0," Order of Accuracy:       2 (SECOND_ORDER_CHAR)\n");
00100 #elif defined(SECOND_ORDER_PRIM)
00101   ath_pout(0," Order of Accuracy:       2p (SECOND_ORDER_PRIM)\n");
00102 #elif defined(THIRD_ORDER_CHAR)
00103   ath_pout(0," Order of Accuracy:       3 (THIRD_ORDER_CHAR)\n");
00104 #elif defined(THIRD_ORDER_PRIM)
00105   ath_pout(0," Order of Accuracy:       3p (THIRD_ORDER_PRIM)\n");
00106 #endif
00107 
00108 #if defined(ROE_FLUX)
00109   ath_pout(0," Flux:                    roe\n");
00110 #elif defined(HLLE_FLUX)
00111   ath_pout(0," Flux:                    hlle\n");
00112 #elif defined(HLLD_FLUX)
00113   ath_pout(0," Flux:                    hlld\n");
00114 #elif defined(HLLC_FLUX)
00115   ath_pout(0," Flux:                    hllc\n");
00116 #elif defined(FORCE_FLUX)
00117   ath_pout(0," Flux:                    force\n");
00118 #elif defined(EXACT_FLUX)
00119   ath_pout(0," Flux:                    exact\n");
00120 #elif defined(TWO_SHOCK_FLUX)
00121   ath_pout(0," Flux:                    two-shock\n");
00122 #endif
00123 
00124 #if defined(CTU_INTEGRATOR)
00125   ath_pout(0," Unsplit integrator:      ctu\n");
00126 #elif defined(VL_INTEGRATOR)
00127   ath_pout(0," Unsplit integrator:      vl\n");
00128 #endif
00129 
00130 #if defined(SINGLE_PREC)
00131   ath_pout(0," Precision:               SINGLE_PREC\n");
00132 #elif defined(DOUBLE_PREC)
00133   ath_pout(0," Precision:               DOUBLE_PREC\n");
00134 #endif
00135 
00136 #ifdef WRITE_GHOST_CELLS
00137   ath_pout(0," Ghost cell Output:       ON\n");
00138 #else
00139   ath_pout(0," Ghost cell Output:       OFF\n");
00140 #endif
00141 
00142 #if defined(MPI_PARALLEL)
00143   ath_pout(0," Parallel Modes: MPI:     ON\n");
00144 #else
00145   ath_pout(0," Parallel Modes: MPI:     OFF\n");
00146 #endif
00147 
00148 #ifdef H_CORRECTION
00149   ath_pout(0," H-correction:            ON\n");
00150 #else
00151   ath_pout(0," H-correction:            OFF\n");
00152 #endif
00153 
00154 #ifdef FFT_ENABLED
00155   ath_pout(0," FFT:                     ON\n");
00156 #else
00157   ath_pout(0," FFT:                     OFF\n");
00158 #endif
00159 
00160 #ifdef SHEARING_BOX
00161   ath_pout(0," Shearing Box:            ON\n");
00162 #else
00163   ath_pout(0," Shearing Box:            OFF\n");
00164 #endif
00165 
00166 #ifdef FARGO
00167   ath_pout(0," FARGO:                   ON\n");
00168 #else
00169   ath_pout(0," FARGO:                   OFF\n");
00170 #endif
00171 
00172 #ifdef HLL_ALL_WAVE
00173   ath_pout(0," All-wave integration:    ON\n");
00174 #else
00175   ath_pout(0," All-wave integration:    OFF\n");
00176 #endif
00177 
00178 #ifdef STATIC_MESH_REFINEMENT
00179   ath_pout(0," Static mesh refinement:  ON\n");
00180 #else
00181   ath_pout(0," Static mesh refinement:  OFF\n");
00182 #endif
00183 }
00184 
00185 /*----------------------------------------------------------------------------*/
00186 /*! \fn void show_config_par(void)
00187  *  \brief Add the configure block to the parameter database used
00188  *    by the functions in par.c.  */
00189 
00190 void show_config_par(void)
00191 {
00192   par_sets("configure","problem",A_PROBLEM,"Name of the problem file");
00193 
00194 #if defined(HYDRO)
00195   par_sets("configure","gas","hydro","Hydrodynamic gas");
00196 #elif defined(MHD)
00197   par_sets("configure","gas","mhd","Magnetohydrodynamic gas");
00198 #endif
00199 
00200 #if defined(ADIABATIC)
00201   par_sets("configure","eq_state","adiabatic","Equation of state");
00202 #elif defined(ISOTHERMAL)
00203   par_sets("configure","eq_state","isothermal","Equation of state");
00204 #else
00205   par_sets("configure","eq_state",EOS_STR,"Equation of state");
00206 #endif
00207 
00208   par_seti("configure","nscalars","%d",NSCALARS,"Number of passive scalars");
00209 
00210 #if defined(SELF_GRAVITY_USING_MULTIGRID)
00211   par_sets("configure","self-gravity","multigrid","Self-gravity algorithm");
00212 #elif defined(SELF_GRAVITY_USING_FFT)
00213   par_sets("configure","self-gravity","FFT","Self-gravity algorithm");
00214 #elif defined(SELF_GRAVITY_USING_FFT_OBC)
00215   par_sets("configure","self-gravity","FFT_OBC","Self-gravity algorithm");
00216 #else
00217   par_sets("configure","self-gravity","OFF","Self-gravity algorithm");
00218 #endif
00219 
00220 #if defined(RESISTIVTY)
00221   par_sets("configure","resistivity","ON","resistivity algorithm");
00222 #else
00223   par_sets("configure","resistivity","OFF","resistivity algorithm");
00224 #endif
00225 
00226 #if defined(VISCOSITY)
00227   par_sets("configure","viscosity","ON","viscosity algorithm");
00228 #else
00229   par_sets("configure","viscosity","OFF","viscosity algorithm");
00230 #endif
00231 
00232 #if defined(THERMAL_CONDUCTION)
00233   par_sets("configure","thermal conduction","ON","conduction algorithm");
00234 #else
00235   par_sets("configure","thermal conduction","OFF","conduction algorithm");
00236 #endif
00237 
00238 #if defined(PARTICLES)
00239   #if defined(FEEDBACK)
00240     par_sets("configure","particles","feedback","feedback algorithm");
00241   #else
00242     par_sets("configure","particles","passive","no feedback");
00243   #endif
00244 #else
00245     par_sets("configure","particles","none","no particles");
00246 #endif
00247 
00248 #if defined(CYLINDRICAL)
00249   par_sets("configure","coord","cylindrical","coordinate system");
00250 #else
00251   par_sets("configure","coord","Cartesian","coordinate system");
00252 #endif
00253 
00254 #if defined(SPECIAL_RELATIVITY)
00255   par_sets("configure","special relativity","yes","Special relativistic?");
00256 #else
00257   par_sets("configure","special relativity","no","Special relativistic?");
00258 #endif
00259 
00260 #if defined(FIRST_ORDER)
00261   par_seti("configure","order","%d",1,"Order of accuracy");
00262 #elif defined(SECOND_ORDER_CHAR)
00263   par_seti("configure","order","%d",2,"Order of accuracy");
00264 #elif defined(SECOND_ORDER_PRIM)
00265   par_sets("configure","order","2p","Order of accuracy");
00266 #elif defined(THIRD_ORDER_CHAR)
00267   par_seti("configure","order","%d",3,"Order of accuracy");
00268 #elif defined(THIRD_ORDER_PRIM)
00269   par_sets("configure","order","3p","Order of accuracy");
00270 #endif
00271 
00272 #if defined(ROE_FLUX)
00273   par_sets("configure","flux","roe","Flux function");
00274 #elif defined(HLLE_FLUX)
00275   par_sets("configure","flux","hlle","Flux function");
00276 #elif defined(HLLD_FLUX)
00277   par_sets("configure","flux","hlld","Flux function");
00278 #elif defined(HLLC_FLUX)
00279   par_sets("configure","flux","hllc","Flux function");
00280 #elif defined(FORCE_FLUX)
00281   par_sets("configure","flux","force","Flux function");
00282 #elif defined(EXACT_FLUX)
00283   par_sets("configure","flux","exact","Flux function");
00284 #elif defined(TWO_SHOCK_FLUX)
00285   par_sets("configure","flux","two-shock","Flux function");
00286 #endif
00287 
00288 #if defined(CTU_INTEGRATOR)
00289   par_sets("configure","integrator","ctu","Unsplit integrator");
00290 #elif defined(VL_INTEGRATOR)
00291   par_sets("configure","integrator","vl","Unsplit integrator");
00292 #endif
00293 
00294 #if defined(SINGLE_PREC)
00295   par_sets("configure","precision","single","Type of Real variables");
00296 #elif defined(DOUBLE_PREC)
00297   par_sets("configure","precision","double","Type of Real variables");
00298 #endif
00299 
00300 #ifdef WRITE_GHOST_CELLS
00301   par_sets("configure","write_ghost","yes","Ghost cells included in output?");
00302 #else
00303   par_sets("configure","write_ghost","no","Ghost cells included in output?");
00304 #endif
00305 
00306 #if defined(MPI_PARALLEL)
00307   par_sets("configure","mpi","yes","Is code MPI parallel enabled?");
00308 #else
00309   par_sets("configure","mpi","no","Is code MPI parallel enabled?");
00310 #endif
00311 
00312 #ifdef H_CORRECTION
00313   par_sets("configure","H-correction","yes","H-correction enabled?");
00314 #else
00315   par_sets("configure","H-correction","no","H-correction enabled?");
00316 #endif
00317 
00318 #ifdef FFT_ENABLED
00319   par_sets("configure","FFT","yes","FFT enabled?");
00320 #else
00321   par_sets("configure","FFT","no","FFT enabled?");
00322 #endif
00323 
00324 #ifdef SHEARING_BOX
00325   par_sets("configure","ShearingBox","yes","Shearing box enabled?");
00326 #else
00327   par_sets("configure","ShearingBox","no","Shearing box enabled?");
00328 #endif
00329 
00330 #ifdef FARGO
00331   par_sets("configure","FARGO","yes","FARGO enabled?");
00332 #else
00333   par_sets("configure","FARGO","no","FARGO enabled?");
00334 #endif
00335 
00336 #ifdef HLL_ALL_WAVE
00337   par_sets("configure","L/R integration style","yes","All-wave integration enabled?");
00338 #else
00339   par_sets("configure","L/R integration style","no","All-wave integration enabled?");
00340 #endif
00341 
00342 #ifdef STATIC_MESH_REFINEMENT
00343   par_sets("configure","SMR","yes","SMR enabled?");
00344 #else
00345   par_sets("configure","SMR","no","SMR enabled?");
00346 #endif
00347 
00348   return;
00349 }

Generated on Mon Sep 27 2010 23:03:08 for Athena by  doxygen 1.7.1