From b1682da6cde68b526a30522d079c91498735ecdf Mon Sep 17 00:00:00 2001 From: Matthieu Schaller <schaller@strw.leidenuniv.nl> Date: Sat, 23 Mar 2019 18:16:59 +0100 Subject: [PATCH] Revert "When activating the star formation task, first drift the star particles in the cell." This reverts commit be1c16721cd2691601f1f95ab859b0f44309d355. --- src/cell.c | 7 ++----- src/engine_marktasks.c | 14 +++++--------- 2 files changed, 7 insertions(+), 14 deletions(-) diff --git a/src/cell.c b/src/cell.c index 72e3884988..9fd32ed8c6 100644 --- a/src/cell.c +++ b/src/cell.c @@ -3226,12 +3226,9 @@ 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->logger != NULL) scheduler_activate(s, c->logger); - - if (c->hydro.star_formation != NULL) { + if (c->hydro.star_formation != NULL) scheduler_activate(s, c->hydro.star_formation); - cell_activate_drift_spart(c, s); - } + if (c->logger != NULL) scheduler_activate(s, c->logger); } return rebuild; diff --git a/src/engine_marktasks.c b/src/engine_marktasks.c index 9b34b3ea95..c02eb5d2bd 100644 --- a/src/engine_marktasks.c +++ b/src/engine_marktasks.c @@ -642,17 +642,13 @@ void engine_marktasks_mapper(void *map_data, int num_elements, scheduler_activate(s, t); } - /* Subgrid tasks: cooling */ + /* Subgrid tasks */ else if (t_type == task_type_cooling) { - 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)) { + 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)) scheduler_activate(s, t); - cell_activate_drift_spart(t->ci, s); - } } } } -- GitLab