From 617110b12078ef4b926d05b8c12c4021ebe7dd2c Mon Sep 17 00:00:00 2001 From: Matthieu Schaller <matthieu.schaller@durham.ac.uk> Date: Mon, 9 Oct 2017 21:45:18 +0100 Subject: [PATCH] Removed unnecessary items and debugging code. --- src/cell.h | 6 ------ src/engine.c | 14 ++++++-------- src/multipole.h | 2 +- src/space.c | 6 ------ 4 files changed, 7 insertions(+), 21 deletions(-) diff --git a/src/cell.h b/src/cell.h index 74d4083071..df6d1e9c7c 100644 --- a/src/cell.h +++ b/src/cell.h @@ -247,9 +247,6 @@ struct cell { /* Task receiving gpart data. */ struct task *recv_grav; - /* Task receiving multipole data. */ - // struct task *recv_multipole; - /* Task receiving data (time-step). */ struct task *recv_ti; @@ -265,9 +262,6 @@ struct cell { /* Linked list for sending gpart data. */ struct link *send_grav; - /* Linked list for sending multipole data. */ - // struct link *send_multipole; - /* Linked list for sending data (time-step). */ struct link *send_ti; diff --git a/src/engine.c b/src/engine.c index 4bce99f25e..5e7aa207f2 100644 --- a/src/engine.c +++ b/src/engine.c @@ -1170,7 +1170,7 @@ void engine_addtasks_send_hydro(struct engine *e, struct cell *ci, */ void engine_addtasks_send_gravity(struct engine *e, struct cell *ci, struct cell *cj, struct task *t_grav, - struct task *t_multi, struct task *t_ti) { + struct task *t_ti) { #ifdef WITH_MPI struct link *l = NULL; @@ -1214,8 +1214,7 @@ void engine_addtasks_send_gravity(struct engine *e, struct cell *ci, if (ci->split) for (int k = 0; k < 8; k++) if (ci->progeny[k] != NULL) - engine_addtasks_send_gravity(e, ci->progeny[k], cj, t_grav, t_multi, - t_ti); + engine_addtasks_send_gravity(e, ci->progeny[k], cj, t_grav, t_ti); #else error("SWIFT was not compiled with MPI support."); @@ -1308,8 +1307,7 @@ void engine_addtasks_recv_hydro(struct engine *e, struct cell *c, * @param t_multi The recv_multipole #task, if it has already been created. */ void engine_addtasks_recv_gravity(struct engine *e, struct cell *c, - struct task *t_grav, struct task *t_multi, - struct task *t_ti) { + struct task *t_grav, struct task *t_ti) { #ifdef WITH_MPI struct scheduler *s = &e->sched; @@ -1337,7 +1335,7 @@ void engine_addtasks_recv_gravity(struct engine *e, struct cell *c, if (c->split) for (int k = 0; k < 8; k++) if (c->progeny[k] != NULL) - engine_addtasks_recv_gravity(e, c->progeny[k], t_grav, t_multi, t_ti); + engine_addtasks_recv_gravity(e, c->progeny[k], t_grav, t_ti); #else error("SWIFT was not compiled with MPI support."); @@ -2950,7 +2948,7 @@ void engine_maketasks(struct engine *e) { if (e->policy & engine_policy_self_gravity) for (int k = 0; k < p->nr_cells_in; k++) - engine_addtasks_recv_gravity(e, p->cells_in[k], NULL, NULL, NULL); + engine_addtasks_recv_gravity(e, p->cells_in[k], NULL, NULL); /* Loop through the proxy's outgoing cells and add the send tasks. */ @@ -2962,7 +2960,7 @@ void engine_maketasks(struct engine *e) { if (e->policy & engine_policy_self_gravity) for (int k = 0; k < p->nr_cells_out; k++) engine_addtasks_send_gravity(e, p->cells_out[k], p->cells_in[0], NULL, - NULL, NULL); + NULL); } } #endif diff --git a/src/multipole.h b/src/multipole.h index fa76280e1b..d842081814 100644 --- a/src/multipole.h +++ b/src/multipole.h @@ -232,7 +232,7 @@ INLINE static void gravity_drift(struct gravity_tensors *m, double dt, m->CoM[2] += dz; /* Conservative change in maximal radius containing all gpart */ - m->r_max = m->r_max_rebuild + 0. * x_diff; + m->r_max = m->r_max_rebuild + x_diff; } /** diff --git a/src/space.c b/src/space.c index c4da734c0c..1fef26e7d2 100644 --- a/src/space.c +++ b/src/space.c @@ -245,14 +245,12 @@ void space_rebuild_recycle_mapper(void *map_data, int num_elements, c->recv_rho = NULL; c->recv_gradient = NULL; c->recv_grav = NULL; - // c->recv_multipole = NULL; c->recv_ti = NULL; c->send_xv = NULL; c->send_rho = NULL; c->send_gradient = NULL; c->send_grav = NULL; - // c->send_multipole = NULL; c->send_ti = NULL; #endif } @@ -265,8 +263,6 @@ void space_free_cells(struct space *s) { threadpool_map(&s->e->threadpool, space_rebuild_recycle_mapper, s->cells_top, s->nr_cells, sizeof(struct cell), 0, s); s->maxdepth = 0; - message("Done"); - fflush(stdout); } /** @@ -956,8 +952,6 @@ void space_rebuild(struct space *s, int verbose) { // message( "hooking up cells took %.3f %s." , // clocks_from_ticks(getticks() - tic), clocks_getunit()); - message("ti_old=%lld", ti_old); - /* At this point, we have the upper-level cells, old or new. Now make sure that the parts in each cell are ok. */ space_split(s, cells_top, s->nr_cells, verbose); -- GitLab