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
854c66b9
Commit
854c66b9
authored
Aug 22, 2017
by
James Willis
Browse files
Formatting.
parent
ae163756
Changes
2
Hide whitespace changes
Inline
Side-by-side
src/runner_doiact.h
View file @
854c66b9
...
...
@@ -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
];
if
(
!
part_is_active
(
pj
,
e
))
continue
;
const
float
hj
=
pj
->
h
;
/* 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
;
if
(
dj
-
rshift
>
di_max
)
continue
;
...
...
@@ -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
;
pid
>=
0
&&
sort_i
[
pid
].
d
+
hi_max
+
dx_max
>
dj_min
;
pid
--
)
{
/* Get a hold of the ith part in ci. */
struct
part
*
restrict
pi
=
&
parts_i
[
sort_i
[
pid
].
i
];
const
float
hi
=
pi
->
h
;
/* 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
;
if
(
di
<
dj_min
)
continue
;
...
...
src/runner_doiact_vec.c
View file @
854c66b9
...
...
@@ -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. */
int
numActive
=
0
;
if
(
active_ci
)
{
if
(
active_ci
)
{
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
];
if
(
part_is_active
(
pi
,
e
))
{
numActive
++
;
...
...
@@ -674,7 +674,7 @@ void runner_dopair1_density_vec(struct runner *r, struct cell *ci,
if
(
!
numActive
&&
active_cj
)
{
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
];
if
(
part_is_active
(
pj
,
e
))
{
numActive
++
;
...
...
@@ -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. */
const
float
hj
=
cj_cache
->
h
[
cj_cache_idx
];
const
double
dj_test
=
sort_j
[
pjd
].
d
-
hj
*
kernel_gamma
-
dx_max
;
const
double
dj_test
=
sort_j
[
pjd
].
d
-
hj
*
kernel_gamma
-
dx_max
;
if
(
dj_test
>
di_max
)
continue
;
/* Determine the exit iteration of the interaction loop. */
...
...
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