Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
SWIFT
SWIFTsim
Commits
dd21e14d
Commit
dd21e14d
authored
May 25, 2017
by
James Willis
Browse files
Comments.
parent
c145af2f
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/runner_doiact_vec.c
View file @
dd21e14d
...
...
@@ -752,7 +752,7 @@ void runner_dopair1_density_vec(struct runner *r, struct cell *ci,
if
(
cell_is_active
(
ci
,
e
))
{
/* Loop over the parts in ci. */
/* Loop over the parts in ci
until nothing is within range in cj
. */
for
(
int
pid
=
count_i
-
1
;
pid
>=
first_pi_loop
&&
max_ind_j
>=
0
;
pid
--
)
{
/* Get a hold of the ith part in ci. */
...
...
@@ -762,6 +762,7 @@ void runner_dopair1_density_vec(struct runner *r, struct cell *ci,
/* Set the cache index. */
int
ci_cache_idx
=
pid
-
first_pi_align
;
/* Skip this particle if no particle in cj is within range of it. */
const
float
hi
=
ci_cache
->
h
[
ci_cache_idx
];
const
double
di_test
=
sort_i
[
pid
].
d
+
hi
*
kernel_gamma
+
dx_max
-
rshift
;
if
(
di_test
<
dj_min
)
continue
;
...
...
@@ -888,7 +889,8 @@ void runner_dopair1_density_vec(struct runner *r, struct cell *ci,
}
if
(
cell_is_active
(
cj
,
e
))
{
/* Loop over the parts in cj. */
/* Loop over the parts in cj until nothing is within range in ci. */
for
(
int
pjd
=
0
;
pjd
<=
last_pj_loop
&&
max_ind_i
<
count_i
;
pjd
++
)
{
/* Get a hold of the jth part in cj. */
...
...
@@ -899,6 +901,7 @@ void runner_dopair1_density_vec(struct runner *r, struct cell *ci,
int
cj_cache_idx
=
pjd
;
/*TODO: rshift term. */
/* Skip this particle if no particle in ci is within range of it. */
const
float
hj
=
cj_cache
->
h
[
cj_cache_idx
];
const
double
dj_test
=
sort_j
[
pjd
].
d
-
hj
*
kernel_gamma
-
dx_max
-
rshift
;
if
(
dj_test
>
di_max
)
continue
;
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment