diff --git a/src/cell.c b/src/cell.c index fa6c972e7a12fcaebd66a10fabb6a3611da4cf71..28cb5f3fab11877474804737fdf5e2489b7c866e 100644 --- a/src/cell.c +++ b/src/cell.c @@ -3222,7 +3222,7 @@ int cell_unskip_hydro_tasks(struct cell *c, struct scheduler *s) { if (c->hydro.cooling != NULL) scheduler_activate(s, c->hydro.cooling); if (c->logger != NULL) scheduler_activate(s, c->logger); - if (c->hydro.star_formation != NULL) { + if (c->top->hydro.star_formation != NULL) { scheduler_activate(s, c->top->hydro.star_formation); cell_activate_drift_spart(c, s); } diff --git a/src/engine_marktasks.c b/src/engine_marktasks.c index d2bd1719e28696eb1fd52196b05d9141c5024ec1..e54465d0bf4b8e072d37b50e74c097086a31b8bc 100644 --- a/src/engine_marktasks.c +++ b/src/engine_marktasks.c @@ -665,7 +665,6 @@ void engine_marktasks_mapper(void *map_data, int num_elements, 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); } } } diff --git a/src/runner.c b/src/runner.c index 1a07da1069830e9a9969fd0b05457daf606d95eb..01514f7beee1ff085999a33b868c314ca625d12d 100644 --- a/src/runner.c +++ b/src/runner.c @@ -671,6 +671,8 @@ void runner_do_star_formation(struct runner *r, struct cell *c, int timer) { if (with_feedback && (c == c->hydro.super) && (current_stars_count != c->stars.count)) { + error("MATTHIEU needs to think a bit more here!"); + cell_clear_stars_sort_flags(c); runner_do_stars_sort(r, c, 0x1FFF, /*cleanup=*/0, /*timer=*/0); } diff --git a/src/space.c b/src/space.c index 1dc7d5cbe6200badcc744fec8c630863840c90e1..9c4bbe7a4f3f0a41a200f8664e4442787ace86c4 100644 --- a/src/space.c +++ b/src/space.c @@ -571,6 +571,7 @@ void space_regrid(struct space *s, int verbose) { c->hydro.count = 0; c->grav.count = 0; c->stars.count = 0; + c->top = c; c->super = c; c->hydro.super = c; c->grav.super = c; @@ -2769,6 +2770,7 @@ void space_split_recursive(struct space *s, struct cell *c, cp->stars.dx_max_sort = 0.f; cp->nodeID = c->nodeID; cp->parent = c; + cp->top = c->top; cp->super = NULL; cp->hydro.super = NULL; cp->grav.super = NULL;