From b8f4c77c145fbe0734f9256733bde0214928c42a Mon Sep 17 00:00:00 2001 From: James Willis <james.s.willis@durham.ac.uk> Date: Wed, 20 Jul 2016 16:09:47 +0100 Subject: [PATCH] Rearranged and replaced: div_v,curl_v->balsara,entropy_dt,pressure->P_over_rho variables of the part struct. --- src/hydro/Gadget2/hydro_part.h | 38 ++++++++++++++++++---------------- 1 file changed, 20 insertions(+), 18 deletions(-) diff --git a/src/hydro/Gadget2/hydro_part.h b/src/hydro/Gadget2/hydro_part.h index 863bdbefde..eb5e6e9426 100644 --- a/src/hydro/Gadget2/hydro_part.h +++ b/src/hydro/Gadget2/hydro_part.h @@ -25,6 +25,8 @@ struct xpart { /* Velocity at the last full step. */ float v_full[3]; + + } __attribute__((aligned(xpart_align))); @@ -55,15 +57,12 @@ struct part { /* Particle density. */ float rho; - /* Derivative of the density with respect to this particle's smoothing length. - */ - float rho_dh; - /* Particle entropy. */ float entropy; - /* Entropy time derivative */ - float entropy_dt; + /* Derivative of the density with respect to this particle's smoothing length. + */ + float rho_dh; /* Particle mass. */ float mass; @@ -72,37 +71,40 @@ struct part { struct { - /* Number of neighbours */ + /* Number of neighbours. */ float wcount; - /* Number of neighbours spatial derivative */ + /* Number of neighbours spatial derivative. */ float wcount_dh; - /* Velocity curl components */ + /* Particle velocity curl. */ float rot_v[3]; + /* Particle velocity divergence. */ + float div_v; + } density; struct { - /* Velocity curl norm*/ - float curl_v; + /* Balsara switch */ + float balsara; - /* Signal velocity */ + /* Signal velocity. */ float v_sig; - /* Particle pressure */ - float pressure; + /* Pressure over density*/ + float P_over_rho; - /* Particle sound speed */ + /* Particle sound speed. */ float soundspeed; + /* Entropy time derivative */ + float entropy_dt; + } force; }; - /* Velocity divergence */ - float div_v; - /* Particle ID. */ long long id; -- GitLab