Skip to content
Snippets Groups Projects
Commit 1a8c39aa authored by Matthieu Schaller's avatar Matthieu Schaller
Browse files

Make the minimal smoothing length used by SWIFT to match the Gadget definition...

Make the minimal smoothing length used by SWIFT to match the Gadget definition of the kernel support being a fixed fraction of the softening kernel support and not use 'h' directly.
parent bf716848
No related branches found
No related tags found
No related merge requests found
...@@ -332,8 +332,13 @@ void hydro_props_init_no_hydro(struct hydro_props *p) { ...@@ -332,8 +332,13 @@ void hydro_props_init_no_hydro(struct hydro_props *p) {
void hydro_props_update(struct hydro_props *p, const struct gravity_props *gp, void hydro_props_update(struct hydro_props *p, const struct gravity_props *gp,
const struct cosmology *cosmo) { const struct cosmology *cosmo) {
/* Update the minimal allowed smoothing length */ /* Update the minimal allowed smoothing length
p->h_min = p->h_min_ratio * gp->epsilon_cur; *
* We follow Gadget here and demand that the kernel support (h * gamma)
* is a fixed fraction of the radius at which the softened forces
* recover a Newtonian behaviour (i.e. 2.8 * Plummer equivalent softening
* in the case of a cubic spline kernel). */
p->h_min = p->h_min_ratio * gp->epsilon_cur / kernel_gamma;
} }
/** /**
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment