From cd2420701ceae1b845743b84d4acbbfd13f60fbe Mon Sep 17 00:00:00 2001 From: Matthieu Schaller <matthieu.schaller@durham.ac.uk> Date: Mon, 6 Mar 2017 12:35:20 +0000 Subject: [PATCH] Prevent call to particle-multipole interaction. --- src/runner.c | 6 +++--- src/runner_doiact_grav.h | 31 +++++++++++++++---------------- 2 files changed, 18 insertions(+), 19 deletions(-) diff --git a/src/runner.c b/src/runner.c index 60553188a7..0eb47c8216 100644 --- a/src/runner.c +++ b/src/runner.c @@ -1412,7 +1412,7 @@ void runner_do_recv_part(struct runner *r, struct cell *c, int timer) { /* Collect everything... */ for (size_t k = 0; k < nr_parts; k++) { - if(parts[k].time_bin == time_bin_inhibited) continue; + if (parts[k].time_bin == time_bin_inhibited) continue; time_bin_min = min(time_bin_min, parts[k].time_bin); time_bin_max = max(time_bin_max, parts[k].time_bin); h_max = max(h_max, parts[k].h); @@ -1488,7 +1488,7 @@ void runner_do_recv_gpart(struct runner *r, struct cell *c, int timer) { /* Collect everything... */ for (size_t k = 0; k < nr_gparts; k++) { - if(gparts[k].time_bin == time_bin_inhibited) continue; + if (gparts[k].time_bin == time_bin_inhibited) continue; time_bin_min = min(time_bin_min, gparts[k].time_bin); time_bin_max = max(time_bin_max, gparts[k].time_bin); @@ -1561,7 +1561,7 @@ void runner_do_recv_spart(struct runner *r, struct cell *c, int timer) { /* Collect everything... */ for (size_t k = 0; k < nr_sparts; k++) { - if(sparts[k].time_bin == time_bin_inhibited) continue; + if (sparts[k].time_bin == time_bin_inhibited) continue; time_bin_min = min(time_bin_min, sparts[k].time_bin); time_bin_max = max(time_bin_max, sparts[k].time_bin); diff --git a/src/runner_doiact_grav.h b/src/runner_doiact_grav.h index c446ff71ee..4d5441b429 100644 --- a/src/runner_doiact_grav.h +++ b/src/runner_doiact_grav.h @@ -91,9 +91,9 @@ void runner_do_grav_down(struct runner *r, struct cell *c) { * @param ci The #cell with field tensor to interact. * @param cj The #cell with the multipole. */ -void runner_dopair_grav_mm( - const struct runner *r, const struct cell *restrict ci, - const struct cell *restrict cj) { +void runner_dopair_grav_mm(const struct runner *r, + const struct cell *restrict ci, + const struct cell *restrict cj) { const struct engine *e = r->e; const int periodic = e->s->periodic; @@ -124,9 +124,9 @@ void runner_dopair_grav_mm( * @param ci The #cell with particles to interct. * @param cj The #cell with the multipole. */ -void runner_dopair_grav_pm( - const struct runner *r, const struct cell *restrict ci, - const struct cell *restrict cj) { +void runner_dopair_grav_pm(const struct runner *r, + const struct cell *restrict ci, + const struct cell *restrict cj) { const struct engine *e = r->e; const int gcount = ci->gcount; @@ -144,6 +144,8 @@ void runner_dopair_grav_pm( error("Multipole does not seem to have been set."); #endif + error("Function should not be called"); + /* Anything to do here? */ if (!cell_is_active(ci, e)) return; @@ -195,8 +197,7 @@ void runner_dopair_grav_pm( * * @todo Use a local cache for the particles. */ -void runner_dopair_grav_pp( - struct runner *r, struct cell *ci, struct cell *cj) { +void runner_dopair_grav_pp(struct runner *r, struct cell *ci, struct cell *cj) { const struct engine *e = r->e; const int gcount_i = ci->gcount; @@ -310,8 +311,7 @@ void runner_dopair_grav_pp( * * @todo Use a local cache for the particles. */ -void runner_doself_grav_pp( - struct runner *r, struct cell *c) { +void runner_doself_grav_pp(struct runner *r, struct cell *c) { const struct engine *e = r->e; const int gcount = c->gcount; @@ -409,8 +409,8 @@ void runner_doself_grav_pp( * * @todo Use a local cache for the particles. */ -void runner_dopair_grav(struct runner *r, struct cell *ci, - struct cell *cj, int gettimer) { +void runner_dopair_grav(struct runner *r, struct cell *ci, struct cell *cj, + int gettimer) { #ifdef SWIFT_DEBUG_CHECKS @@ -548,8 +548,8 @@ void runner_doself_grav(struct runner *r, struct cell *c, int gettimer) { if (gettimer) TIMER_TOC(timer_dosub_self_grav); } -void runner_dosub_grav(struct runner *r, struct cell *ci, - struct cell *cj, int timer) { +void runner_dosub_grav(struct runner *r, struct cell *ci, struct cell *cj, + int timer) { /* Is this a single cell? */ if (cj == NULL) { @@ -567,8 +567,7 @@ void runner_dosub_grav(struct runner *r, struct cell *ci, } } -void runner_do_grav_long_range(struct runner *r, struct cell *ci, - int timer) { +void runner_do_grav_long_range(struct runner *r, struct cell *ci, int timer) { #if ICHECK > 0 for (int pid = 0; pid < ci->gcount; pid++) { -- GitLab