Commit 3502cdb5 authored by Matthieu Schaller's avatar Matthieu Schaller

Merge branch 'fix_656' into 'master'

Give a sensible DM softening also for runs without DM

Closes #656

See merge request !1031
parents e8a895f8 ec80cf2b
......@@ -31,10 +31,9 @@ SPH:
# Parameters for the self-gravity scheme
Gravity:
eta: 0.025 # Constant dimensionless multiplier for time integration.
theta: 0.9
comoving_softening: 0.001 # Comoving softening length (in internal units).
max_physical_softening: 0.001 # Physical softening length (in internal units).
eta: 0.025 # Constant dimensionless multiplier for time integration.
theta: 0.7
max_physical_baryon_softening: 0.001 # Physical softening length (in internal units).
# Parameters related to the initial conditions
InitialConditions:
......
......@@ -44,10 +44,9 @@ SPH:
# Parameters for the self-gravity scheme
Gravity:
eta: 0.025 # Constant dimensionless multiplier for time integration.
theta: 0.7 # Opening angle (Multipole acceptance criterion)
comoving_baryon_softening: 0.003 # Comoving softening length (in internal units).
max_physical_baryon_softening: 0.003 # Physical softening length (in internal units).
eta: 0.025 # Constant dimensionless multiplier for time integration.
theta: 0.7 # Opening angle (Multipole acceptance criterion)
max_physical_baryon_softening: 0.003 # Physical softening length (in internal units).
# Parameters for the task scheduling
Scheduler:
......
......@@ -151,6 +151,12 @@ void gravity_props_init(struct gravity_props *p, struct swift_params *params,
params, "Gravity:max_physical_baryon_softening");
}
/* Some gravity models use the DM softening as the one and only softening
length that exists. So, if we don't have DM (e.g. hydro test or planetary
physics), we must have a non-zero epsilon. */
if (!has_DM && has_baryons)
p->epsilon_DM_max_physical = p->epsilon_baryon_max_physical;
p->epsilon_DM_comoving = p->epsilon_DM_max_physical;
p->epsilon_baryon_comoving = p->epsilon_baryon_max_physical;
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment