diff --git a/src/multipole.h b/src/multipole.h index 41839b932716c5631bfe5354190c40eb6ab96a3f..8e7a2bb47496114c62dffef85cadec1852e888fc 100644 --- a/src/multipole.h +++ b/src/multipole.h @@ -1028,6 +1028,11 @@ INLINE static void gravity_P2M(struct gravity_tensors *multi, for (int k = 0; k < gcount; k++) { const double m = gparts[k].mass; +#ifdef SWIFT_DEBUG_CHECKS + if (gparts[k].time_bin == time_bin_inhibited) + error("Inhibited particle in P2M. Should have been remvoed earlier."); +#endif + mass += m; com[0] += gparts[k].x[0] * m; com[1] += gparts[k].x[1] * m; diff --git a/src/runner.c b/src/runner.c index f710c40d51f6b08e53125faff96def65303da904..73dc5bdfd4f1f8b7788b87a778609b448fbb2e70 100644 --- a/src/runner.c +++ b/src/runner.c @@ -2013,7 +2013,7 @@ void runner_do_end_force(struct runner *r, struct cell *c, int timer) { const int gcount = c->grav.count; const int scount = c->stars.count; struct part *restrict parts = c->hydro.parts; - struct xpart *restrict xparts = c->hydro.xparts; + // struct xpart *restrict xparts = c->hydro.xparts; struct gpart *restrict gparts = c->grav.parts; struct spart *restrict sparts = c->stars.parts; const int periodic = s->periodic; @@ -2043,7 +2043,7 @@ void runner_do_end_force(struct runner *r, struct cell *c, int timer) { /* Get a handle on the part. */ struct part *restrict p = &parts[k]; - struct xpart *restrict xp = &xparts[k]; + // struct xpart *restrict xp = &xparts[k]; if (part_is_active(p, e)) { diff --git a/src/space.c b/src/space.c index 5506e4fd6b1731535cfaa41e88351b65465260e7..fe8e2a1bd647c4531fd5d65030dc891fb3c22a7e 100644 --- a/src/space.c +++ b/src/space.c @@ -1924,6 +1924,10 @@ void space_split_recursive(struct space *s, struct cell *c, sizeof(struct cell_buff) * count) != 0) error("Failed to allocate temporary indices."); for (int k = 0; k < count; k++) { +#ifdef SWIFT_DEBUG_CHECKS + if (parts[k].time_bin == time_bin_inhibited) + error("Inhibited particle present in space_split()"); +#endif buff[k].x[0] = parts[k].x[0]; buff[k].x[1] = parts[k].x[1]; buff[k].x[2] = parts[k].x[2]; @@ -1934,6 +1938,10 @@ void space_split_recursive(struct space *s, struct cell *c, sizeof(struct cell_buff) * gcount) != 0) error("Failed to allocate temporary indices."); for (int k = 0; k < gcount; k++) { +#ifdef SWIFT_DEBUG_CHECKS + if (gparts[k].time_bin == time_bin_inhibited) + error("Inhibited particle present in space_split()"); +#endif gbuff[k].x[0] = gparts[k].x[0]; gbuff[k].x[1] = gparts[k].x[1]; gbuff[k].x[2] = gparts[k].x[2]; @@ -1944,6 +1952,10 @@ void space_split_recursive(struct space *s, struct cell *c, sizeof(struct cell_buff) * scount) != 0) error("Failed to allocate temporary indices."); for (int k = 0; k < scount; k++) { +#ifdef SWIFT_DEBUG_CHECKS + if (sparts[k].time_bin == time_bin_inhibited) + error("Inhibited particle present in space_split()"); +#endif sbuff[k].x[0] = sparts[k].x[0]; sbuff[k].x[1] = sparts[k].x[1]; sbuff[k].x[2] = sparts[k].x[2];