diff --git a/src/debug.c b/src/debug.c index e7b60c52f92fdb64fdefc8ac5c5e353f1ab57e6e..487fd53e74399ef7bd1802704adbf84bbc3dc0a3 100644 --- a/src/debug.c +++ b/src/debug.c @@ -32,6 +32,7 @@ /* Local includes. */ #include "config.h" #include "const.h" +#include "hydro.h" #include "inline.h" #include "part.h" diff --git a/src/hydro/Gadget2/hydro_part.h b/src/hydro/Gadget2/hydro_part.h index 02fd1bddcef97c336e88935f6e712e518081fa31..b2e5e53094525efe19f8b139f4d46ce48e9bb9cd 100644 --- a/src/hydro/Gadget2/hydro_part.h +++ b/src/hydro/Gadget2/hydro_part.h @@ -55,56 +55,52 @@ 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; - /* Derivative of the density with respect to smoothing length. */ + /* Derivative of the density with respect to smoothing length. */ float rho_dh; - union { + // union { - struct { + struct { - /* Number of neighbours. */ - float wcount; + /* Number of neighbours. */ + float wcount; - /* Number of neighbours spatial derivative. */ - float wcount_dh; + /* Number of neighbours spatial derivative. */ + float wcount_dh; - /* Particle velocity curl. */ - float rot_v[3]; + /* Particle velocity curl. */ + float rot_v[3]; - /* Particle velocity divergence. */ - float div_v; + /* Particle velocity divergence. */ + float div_v; - } density; + } density; - struct { + struct { - /* Balsara switch */ - float balsara; + /* Balsara switch */ + float balsara; - /* Pressure over density squared (including drho/dh term) */ - float P_over_rho2; + /* Pressure over density squared (including drho/dh term) */ + float P_over_rho2; - /* Particle sound speed. */ - float soundspeed; + /* Particle sound speed. */ + float soundspeed; - /* Signal velocity. */ - float v_sig; + /* Signal velocity. */ + float v_sig; - /* Entropy time derivative */ - float entropy_dt; + /* Entropy time derivative */ + float entropy_dt; - /* Time derivative of the smoothing length */ - float h_dt; + /* Time derivative of the smoothing length */ + float h_dt; - } force; - }; + } force; + // }; /* Particle ID. */ long long id;