Commit 9277b927 authored by Matthieu Schaller's avatar Matthieu Schaller
Browse files

Do not break the dependency chain when activating gravity tasks if cooling is on.

parent 8ffa6ba3
......@@ -2493,6 +2493,8 @@ int cell_unskip_gravity_tasks(struct cell *c, struct scheduler *s) {
if (c->kick2 != NULL) scheduler_activate(s, c->kick2);
if (c->timestep != NULL) scheduler_activate(s, c->timestep);
if (c->end_force != NULL) scheduler_activate(s, c->end_force);
if ((e->policy & engine_policy_cooling) && c->cooling != NULL)
scheduler_activate(s, c->cooling);
if (c->grav_down != NULL) scheduler_activate(s, c->grav_down);
if (c->grav_down_in != NULL) scheduler_activate(s, c->grav_down_in);
if (c->grav_mesh != NULL) scheduler_activate(s, c->grav_mesh);
......
......@@ -3774,8 +3774,9 @@ void engine_marktasks_mapper(void *map_data, int num_elements,
}
/* Subgrid tasks */
else if (t_type == task_type_cooling || t_type == task_type_sourceterms) {
if (cell_is_active_hydro(t->ci, e)) scheduler_activate(s, t);
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);
}
}
}
......
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