Commit 854c66b9 authored by James Willis's avatar James Willis
Browse files

Formatting.

parent ae163756
...@@ -1039,7 +1039,7 @@ void DOPAIR1(struct runner *r, struct cell *ci, struct cell *cj, const int sid, ...@@ -1039,7 +1039,7 @@ void DOPAIR1(struct runner *r, struct cell *ci, struct cell *cj, const int sid,
struct part *restrict pj = &parts_j[sort_j[pjd].i]; struct part *restrict pj = &parts_j[sort_j[pjd].i];
if (!part_is_active(pj, e)) continue; if (!part_is_active(pj, e)) continue;
const float hj = pj->h; const float hj = pj->h;
/* Skip this particle if no particle in ci is within range of it. */ /* Skip this particle if no particle in ci is within range of it. */
const double dj = sort_j[pjd].d - hj * kernel_gamma - dx_max + rshift; const double dj = sort_j[pjd].d - hj * kernel_gamma - dx_max + rshift;
if (dj - rshift > di_max) continue; if (dj - rshift > di_max) continue;
...@@ -1286,14 +1286,14 @@ void DOPAIR2(struct runner *r, struct cell *ci, struct cell *cj) { ...@@ -1286,14 +1286,14 @@ void DOPAIR2(struct runner *r, struct cell *ci, struct cell *cj) {
} }
} }
/* Loop over the parts in ci until nothing is within range in cj. */ /* Loop over the parts in ci until nothing is within range in cj. */
for (int pid = count_i - 1; for (int pid = count_i - 1;
pid >= 0 && sort_i[pid].d + hi_max + dx_max > dj_min; pid--) { pid >= 0 && sort_i[pid].d + hi_max + dx_max > dj_min; pid--) {
/* Get a hold of the ith part in ci. */ /* Get a hold of the ith part in ci. */
struct part *restrict pi = &parts_i[sort_i[pid].i]; struct part *restrict pi = &parts_i[sort_i[pid].i];
const float hi = pi->h; const float hi = pi->h;
/* Skip this particle if no particle in cj is within range of it. */ /* Skip this particle if no particle in cj is within range of it. */
const double di = sort_i[pid].d + hi * kernel_gamma + dx_max - rshift; const double di = sort_i[pid].d + hi * kernel_gamma + dx_max - rshift;
if (di < dj_min) continue; if (di < dj_min) continue;
......
...@@ -661,9 +661,9 @@ void runner_dopair1_density_vec(struct runner *r, struct cell *ci, ...@@ -661,9 +661,9 @@ void runner_dopair1_density_vec(struct runner *r, struct cell *ci,
/* Check if any particles are active and return if there are not. */ /* Check if any particles are active and return if there are not. */
int numActive = 0; int numActive = 0;
if(active_ci) { if (active_ci) {
for (int pid = count_i - 1; for (int pid = count_i - 1;
pid >= 0 && sort_i[pid].d + hi_max + dx_max > dj_min; pid--) { pid >= 0 && sort_i[pid].d + hi_max + dx_max > dj_min; pid--) {
struct part *restrict pi = &parts_i[sort_i[pid].i]; struct part *restrict pi = &parts_i[sort_i[pid].i];
if (part_is_active(pi, e)) { if (part_is_active(pi, e)) {
numActive++; numActive++;
...@@ -674,7 +674,7 @@ void runner_dopair1_density_vec(struct runner *r, struct cell *ci, ...@@ -674,7 +674,7 @@ void runner_dopair1_density_vec(struct runner *r, struct cell *ci,
if (!numActive && active_cj) { if (!numActive && active_cj) {
for (int pjd = 0; pjd < count_j && sort_j[pjd].d - hj_max - dx_max < di_max; for (int pjd = 0; pjd < count_j && sort_j[pjd].d - hj_max - dx_max < di_max;
pjd++) { pjd++) {
struct part *restrict pj = &parts_j[sort_j[pjd].i]; struct part *restrict pj = &parts_j[sort_j[pjd].i];
if (part_is_active(pj, e)) { if (part_is_active(pj, e)) {
numActive++; numActive++;
...@@ -873,8 +873,7 @@ void runner_dopair1_density_vec(struct runner *r, struct cell *ci, ...@@ -873,8 +873,7 @@ void runner_dopair1_density_vec(struct runner *r, struct cell *ci,
/* Skip this particle if no particle in ci is within range of it. */ /* Skip this particle if no particle in ci is within range of it. */
const float hj = cj_cache->h[cj_cache_idx]; const float hj = cj_cache->h[cj_cache_idx];
const double dj_test = const double dj_test = sort_j[pjd].d - hj * kernel_gamma - dx_max;
sort_j[pjd].d - hj * kernel_gamma - dx_max;
if (dj_test > di_max) continue; if (dj_test > di_max) continue;
/* Determine the exit iteration of the interaction loop. */ /* Determine the exit iteration of the interaction loop. */
......
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