diff --git a/src/cell.c b/src/cell.c index 9fd32ed8c6402d51358bcdc888aefaad16abe7c2..72e388498876c0fbad7f044853d306132c861830 100644 --- a/src/cell.c +++ b/src/cell.c @@ -3226,9 +3226,12 @@ int cell_unskip_hydro_tasks(struct cell *c, struct scheduler *s) { if (c->timestep != NULL) scheduler_activate(s, c->timestep); if (c->hydro.end_force != NULL) scheduler_activate(s, c->hydro.end_force); if (c->hydro.cooling != NULL) scheduler_activate(s, c->hydro.cooling); - if (c->hydro.star_formation != NULL) - scheduler_activate(s, c->hydro.star_formation); if (c->logger != NULL) scheduler_activate(s, c->logger); + + if (c->hydro.star_formation != NULL) { + scheduler_activate(s, c->hydro.star_formation); + cell_activate_drift_spart(c, s); + } } return rebuild; diff --git a/src/engine_marktasks.c b/src/engine_marktasks.c index c02eb5d2bd272111808701269faed07cef505449..9b34b3ea95a9ae8bc848a90113647b3e68b121b1 100644 --- a/src/engine_marktasks.c +++ b/src/engine_marktasks.c @@ -642,13 +642,17 @@ void engine_marktasks_mapper(void *map_data, int num_elements, scheduler_activate(s, t); } - /* Subgrid tasks */ + /* Subgrid tasks: cooling */ else if (t_type == task_type_cooling) { - if (cell_is_active_hydro(t->ci, e) || cell_is_active_gravity(t->ci, e)) - scheduler_activate(s, t); - } else if (t_type == task_type_star_formation) { - if (cell_is_active_hydro(t->ci, e) || cell_is_active_gravity(t->ci, e)) + if (cell_is_active_hydro(t->ci, e)) scheduler_activate(s, t); + } + + /* Subgrid tasks: star formation */ + else if (t_type == task_type_star_formation) { + if (cell_is_active_hydro(t->ci, e)) { scheduler_activate(s, t); + cell_activate_drift_spart(t->ci, s); + } } } }