Commit 30a0eca4 authored by Loic Hausammann's avatar Loic Hausammann

Task order: remove cooling

parent 1d676231
......@@ -1491,8 +1491,7 @@ case "$with_subgrid" in
with_subgrid_star_formation=GEAR
with_subgrid_feedback=GEAR
with_subgrid_black_holes=none
# GEAR's order is not used anymore
with_subgrid_task_order=default
with_subgrid_task_order=GEAR
enable_fof=no
;;
QLA)
......
This diff is collapsed.
......@@ -1166,7 +1166,8 @@ void engine_make_hierarchical_tasks_hydro(struct engine *e, struct cell *c,
c->hydro.cooling = scheduler_addtask(s, task_type_cooling,
task_subtype_none, 0, 0, c, NULL);
task_order_addunlock_cooling(s, c);
scheduler_addunlock(s, c->hydro.end_force, c->hydro.cooling);
scheduler_addunlock(s, c->hydro.cooling, c->super->kick2);
} else {
scheduler_addunlock(s, c->hydro.end_force, c->super->kick2);
......
......@@ -165,9 +165,9 @@ void runner_do_cooling(struct runner *r, struct cell *c, int timer) {
TIMER_TIC;
/* Anything to do here? (i.e. does this cell need updating?) */
if (!((task_order_cooling_after_timestep && cell_is_starting_hydro(c, e)) ||
(!task_order_cooling_after_timestep && cell_is_active_hydro(c, e))))
if (!cell_is_active_hydro(c, e)) {
return;
}
/* Recurse? */
if (c->split) {
......@@ -183,8 +183,7 @@ void runner_do_cooling(struct runner *r, struct cell *c, int timer) {
struct xpart *restrict xp = &xparts[i];
/* Anything to do here? (i.e. does this particle need updating?) */
if ((task_order_cooling_after_timestep && part_is_starting(p, e)) ||
(!task_order_cooling_after_timestep && part_is_active(p, e))) {
if (part_is_active(p, e)) {
double dt_cool, dt_therm;
if (with_cosmology) {
......
......@@ -24,11 +24,6 @@
*/
#define task_order_star_formation_before_feedback 1
/**
* Is the cooling task running after the time-step calculation task?
*/
#define task_order_cooling_after_timestep 0
/**
* @brief Place the star formation cell at the right place in the dependency
* graph.
......@@ -48,22 +43,4 @@ INLINE static void task_order_addunlock_star_formation_feedback(
c->stars.stars_in);
}
/**
* @brief Place the cooling cell at the right place in the dependency
* graph.
*
* The default model follows EAGLE.
*
* In EAGLE, the cooling takes place between the hydro and the kick2.
*
* @param s The #scheduler.
* @param c The #cell on which to act.
*/
INLINE static void task_order_addunlock_cooling(struct scheduler *s,
struct cell *c) {
scheduler_addunlock(s, c->hydro.end_force, c->hydro.cooling);
scheduler_addunlock(s, c->hydro.cooling, c->super->kick2);
}
#endif /* SWIFT_TASK_ORDER_EAGLE_H */
......@@ -24,11 +24,6 @@
*/
#define task_order_star_formation_before_feedback 0
/**
* Is the cooling task running after the time-step calculation task?
*/
#define task_order_cooling_after_timestep 1
/**
* @brief Place the star formation cell at the right place in the dependency
* graph.
......@@ -47,20 +42,4 @@ INLINE static void task_order_addunlock_star_formation_feedback(
scheduler_addunlock(s, c->stars.stars_out, c->top->hydro.star_formation);
}
/**
* @brief Place the cooling cell at the right place in the dependency
* graph.
*
* In GEAR, the cooling takes place after the kick1.
*
* @param s The #scheduler.
* @param c The #cell on which to act.
*/
INLINE static void task_order_addunlock_cooling(struct scheduler *s,
struct cell *c) {
scheduler_addunlock(s, c->super->kick1, c->hydro.cooling);
scheduler_addunlock(s, c->hydro.end_force, c->super->kick2);
}
#endif /* SWIFT_TASK_ORDER_GEAR_H */
......@@ -30,11 +30,6 @@
*/
#define task_order_star_formation_before_feedback 1
/**
* Is the cooling task running after the time-step calculation task?
*/
#define task_order_cooling_after_timestep 0
/**
* @brief Place the star formation cell at the right place in the dependency
* graph.
......@@ -56,22 +51,5 @@ INLINE static void task_order_addunlock_star_formation_feedback(
c->stars.stars_in);
}
/**
* @brief Place the cooling cell at the right place in the dependency
* graph.
*
* The default model follows EAGLE.
*
* In EAGLE, the cooling takes place between the hydro and the kick2.
*
* @param s The #scheduler.
* @param c The #cell on which to act.
*/
INLINE static void task_order_addunlock_cooling(struct scheduler *s,
struct cell *c) {
scheduler_addunlock(s, c->hydro.end_force, c->hydro.cooling);
scheduler_addunlock(s, c->hydro.cooling, c->super->kick2);
}
#endif /* SWIFT_TASK_ORDER_DEFAULT_H */
Markdown is supported
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