Commit 01572d02 authored by James Willis's avatar James Willis
Browse files

Fix the logging of neighbour ids in doself_subset_vec. Pull ids from main cell...

Fix the logging of neighbour ids in doself_subset_vec. Pull ids from main cell instead of subset parts array.
parent 864f101b
...@@ -936,18 +936,19 @@ __attribute__((always_inline)) INLINE void runner_doself_subset_density_vec( ...@@ -936,18 +936,19 @@ __attribute__((always_inline)) INLINE void runner_doself_subset_density_vec(
vec_is_mask_true(v_doi_mask2_self_check); vec_is_mask_true(v_doi_mask2_self_check);
#ifdef DEBUG_INTERACTIONS_SPH #ifdef DEBUG_INTERACTIONS_SPH
struct part *restrict parts_i = c->parts;
for (int bit_index = 0; bit_index < VEC_SIZE; bit_index++) { for (int bit_index = 0; bit_index < VEC_SIZE; bit_index++) {
if (doi_mask & (1 << bit_index)) { if (doi_mask & (1 << bit_index)) {
if (pi->num_ngb_density < MAX_NUM_OF_NEIGHBOURS) if (pi->num_ngb_density < MAX_NUM_OF_NEIGHBOURS)
pi->ids_ngbs_density[pi->num_ngb_density] = pi->ids_ngbs_density[pi->num_ngb_density] =
parts[pjd + bit_index].id; parts_i[pjd + bit_index].id;
++pi->num_ngb_density; ++pi->num_ngb_density;
} }
if (doi_mask2 & (1 << bit_index)) { if (doi_mask2 & (1 << bit_index)) {
if (pi->num_ngb_density < MAX_NUM_OF_NEIGHBOURS) if (pi->num_ngb_density < MAX_NUM_OF_NEIGHBOURS)
pi->ids_ngbs_density[pi->num_ngb_density] = pi->ids_ngbs_density[pi->num_ngb_density] =
parts[pjd + VEC_SIZE + bit_index].id; parts_i[pjd + VEC_SIZE + bit_index].id;
++pi->num_ngb_density; ++pi->num_ngb_density;
} }
} }
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment