Commit 75d4e1e9 authored by James Willis's avatar James Willis
Browse files

Helps if you set the pointer to the correct particle...

parent 71b2986d
......@@ -293,6 +293,7 @@ __attribute__((always_inline)) INLINE static void populate_max_index_no_cache(
/* Populate max_index_i for remaining particles that are within range. */
for (int i = first_pi + 1; i < ci->count; i++) {
temp = max_index_i[i - 1];
pi = &parts_i[sort_i[i].i];
while (temp <= cj->count &&
(sort_i[i].d + (pi->h * kernel_gamma + dx_max - rshift) >
......@@ -339,7 +340,8 @@ __attribute__((always_inline)) INLINE static void populate_max_index_no_cache(
/* Populate max_index_j for remaining particles that are within range. */
for (int i = last_pj - 1; i >= 0; i--) {
temp = max_index_j[i + 1];
pj = &parts_j[sort_j[i].i];
while (temp > 0 &&
sort_j[i].d - dx_max - (pj->h * kernel_gamma) <
sort_i[temp].d - rshift)
......
Supports Markdown
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