From 45adeccf4a0d79bd1c8975a672477d928a19d601 Mon Sep 17 00:00:00 2001
From: James Willis <james.s.willis@durham.ac.uk>
Date: Fri, 22 Jul 2016 09:31:19 +0100
Subject: [PATCH] Minor change to name of variable.

---
 src/hydro/Gadget2/hydro.h       | 8 ++++----
 src/hydro/Gadget2/hydro_debug.h | 4 ++--
 src/hydro/Gadget2/hydro_part.h  | 4 ++--
 3 files changed, 8 insertions(+), 8 deletions(-)

diff --git a/src/hydro/Gadget2/hydro.h b/src/hydro/Gadget2/hydro.h
index d82404f25e..9596eea18b 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 5a32e3b753..6ee8191457 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 eb5e6e9426..2c5200b39b 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;
-- 
GitLab