diff --git a/src/const.h b/src/const.h index 65404d6a3e89d85c64c81e28c6eaf9e1884c82e2..e3a7756f5e1454e63817fef96db2ef076b43ece2 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.h b/src/hydro/Default/hydro.h index ee693d60999779d5a3cd888e4737208868879ba8..a316eb21db364b255ce9ccb4f97f39eb61e0330f 100644 --- a/src/hydro/Default/hydro.h +++ b/src/hydro/Default/hydro.h @@ -136,15 +136,12 @@ __attribute__((always_inline)) INLINE static void hydro_prepare_force( /* Some smoothing length multiples. */ const float h = p->h; const float ih = 1.0f / h; - const float ih2 = ih * ih; - const float ih4 = ih2 * ih2; /* Pre-compute some stuff for the balsara switch. */ - const float normDiv_v = fabs(p->density.div_v / p->rho * ih4); + const float normDiv_v = fabs(p->density.div_v); const float normRot_v = sqrtf(p->density.rot_v[0] * p->density.rot_v[0] + p->density.rot_v[1] * p->density.rot_v[1] + - p->density.rot_v[2] * p->density.rot_v[2]) / - p->rho * ih4; + p->density.rot_v[2] * p->density.rot_v[2]); /* Compute this particle's sound speed. */ const float u = p->u;