4 void SoundSpeed2 (
double **u,
double *cs2,
double *h,
int beg,
int end,
15 for (i = beg; i <= end; i++) cs2[i] =
g_gamma*u[i][PRS]/u[i][
RHO];
16 #elif EOS == ISOTHERMAL
33 for (i = beg; i <= end; i++){
36 #elif GEOMETRY == SPHERICAL
39 cs2[
i] = g_isoSoundSpeed*g_isoSoundSpeed/R;
46 for (j = beg; j <= end; j++) {
49 #elif GEOMETRY == SPHERICAL
52 cs2[
j] = g_isoSoundSpeed*g_isoSoundSpeed/R;
58 for (k = beg; k <= end; k++){
61 #elif GEOMETRY == SPHERICAL
64 cs2[
k] = g_isoSoundSpeed*g_isoSoundSpeed/R;
69 print (
"! SoundSpeed2: not defined for this EoS\n");
88 for (i = beg; i <= end; i++){
89 h[
i] = g_gammar*uprim[
i][PRS]/uprim[
i][
RHO];
91 #elif EOS == ISOTHERMAL
92 print (
" Enthalpy not defined for isothermal EoS\n");
108 for (i = is; i <= ie; i++){
112 #elif EOS == ISOTHERMAL || EOS == BAROTROPIC
113 print (
" Entropy not defined in isothermal or barotropic MHD\n");
void Enthalpy(double **v, real *h, int beg, int end)
void ENTROPY(real **v, real *s, int is, int ie)
void SoundSpeed2(double **v, double *cs2, double *h, int beg, int end, int pos, Grid *grid)
int g_i
x1 grid index when sweeping along the x2 or x3 direction.
int g_dir
Specifies the current sweep or direction of integration.
int g_j
x2 grid index when sweeping along the x1 or x3 direction.
void print(const char *fmt,...)
int g_k
x3 grid index when sweeping along the x1 or x2 direction.
#define QUIT_PLUTO(e_code)