Skip to content
Snippets Groups Projects
Commit 672d04ee authored by James Willis's avatar James Willis
Browse files

Correct position check thresholds in vectorised code.

parent 34b0ebc7
No related branches found
No related tags found
1 merge request!431Correct position checks in scalar mode
......@@ -370,11 +370,11 @@ __attribute__((always_inline)) INLINE void cache_read_two_partial_cells_sorted(
#ifdef SWIFT_DEBUG_CHECKS
const float shift_threshold_x =
4. * ci->width[0] * (1. + 2. * space_maxreldx);
2. * ci->width[0] + max(ci->dx_max_part, cj->dx_max_part);
const float shift_threshold_y =
4. * ci->width[1] * (1. + 2. * space_maxreldx);
2. * ci->width[1] + max(ci->dx_max_part, cj->dx_max_part);
const float shift_threshold_z =
4. * ci->width[2] * (1. + 2. * space_maxreldx);
2. * ci->width[2] + max(ci->dx_max_part, cj->dx_max_part);
/* Make sure that particle positions have been shifted correctly. */
for (int i = 0; i < ci_cache_count; i++) {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment