diff --git a/src/timestep_limiter_iact.h b/src/timestep_limiter_iact.h index 839b1a3dc450ca12b8b0c8824fd75cd87063a7b8..8c2e846f36ed2fad2baa5c843774f7d2134b11ef 100644 --- a/src/timestep_limiter_iact.h +++ b/src/timestep_limiter_iact.h @@ -32,8 +32,9 @@ * @param H Current Hubble parameter. */ __attribute__((always_inline)) INLINE static void runner_iact_timebin( - float r2, const float *dx, float hi, float hj, struct part *restrict pi, - struct part *restrict pj, float a, float H) { + const float r2, const float *dx, const float hi, const float hj, + struct part *restrict pi, struct part *restrict pj, const float a, + const float H) { /* Update the minimal time-bin */ if (pj->time_bin > 0) @@ -58,8 +59,9 @@ __attribute__((always_inline)) INLINE static void runner_iact_timebin( * @param H Current Hubble parameter. */ __attribute__((always_inline)) INLINE static void runner_iact_nonsym_timebin( - float r2, const float *dx, float hi, float hj, struct part *restrict pi, - const struct part *restrict pj, float a, float H) { + const float r2, const float *dx, const float hi, const float hj, + struct part *restrict pi, const struct part *restrict pj, const float a, + const float H) { /* Update the minimal time-bin */ if (pj->time_bin > 0) @@ -71,8 +73,9 @@ __attribute__((always_inline)) INLINE static void runner_iact_nonsym_timebin( * @brief Timestep limiter loop */ __attribute__((always_inline)) INLINE static void runner_iact_limiter( - float r2, const float *dx, float hi, float hj, struct part *restrict pi, - struct part *restrict pj, float a, float H) { + const float r2, const float *dx, const float hi, const float hj, + struct part *restrict pi, struct part *restrict pj, const float a, + const float H) { /* Nothing to do here if both particles are active */ } @@ -81,8 +84,9 @@ __attribute__((always_inline)) INLINE static void runner_iact_limiter( * @brief Timestep limiter loop (non-symmetric version) */ __attribute__((always_inline)) INLINE static void runner_iact_nonsym_limiter( - float r2, const float *dx, float hi, float hj, struct part *restrict pi, - struct part *restrict pj, float a, float H) { + const float r2, const float *dx, const float hi, const float hj, + const struct part *restrict pi, struct part *restrict pj, const float a, + const float H) { /* Wake up the neighbour? */ if (pj->time_bin > pi->time_bin + time_bin_neighbour_max_delta_bin) { diff --git a/tests/testSymmetry.c b/tests/testSymmetry.c index f109cd0bef0627387bd63b488615f0b26461725a..5958d97ee995efef5347214d467eac253c550bbc 100644 --- a/tests/testSymmetry.c +++ b/tests/testSymmetry.c @@ -24,6 +24,7 @@ #include <string.h> #include "swift.h" +#include "timestep_limiter_iact.h" void print_bytes(void *p, size_t len) { printf("("); @@ -219,13 +220,16 @@ void test(void) { /* Call the symmetric version */ runner_iact_force(r2, dx, pi.h, pj.h, &pi, &pj, a, H); + runner_iact_timebin(r2, dx, pi.h, pj.h, &pi, &pj, a, H); /* Call the non-symmetric version */ runner_iact_nonsym_force(r2, dx, pi2.h, pj2.h, &pi2, &pj2, a, H); + runner_iact_nonsym_timebin(r2, dx, pi2.h, pj2.h, &pi2, &pj2, a, H); dx[0] = -dx[0]; dx[1] = -dx[1]; dx[2] = -dx[2]; runner_iact_nonsym_force(r2, dx, pj2.h, pi2.h, &pj2, &pi2, a, H); + runner_iact_nonsym_timebin(r2, dx, pj2.h, pi2.h, &pj2, &pi2, a, H); /* Check that the particles are the same */ #if defined(GIZMO_MFV_SPH)