Skip to content
Snippets Groups Projects
Commit 0266c335 authored by Jacob Kegerreis's avatar Jacob Kegerreis
Browse files

Add the defined viscosity beta to gizmo schemes too

parent d8c492ec
No related branches found
No related tags found
1 merge request!627Define the viscosity beta as a constant instead of a hardcoded value
...@@ -267,8 +267,7 @@ __attribute__((always_inline)) INLINE static void runner_iact_fluxes_common( ...@@ -267,8 +267,7 @@ __attribute__((always_inline)) INLINE static void runner_iact_fluxes_common(
const float dvdotdx = min(dvdr, 0.0f); const float dvdotdx = min(dvdr, 0.0f);
/* Get the signal velocity */ /* Get the signal velocity */
/* the magical factor 3 also appears in Gadget2 */ vmax -= 2.f * const_viscosity_beta_over_alpha * dvdotdx * r_inv;
vmax -= 3.0f * dvdotdx * r_inv;
/* Store the signal velocity */ /* Store the signal velocity */
pi->timestepvars.vmax = max(pi->timestepvars.vmax, vmax); pi->timestepvars.vmax = max(pi->timestepvars.vmax, vmax);
......
...@@ -271,8 +271,7 @@ __attribute__((always_inline)) INLINE static void runner_iact_fluxes_common( ...@@ -271,8 +271,7 @@ __attribute__((always_inline)) INLINE static void runner_iact_fluxes_common(
dvdotdx = min(dvdotdx, 0.f); dvdotdx = min(dvdotdx, 0.f);
/* Get the signal velocity */ /* Get the signal velocity */
/* the magical factor 3 also appears in Gadget2 */ vmax -= 2.f * const_viscosity_beta_over_alpha * dvdotdx * r_inv;
vmax -= 3.f * dvdotdx * r_inv;
/* Store the signal velocity */ /* Store the signal velocity */
pi->timestepvars.vmax = max(pi->timestepvars.vmax, vmax); pi->timestepvars.vmax = max(pi->timestepvars.vmax, vmax);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment