Commit 4edeaaf1 authored by Matthieu Schaller's avatar Matthieu Schaller
Browse files

Merge branch 'upstream_bug_fix' into 'master'

Only unskip the resort task in cells that have non-zero gas particle counts.

See merge request !920
parents 2cf116fc 350ffb43
......@@ -2443,7 +2443,8 @@ void cell_activate_star_resort_tasks(struct cell *c, struct scheduler *s) {
/* The resort tasks are at either the chosen depth or the super level,
* whichever comes first. */
if (c->depth == engine_star_resort_task_depth || c->hydro.super == c) {
if ((c->depth == engine_star_resort_task_depth || c->hydro.super == c) &&
c->hydro.count > 0) {
scheduler_activate(s, c->hydro.stars_resort);
} else {
for (int k = 0; k < 8; ++k) {
......@@ -2486,6 +2487,10 @@ void cell_activate_star_formation_tasks(struct cell *c, struct scheduler *s) {
* @param s The #scheduler.
*/
void cell_activate_super_spart_drifts(struct cell *c, struct scheduler *s) {
/* Early abort? */
if (c->hydro.count == 0) return;
if (c == c->hydro.super) {
cell_activate_drift_spart(c, s);
} else {
......
Supports Markdown
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