diff --git a/src/cell.c b/src/cell.c index 2f5dd3db170357e8bdd90daf645d640f3bf6110f..1854f7f24cd1fe19e0c364a43215ca5a10dc57d8 100644 --- a/src/cell.c +++ b/src/cell.c @@ -2375,7 +2375,7 @@ int cell_unskip_hydro_tasks(struct cell *c, struct scheduler *s) { if (c->kick1 != NULL) scheduler_activate(s, c->kick1); if (c->kick2 != NULL) scheduler_activate(s, c->kick2); if (c->timestep != NULL) scheduler_activate(s, c->timestep); - if (c->hydro.end_force != NULL) scheduler_activate(s, c->hydro.end_force); + if (c->end_force != NULL) scheduler_activate(s, c->end_force); if (c->hydro.cooling != NULL) scheduler_activate(s, c->hydro.cooling); if (c->sourceterms != NULL) scheduler_activate(s, c->sourceterms); } @@ -2521,7 +2521,7 @@ int cell_unskip_gravity_tasks(struct cell *c, struct scheduler *s) { if (c->kick1 != NULL) scheduler_activate(s, c->kick1); if (c->kick2 != NULL) scheduler_activate(s, c->kick2); if (c->timestep != NULL) scheduler_activate(s, c->timestep); - if (c->hydro.end_force != NULL) scheduler_activate(s, c->hydro.end_force); + if (c->end_force != NULL) scheduler_activate(s, c->end_force); if ((e->policy & engine_policy_cooling) && c->hydro.cooling != NULL) scheduler_activate(s, c->hydro.cooling); if (c->grav.down != NULL) scheduler_activate(s, c->grav.down); diff --git a/src/cell.h b/src/cell.h index 852a6e97936cf5b8755fe21e6d9e7bb899ae5312..c273ecf56a67852a6e587aff692f96a8001cc37f 100644 --- a/src/cell.h +++ b/src/cell.h @@ -320,9 +320,6 @@ struct cell { /*! The extra ghost task for complex hydro schemes */ struct task *extra_ghost; - /*! The task to end the force calculation */ - struct task *end_force; - /*! Task for cooling */ struct task *cooling; @@ -507,6 +504,9 @@ struct cell { } mpi; #endif + /*! The task to end the force calculation */ + struct task *end_force; + /*! The first kick task */ struct task *kick1; diff --git a/src/engine.c b/src/engine.c index 8b23eebc376397b6bc7ba943da6912c78477d9b6..9b1a1d763357e070b927a555c251276748b39387 100644 --- a/src/engine.c +++ b/src/engine.c @@ -233,19 +233,19 @@ void engine_make_hierarchical_tasks_common(struct engine *e, struct cell *c) { 0, 0, c, NULL); /* Add the task finishing the force calculation */ - c->hydro.end_force = scheduler_addtask(s, task_type_end_force, - task_subtype_none, 0, 0, c, NULL); + c->end_force = scheduler_addtask(s, task_type_end_force, + task_subtype_none, 0, 0, c, NULL); if (is_with_cooling) { c->hydro.cooling = scheduler_addtask(s, task_type_cooling, task_subtype_none, 0, 0, c, NULL); - scheduler_addunlock(s, c->hydro.end_force, c->hydro.cooling); + scheduler_addunlock(s, c->end_force, c->hydro.cooling); scheduler_addunlock(s, c->hydro.cooling, c->kick2); } else { - scheduler_addunlock(s, c->hydro.end_force, c->kick2); + scheduler_addunlock(s, c->end_force, c->kick2); } scheduler_addunlock(s, c->kick2, c->timestep); scheduler_addunlock(s, c->timestep, c->kick1); @@ -380,7 +380,7 @@ void engine_make_hierarchical_tasks_gravity(struct engine *e, struct cell *c) { if (periodic) scheduler_addunlock(s, c->grav.mesh, c->grav.down); scheduler_addunlock(s, c->grav.init, c->grav.long_range); scheduler_addunlock(s, c->grav.long_range, c->grav.down); - scheduler_addunlock(s, c->grav.down, c->super->hydro.end_force); + scheduler_addunlock(s, c->grav.down, c->super->end_force); /* Link in the implicit tasks */ scheduler_addunlock(s, c->grav.init, c->grav.init_out); @@ -1424,7 +1424,7 @@ void engine_addtasks_send_hydro(struct engine *e, struct cell *ci, #else /* The send_rho task should unlock the super_hydro-cell's kick task. */ - scheduler_addunlock(s, t_rho, ci->super->hydro.end_force); + scheduler_addunlock(s, t_rho, ci->super->end_force); /* The send_rho task depends on the cell's ghost task. */ scheduler_addunlock(s, ci->hydro.super->hydro.ghost_out, t_rho); @@ -2916,7 +2916,7 @@ void engine_link_gravity_tasks(struct engine *e) { /* drift -----> gravity --> end_force */ scheduler_addunlock(sched, ci->grav.super->grav.drift, t); - scheduler_addunlock(sched, t, ci->super->hydro.end_force); + scheduler_addunlock(sched, t, ci->super->end_force); } /* Otherwise, pair interaction? */ @@ -2967,7 +2967,7 @@ void engine_link_gravity_tasks(struct engine *e) { /* drift -----> gravity --> end_force */ scheduler_addunlock(sched, ci->grav.super->grav.drift, t); - scheduler_addunlock(sched, t, ci->super->hydro.end_force); + scheduler_addunlock(sched, t, ci->super->end_force); } /* Otherwise, sub-pair interaction? */ @@ -3122,7 +3122,7 @@ void engine_make_extra_hydroloop_tasks_mapper(void *map_data, int num_elements, /* Now, build all the dependencies for the hydro */ engine_make_hydro_loops_dependencies(sched, t, t2, t3, t->ci, with_cooling); - scheduler_addunlock(sched, t3, t->ci->super->hydro.end_force); + scheduler_addunlock(sched, t3, t->ci->super->end_force); #else /* Start by constructing the task for the second hydro loop */ @@ -3134,7 +3134,7 @@ void engine_make_extra_hydroloop_tasks_mapper(void *map_data, int num_elements, /* Now, build all the dependencies for the hydro */ engine_make_hydro_loops_dependencies(sched, t, t2, t->ci, with_cooling); - scheduler_addunlock(sched, t2, t->ci->super->hydro.end_force); + scheduler_addunlock(sched, t2, t->ci->super->end_force); #endif } @@ -3169,14 +3169,14 @@ void engine_make_extra_hydroloop_tasks_mapper(void *map_data, int num_elements, if (t->ci->nodeID == nodeID) { engine_make_hydro_loops_dependencies(sched, t, t2, t3, t->ci, with_cooling); - scheduler_addunlock(sched, t3, t->ci->super->hydro.end_force); + scheduler_addunlock(sched, t3, t->ci->super->end_force); } if (t->cj->nodeID == nodeID) { if (t->ci->hydro.super != t->cj->hydro.super) engine_make_hydro_loops_dependencies(sched, t, t2, t3, t->cj, with_cooling); if (t->ci->super != t->cj->super) - scheduler_addunlock(sched, t3, t->cj->super->hydro.end_force); + scheduler_addunlock(sched, t3, t->cj->super->end_force); } #else @@ -3193,14 +3193,14 @@ void engine_make_extra_hydroloop_tasks_mapper(void *map_data, int num_elements, /* that are local and are not descendant of the same super_hydro-cells */ if (t->ci->nodeID == nodeID) { engine_make_hydro_loops_dependencies(sched, t, t2, t->ci, with_cooling); - scheduler_addunlock(sched, t2, t->ci->super->hydro.end_force); + scheduler_addunlock(sched, t2, t->ci->super->end_force); } if (t->cj->nodeID == nodeID) { if (t->ci->hydro.super != t->cj->hydro.super) engine_make_hydro_loops_dependencies(sched, t, t2, t->cj, with_cooling); if (t->ci->super != t->cj->super) - scheduler_addunlock(sched, t2, t->cj->super->hydro.end_force); + scheduler_addunlock(sched, t2, t->cj->super->end_force); } #endif @@ -3234,7 +3234,7 @@ void engine_make_extra_hydroloop_tasks_mapper(void *map_data, int num_elements, if (t->ci->nodeID == nodeID) { engine_make_hydro_loops_dependencies(sched, t, t2, t3, t->ci, with_cooling); - scheduler_addunlock(sched, t3, t->ci->super->hydro.end_force); + scheduler_addunlock(sched, t3, t->ci->super->end_force); } #else @@ -3250,7 +3250,7 @@ void engine_make_extra_hydroloop_tasks_mapper(void *map_data, int num_elements, /* that are local and are not descendant of the same super_hydro-cells */ if (t->ci->nodeID == nodeID) { engine_make_hydro_loops_dependencies(sched, t, t2, t->ci, with_cooling); - scheduler_addunlock(sched, t2, t->ci->super->hydro.end_force); + scheduler_addunlock(sched, t2, t->ci->super->end_force); } #endif } @@ -3290,14 +3290,14 @@ void engine_make_extra_hydroloop_tasks_mapper(void *map_data, int num_elements, if (t->ci->nodeID == nodeID) { engine_make_hydro_loops_dependencies(sched, t, t2, t3, t->ci, with_cooling); - scheduler_addunlock(sched, t3, t->ci->super->hydro.end_force); + scheduler_addunlock(sched, t3, t->ci->super->end_force); } if (t->cj->nodeID == nodeID) { if (t->ci->hydro.super != t->cj->hydro.super) engine_make_hydro_loops_dependencies(sched, t, t2, t3, t->cj, with_cooling); if (t->ci->super != t->cj->super) - scheduler_addunlock(sched, t3, t->cj->super->hydro.end_force); + scheduler_addunlock(sched, t3, t->cj->super->end_force); } #else @@ -3314,14 +3314,14 @@ void engine_make_extra_hydroloop_tasks_mapper(void *map_data, int num_elements, /* that are local and are not descendant of the same super_hydro-cells */ if (t->ci->nodeID == nodeID) { engine_make_hydro_loops_dependencies(sched, t, t2, t->ci, with_cooling); - scheduler_addunlock(sched, t2, t->ci->super->hydro.end_force); + scheduler_addunlock(sched, t2, t->ci->super->end_force); } if (t->cj->nodeID == nodeID) { if (t->ci->hydro.super != t->cj->hydro.super) engine_make_hydro_loops_dependencies(sched, t, t2, t->cj, with_cooling); if (t->ci->super != t->cj->super) - scheduler_addunlock(sched, t2, t->cj->super->hydro.end_force); + scheduler_addunlock(sched, t2, t->cj->super->end_force); } #endif } @@ -3359,7 +3359,7 @@ void engine_link_stars_tasks_mapper(void *map_data, int num_elements, /* Now, build all the dependencies for the stars */ engine_make_stars_loops_dependencies(sched, t, t->ci); scheduler_addunlock(sched, t->ci->stars.ghost_out, - t->ci->super->hydro.end_force); + t->ci->super->end_force); } /* Otherwise, pair interaction? */ diff --git a/src/space.c b/src/space.c index 890fa7a063109b9b47c430285655b7034f795c80..e6c78d782ac6bd276414502b3d6f517d694d200e 100644 --- a/src/space.c +++ b/src/space.c @@ -191,7 +191,7 @@ void space_rebuild_recycle_mapper(void *map_data, int num_elements, c->kick1 = NULL; c->kick2 = NULL; c->timestep = NULL; - c->hydro.end_force = NULL; + c->end_force = NULL; c->hydro.drift = NULL; c->grav.drift = NULL; c->hydro.cooling = NULL;