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
379c619c
Commit
379c619c
authored
Mar 07, 2017
by
Matthieu Schaller
Browse files
Fixed bug in runner_do_end_force().
parent
0dc16751
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/runner.c
View file @
379c619c
...
...
@@ -1350,7 +1350,13 @@ void runner_do_end_force(struct runner *r, struct cell *c, int timer) {
/* Get a handle on the part. */
struct
part
*
restrict
p
=
&
parts
[
k
];
if
(
part_is_active
(
p
,
e
))
hydro_end_force
(
p
);
if
(
part_is_active
(
p
,
e
))
{
/* First, finish the force loop */
hydro_end_force
(
p
);
if
(
p
->
gpart
!=
NULL
)
gravity_end_force
(
p
->
gpart
,
const_G
);
}
}
/* Loop over the g-particles in this cell. */
...
...
@@ -1358,7 +1364,12 @@ void runner_do_end_force(struct runner *r, struct cell *c, int timer) {
/* Get a handle on the gpart. */
struct
gpart
*
restrict
gp
=
&
gparts
[
k
];
if
(
gpart_is_active
(
gp
,
e
))
gravity_end_force
(
gp
,
const_G
);
if
(
gp
->
type
==
swift_type_dark_matter
)
{
if
(
gpart_is_active
(
gp
,
e
))
gravity_end_force
(
gp
,
const_G
);
}
#ifdef SWIFT_DEBUG_CHECKS
if
(
e
->
policy
&
engine_policy_self_gravity
)
{
...
...
@@ -1377,7 +1388,12 @@ void runner_do_end_force(struct runner *r, struct cell *c, int timer) {
/* Get a handle on the spart. */
struct
spart
*
restrict
sp
=
&
sparts
[
k
];
if
(
spart_is_active
(
sp
,
e
))
star_end_force
(
sp
);
if
(
spart_is_active
(
sp
,
e
))
{
/* First, finish the force loop */
star_end_force
(
sp
);
gravity_end_force
(
sp
->
gpart
,
const_G
);
}
}
}
...
...
Matthieu Schaller
@matthieu
mentioned in issue
#270 (closed)
·
Mar 08, 2017
mentioned in issue
#270 (closed)
mentioned in issue #270
Toggle commit list
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