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
ed062b11
Commit
ed062b11
authored
Oct 05, 2017
by
James Willis
Browse files
runner_dopair2_force_vec now runs Sedov blast, EAGLE_12 and EAGLE_25 correctly.
parent
f565d594
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/runner_doiact_vec.c
View file @
ed062b11
...
...
@@ -1464,6 +1464,8 @@ void runner_dopair2_force_vec(struct runner *r, struct cell *ci,
const
int
count_j
=
cj
->
count
;
const
double
hi_max
=
ci
->
h_max
*
kernel_gamma
-
rshift
;
const
double
hj_max
=
cj
->
h_max
*
kernel_gamma
;
const
double
hi_max_raw
=
ci
->
h_max
;
const
double
hj_max_raw
=
cj
->
h_max
;
struct
part
*
restrict
parts_i
=
ci
->
parts
;
struct
part
*
restrict
parts_j
=
cj
->
parts
;
const
double
di_max
=
sort_i
[
count_i
-
1
].
d
-
rshift
;
...
...
@@ -1564,7 +1566,7 @@ void runner_dopair2_force_vec(struct runner *r, struct cell *ci,
/* 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
+
max
(
hi
,
hj_max
)
*
kernel_gamma
+
dx_max
-
rshift
;
sort_i
[
pid
].
d
+
max
(
hi
,
hj_max
_raw
)
*
kernel_gamma
+
dx_max
-
rshift
;
if
(
di_test
<
dj_min
)
continue
;
/* Determine the exit iteration of the interaction loop. */
...
...
@@ -1718,7 +1720,7 @@ void runner_dopair2_force_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
-
max
(
hj
,
hi_max
)
*
kernel_gamma
-
dx_max
;
sort_j
[
pjd
].
d
-
max
(
hj
,
hi_max
_raw
)
*
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