Skip to content
Snippets Groups Projects
Commit 53b04e19 authored by Matthieu Schaller's avatar Matthieu Schaller
Browse files

Flip the cells in the PAIR_NOSORT tasks *before* extracting values.

parent c8b61b71
No related branches found
No related tags found
1 merge request!310Star particles and gparts links over MPI
...@@ -18,15 +18,15 @@ void DOPAIR1_NOSORT(struct runner *r, struct cell *ci, struct cell *cj) { ...@@ -18,15 +18,15 @@ void DOPAIR1_NOSORT(struct runner *r, struct cell *ci, struct cell *cj) {
if (!cell_is_drifted(ci, e)) cell_drift(ci, e); if (!cell_is_drifted(ci, e)) cell_drift(ci, e);
if (!cell_is_drifted(cj, e)) cell_drift(cj, e); if (!cell_is_drifted(cj, e)) cell_drift(cj, e);
/* Get the relative distance between the pairs, wrapping. */
double shift[3] = {0.0, 0.0, 0.0};
space_getsid(e->s, &ci, &cj, shift);
const int count_i = ci->count; const int count_i = ci->count;
const int count_j = cj->count; const int count_j = cj->count;
struct part *restrict parts_i = ci->parts; struct part *restrict parts_i = ci->parts;
struct part *restrict parts_j = cj->parts; struct part *restrict parts_j = cj->parts;
/* Get the relative distance between the pairs, wrapping. */
double shift[3] = {0.0, 0.0, 0.0};
space_getsid(e->s, &ci, &cj, shift);
/* Loop over the parts in ci. */ /* Loop over the parts in ci. */
for (int pid = 0; pid < count_i; pid++) { for (int pid = 0; pid < count_i; pid++) {
...@@ -135,15 +135,15 @@ void DOPAIR2_NOSORT(struct runner *r, struct cell *ci, struct cell *cj) { ...@@ -135,15 +135,15 @@ void DOPAIR2_NOSORT(struct runner *r, struct cell *ci, struct cell *cj) {
if (!cell_is_drifted(ci, e)) cell_drift(ci, e); if (!cell_is_drifted(ci, e)) cell_drift(ci, e);
if (!cell_is_drifted(cj, e)) cell_drift(cj, e); if (!cell_is_drifted(cj, e)) cell_drift(cj, e);
/* Get the relative distance between the pairs, wrapping. */
double shift[3] = {0.0, 0.0, 0.0};
space_getsid(e->s, &ci, &cj, shift);
const int count_i = ci->count; const int count_i = ci->count;
const int count_j = cj->count; const int count_j = cj->count;
struct part *restrict parts_i = ci->parts; struct part *restrict parts_i = ci->parts;
struct part *restrict parts_j = cj->parts; struct part *restrict parts_j = cj->parts;
/* Get the relative distance between the pairs, wrapping. */
double shift[3] = {0.0, 0.0, 0.0};
space_getsid(e->s, &ci, &cj, shift);
/* Loop over the parts in ci. */ /* Loop over the parts in ci. */
for (int pid = 0; pid < count_i; pid++) { for (int pid = 0; pid < count_i; pid++) {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment