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

globals.h

Go to the documentation of this file.
00001 #ifndef GLOBALS_H
00002 #define GLOBALS_H  
00003 /*============================================================================*/
00004 /*! \file globals.h
00005  *  \brief Contains global variables.
00006  *
00007  * PURPOSE: Contains global variables:
00008  *   The first occurence in this file is included in main.c and defines the
00009  *   variables.  The second is included everywhere else.                      */
00010 /*============================================================================*/
00011 
00012 #ifdef MAIN_C
00013 
00014 Real CourNo;                 /*!< Courant, Friedrichs, & Lewy (CFL) number */
00015 #ifdef ISOTHERMAL
00016 Real Iso_csound;             /*!< isothermal sound speed */
00017 Real Iso_csound2;            /*!< isothermal sound speed squared */
00018 #elif defined ADIABATIC
00019 Real Gamma;                  /*!< adiabatic index (ratio of specific heats) */
00020 Real Gamma_1, Gamma_2;       /*!< (Gamma)-1 and (Gamma)-2 */
00021 #endif
00022 int myID_Comm_world; /*!< Rank (proc ID) in MPI_COMM_WORLD, 0 for single proc */
00023 
00024 GravPotFun_t StaticGravPot = NULL;
00025 CoolingFun_t CoolingFunc = NULL;
00026 #ifdef SELF_GRAVITY
00027 Real four_pi_G, grav_mean_rho;    /*!< 4\pi G and mean density in domain */
00028 #endif
00029 
00030 #ifdef SHEARING_BOX
00031 GravPotFun_t ShearingBoxPot = NULL;
00032 Real Omega_0, qshear; /*!< orbital freq and shear parameter dln\Omega/dlnr */
00033 enum SS2DCoord ShBoxCoord;
00034 #endif
00035 
00036 #ifdef PARTICLES
00037 TSFun_t     get_ts    = NULL;     /*!< get the stopping time */
00038 WeightFun_t getweight = NULL;     /*!< get weight function */
00039 #endif
00040 
00041 #ifdef THERMAL_CONDUCTION
00042 Real kappa_iso=0.0, kappa_aniso=0.0;         /*!< coeff of thermal conduction */
00043 #endif
00044 #ifdef RESISTIVITY
00045 Real eta_Ohm=0.0, Q_Hall=0.0, Q_AD=0.0;        /*!< diffusivities */
00046 Real d_ind;                                    /*!< index: n_e ~ d^(d_ind) */
00047 EtaFun_t get_myeta = NULL;       /*!< function to calculate the diffusivities */
00048 #endif
00049 #ifdef VISCOSITY
00050 Real nu_iso=0.0, nu_aniso=0.0;               /*!< coeff of viscosity */
00051 #endif
00052 
00053 #ifdef CYLINDRICAL
00054 StaticGravAcc_t x1GravAcc = NULL;
00055 Real *r=NULL, *ri=NULL;
00056 #ifdef FARGO
00057 OrbitalFun_t OrbitalProfile = NULL;
00058 ShearFun_t ShearProfile = NULL;
00059 #endif
00060 #endif
00061 
00062 /*----------------------------------------------------------------------------*/
00063 /* definitions included everywhere except main.c  */
00064 
00065 #else /* MAIN_C */
00066 
00067 extern Real CourNo;
00068 #ifdef ISOTHERMAL
00069 extern Real Iso_csound, Iso_csound2;
00070 #elif defined ADIABATIC
00071 extern Real Gamma, Gamma_1, Gamma_2;
00072 #endif
00073 extern int myID_Comm_world;
00074 
00075 extern GravPotFun_t StaticGravPot;
00076 extern CoolingFun_t CoolingFunc;
00077 #ifdef SELF_GRAVITY
00078 extern Real four_pi_G, grav_mean_rho;
00079 #endif
00080 
00081 #ifdef SHEARING_BOX
00082 extern GravPotFun_t ShearingBoxPot;
00083 extern Real Omega_0, qshear;
00084 extern enum SS2DCoord ShBoxCoord;
00085 #endif
00086 
00087 #ifdef PARTICLES
00088 extern Real alamcoeff, *grrhoa;
00089 extern TSFun_t     get_ts; 
00090 extern WeightFun_t getweight; 
00091 #endif
00092 
00093 #ifdef THERMAL_CONDUCTION
00094 extern Real kappa_iso, kappa_aniso;
00095 #endif
00096 #ifdef RESISTIVITY
00097 extern Real eta_Ohm, Q_Hall, Q_AD;
00098 extern Real d_ind;
00099 extern EtaFun_t get_myeta;
00100 #endif
00101 #ifdef VISCOSITY
00102 extern Real nu_iso, nu_aniso;
00103 #endif
00104 
00105 #ifdef CYLINDRICAL
00106 extern StaticGravAcc_t x1GravAcc;
00107 extern Real *r, *ri;
00108 #ifdef FARGO
00109 extern OrbitalFun_t OrbitalProfile;
00110 extern ShearFun_t ShearProfile;
00111 #endif
00112 #endif
00113 
00114 #endif /* MAIN_C */
00115 #endif /* GLOBALS_H */

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