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

Merge branch 'star_sort_bug_fix' into 'master'

Only trigger an emergency sort of the stars after star formation if we are…

Closes #555

See merge request !754
parents 5d48d7f7 0bda8d2e
Branches
Tags
1 merge request!754Only trigger an emergency sort of the stars after star formation if we are…
......@@ -573,6 +573,7 @@ void runner_do_star_formation(struct runner *r, struct cell *c, int timer) {
struct part *restrict parts = c->hydro.parts;
struct xpart *restrict xparts = c->hydro.xparts;
const int with_cosmology = (e->policy & engine_policy_cosmology);
const int with_feedback = (e->policy & engine_policy_feedback);
const struct hydro_props *restrict hydro_props = e->hydro_properties;
const struct unit_system *restrict us = e->internal_units;
struct cooling_function_data *restrict cooling = e->cooling_func;
......@@ -648,7 +649,8 @@ void runner_do_star_formation(struct runner *r, struct cell *c, int timer) {
/* If we formed any stars, the star sorts are now invalid. We need to
* re-compute them. */
if ((c == c->hydro.super) && (current_stars_count != c->stars.count)) {
if (with_feedback && (c == c->hydro.super) &&
(current_stars_count != c->stars.count)) {
cell_clear_stars_sort_flags(c, /*is_super=*/1);
runner_do_stars_sort(r, c, 0x1FFF, /*cleanup=*/0, /*timer=*/0);
}
......
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment