diff --git a/src/hydro/Gadget2/hydro.h b/src/hydro/Gadget2/hydro.h index d82404f25e18f3d43b0aae922380350dfac05c90..9596eea18ba02d2eae07cf6f70772dfdd23cba3d 100644 --- a/src/hydro/Gadget2/hydro.h +++ b/src/hydro/Gadget2/hydro.h @@ -140,7 +140,7 @@ __attribute__((always_inline)) INLINE static void hydro_prepare_force( const float pressure = (p->entropy + p->force.entropy_dt * dt) * pow_gamma(p->rho); /* Divide the pressure by the density and density gradient */ - const float P_over_rho = pressure / (p->rho * p->rho) * p->rho_dh; + const float P_over_rho2 = pressure / (p->rho * p->rho) * p->rho_dh; /* Compute the sound speed */ const float soundspeed = sqrtf(hydro_gamma * pressure / p->rho); @@ -150,7 +150,7 @@ __attribute__((always_inline)) INLINE static void hydro_prepare_force( (fabsf(p->density.div_v) + curl_v + 0.0001f * p->force.soundspeed / fac_mu / p->h); /* Update variables. */ - p->force.P_over_rho = P_over_rho; + p->force.P_over_rho2 = P_over_rho2; p->force.soundspeed = soundspeed; p->force.balsara = balsara; } @@ -199,13 +199,13 @@ __attribute__((always_inline)) INLINE static void hydro_predict_extra( (p->entropy + p->force.entropy_dt * dt_entr) * pow_gamma(p->rho); /* Divide the pressure by the density and density gradient */ - const float P_over_rho = pressure / (p->rho * p->rho) * p->rho_dh; + const float P_over_rho2 = pressure / (p->rho * p->rho) * p->rho_dh; /* Compute the new sound speed */ const float soundspeed = sqrtf(hydro_gamma * pressure / p->rho); /* Update variables */ - p->force.P_over_rho = P_over_rho; + p->force.P_over_rho2 = P_over_rho2; p->force.soundspeed = soundspeed; } diff --git a/src/hydro/Gadget2/hydro_debug.h b/src/hydro/Gadget2/hydro_debug.h index 5a32e3b7530b133b3d473464df38147cd019afac..6ee819145766035d73c25f381099eb4a7268a129 100644 --- a/src/hydro/Gadget2/hydro_debug.h +++ b/src/hydro/Gadget2/hydro_debug.h @@ -23,7 +23,7 @@ __attribute__((always_inline)) INLINE static void hydro_debug_particle( "x=[%.3e,%.3e,%.3e], " "v=[%.3e,%.3e,%.3e],v_full=[%.3e,%.3e,%.3e] \n a=[%.3e,%.3e,%.3e],\n " "h=%.3e, " - "wcount=%d, wcount_dh=%.3e, m=%.3e, dh_drho=%.3e, rho=%.3e, P_over_rho=%.3e, " + "wcount=%d, wcount_dh=%.3e, m=%.3e, dh_drho=%.3e, rho=%.3e, P_over_rho2=%.3e, " "S=%.3e, " "dS/dt=%.3e, c=%.3e\n" "divV=%.3e, rotV=[%.3e,%.3e,%.3e], balsara=%.3e \n " @@ -31,7 +31,7 @@ __attribute__((always_inline)) INLINE static void hydro_debug_particle( p->x[0], p->x[1], p->x[2], p->v[0], p->v[1], p->v[2], xp->v_full[0], xp->v_full[1], xp->v_full[2], p->a_hydro[0], p->a_hydro[1], p->a_hydro[2], p->h, (int)p->density.wcount, p->density.wcount_dh, p->mass, p->rho_dh, - p->rho, p->force.P_over_rho, p->entropy, p->force.entropy_dt, p->force.soundspeed, + p->rho, p->force.P_over_rho2, p->entropy, p->force.entropy_dt, p->force.soundspeed, p->density.div_v, p->density.rot_v[0], p->density.rot_v[1], p->density.rot_v[2], p->force.balsara, p->force.v_sig, p->h_dt, p->ti_begin, p->ti_end); } diff --git a/src/hydro/Gadget2/hydro_part.h b/src/hydro/Gadget2/hydro_part.h index eb5e6e942616220cc7bbb81faf8becdd3f46d2da..2c5200b39b1729b79ece400fdbeee6e7a91575d0 100644 --- a/src/hydro/Gadget2/hydro_part.h +++ b/src/hydro/Gadget2/hydro_part.h @@ -93,8 +93,8 @@ struct part { /* Signal velocity. */ float v_sig; - /* Pressure over density*/ - float P_over_rho; + /* Pressure over density sqaured*/ + float P_over_rho2; /* Particle sound speed. */ float soundspeed;