From 0dd9426fe800d415db793a93aafb2d2cf0fc48a0 Mon Sep 17 00:00:00 2001 From: Matthieu Schaller <matthieu.schaller@durham.ac.uk> Date: Wed, 20 Jul 2016 15:18:21 +0100 Subject: [PATCH] Restore the union in the DEFAULT_SPH particle definition --- src/const.h | 4 +-- src/hydro/Default/hydro_part.h | 48 +++++++++++++++++----------------- 2 files changed, 26 insertions(+), 26 deletions(-) diff --git a/src/const.h b/src/const.h index e3a7756f5e..65404d6a3e 100644 --- a/src/const.h +++ b/src/const.h @@ -56,8 +56,8 @@ /* SPH variant to use */ //#define MINIMAL_SPH -//#define GADGET2_SPH -#define DEFAULT_SPH +#define GADGET2_SPH +//#define DEFAULT_SPH /* Gravity properties */ #define EXTERNAL_POTENTIAL_POINTMASS diff --git a/src/hydro/Default/hydro_part.h b/src/hydro/Default/hydro_part.h index 9461455872..fa207a7fb9 100644 --- a/src/hydro/Default/hydro_part.h +++ b/src/hydro/Default/hydro_part.h @@ -69,43 +69,43 @@ struct part { float alpha; /* Store density/force specific stuff. */ - // union { + union { - struct { + struct { - /* Particle velocity divergence. */ - float div_v; + /* Particle velocity divergence. */ + float div_v; - /* Derivative of particle number density. */ - float wcount_dh; + /* Derivative of particle number density. */ + float wcount_dh; - /* Particle velocity curl. */ - float rot_v[3]; + /* Particle velocity curl. */ + float rot_v[3]; - /* Particle number density. */ - float wcount; + /* Particle number density. */ + float wcount; - } density; + } density; - struct { + struct { - /* Balsara switch */ - float balsara; + /* Balsara switch */ + float balsara; - /* Aggregate quantities. */ - float POrho2; + /* Aggregate quantities. */ + float POrho2; - /* Change in particle energy over time. */ - float u_dt; + /* Change in particle energy over time. */ + float u_dt; - /* Signal velocity */ - float v_sig; + /* Signal velocity */ + float v_sig; - /* Sound speed */ - float c; + /* Sound speed */ + float c; - } force; - //}; + } force; + }; /* Particle mass. */ float mass; -- GitLab