From ddf73330129d08dde68e4a5732eb6033cb3bbd23 Mon Sep 17 00:00:00 2001
From: Matthieu Schaller <matthieu.schaller@durham.ac.uk>
Date: Wed, 27 Dec 2017 09:26:39 +0100
Subject: [PATCH] In the gravity FFT task only verufy if the multipoles are
 drifted when the debugging checks are activated.

---
 src/runner_doiact_fft.c | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/src/runner_doiact_fft.c b/src/runner_doiact_fft.c
index 945bbb9d89..9531dcea76 100644
--- a/src/runner_doiact_fft.c
+++ b/src/runner_doiact_fft.c
@@ -185,11 +185,12 @@ void runner_do_grav_fft(struct runner* r, int timer) {
   struct gravity_tensors* restrict multipoles = s->multipoles_top;
   struct cell* cells = s->cells_top;
 
+#ifdef SWIFT_DEBUG_CHECKS
   /* Make sure everything has been drifted to the current point */
   for (int i = 0; i < nr_cells; ++i)
     if (cells[i].ti_old_multipole != ti_current)
-      cell_drift_multipole(&cells[i], e);
-  // error("Top-level multipole %d not drifted", i);
+      error("Top-level multipole %d not drifted", i);
+#endif
 
   /* Allocates some memory for the density mesh */
   double* restrict rho = fftw_malloc(sizeof(double) * N * N * N);
-- 
GitLab