Skip to content
GitLab
Menu
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
776f567e
Commit
776f567e
authored
Jul 28, 2019
by
Matthieu Schaller
Browse files
Apply the same changes to the other places where particles get removed.
parent
c7f10f7c
Changes
2
Hide whitespace changes
Inline
Side-by-side
src/cell.c
View file @
776f567e
...
...
@@ -4684,11 +4684,7 @@ void cell_drift_spart(struct cell *c, const struct engine *e, int force) {
if
(
!
spart_is_inhibited
(
sp
,
e
))
{
/* Remove the particle entirely */
struct
gpart
*
gp
=
sp
->
gpart
;
cell_remove_spart
(
e
,
c
,
sp
);
/* and its gravity friend */
cell_remove_gpart
(
e
,
c
,
gp
);
}
if
(
lock_unlock
(
&
e
->
s
->
lock
)
!=
0
)
...
...
@@ -4859,11 +4855,7 @@ void cell_drift_bpart(struct cell *c, const struct engine *e, int force) {
if
(
!
bpart_is_inhibited
(
bp
,
e
))
{
/* Remove the particle entirely */
struct
gpart
*
gp
=
bp
->
gpart
;
cell_remove_bpart
(
e
,
c
,
bp
);
/* and its gravity friend */
cell_remove_gpart
(
e
,
c
,
gp
);
}
if
(
lock_unlock
(
&
e
->
s
->
lock
)
!=
0
)
...
...
src/runner.c
View file @
776f567e
...
...
@@ -3872,10 +3872,10 @@ void runner_do_gas_swallow(struct runner *r, struct cell *c, int timer) {
* by another thread before we do the deed. */
if
(
!
part_is_inhibited
(
p
,
e
))
{
/* Finally, remove the gas particle from the system */
struct
gpart
*
gp
=
p
->
gpart
;
/* Finally, remove the gas particle from the system
* Recall that the gpart associated with it is also removed
* at the same time. */
cell_remove_part
(
e
,
c
,
p
,
xp
);
cell_remove_gpart
(
e
,
c
,
gp
);
}
if
(
lock_unlock
(
&
e
->
s
->
lock
)
!=
0
)
...
...
@@ -3916,9 +3916,7 @@ void runner_do_gas_swallow(struct runner *r, struct cell *c, int timer) {
if
(
!
part_is_inhibited
(
p
,
e
))
{
/* Finally, remove the gas particle from the system */
struct
gpart
*
gp
=
p
->
gpart
;
cell_remove_part
(
e
,
c
,
p
,
xp
);
cell_remove_gpart
(
e
,
c
,
gp
);
}
if
(
lock_unlock
(
&
e
->
s
->
lock
)
!=
0
)
...
...
@@ -4092,10 +4090,10 @@ void runner_do_bh_swallow(struct runner *r, struct cell *c, int timer) {
message
(
"BH %lld removing BH particle %lld"
,
bp
->
id
,
cell_bp
->
id
);
/* Finally, remove the gas particle from the system */
struct
gpart
*
cell_gp
=
cell_bp
->
gpart
;
/* Finally, remove the gas particle from the system
* Recall that the gpart associated with it is also removed
* at the same time. */
cell_remove_bpart
(
e
,
c
,
cell_bp
);
cell_remove_gpart
(
e
,
c
,
cell_gp
);
}
/* In any case, prevent the particle from being re-swallowed */
...
...
@@ -4126,9 +4124,7 @@ void runner_do_bh_swallow(struct runner *r, struct cell *c, int timer) {
bp
->
id
,
cell_bp
->
id
);
/* Finally, remove the gas particle from the system */
struct
gpart
*
cell_gp
=
cell_bp
->
gpart
;
cell_remove_bpart
(
e
,
c
,
cell_bp
);
cell_remove_gpart
(
e
,
c
,
cell_gp
);
found
=
1
;
break
;
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a 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