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
886706a1
Commit
886706a1
authored
Aug 02, 2017
by
Matthieu Schaller
Browse files
Abort recursion early in the gravity tasks if the cells are inactive
parent
c6011947
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/runner_doiact_grav.h
View file @
886706a1
...
...
@@ -712,6 +712,9 @@ void runner_dopair_grav(struct runner *r, struct cell *ci, struct cell *cj,
}
#endif
/* Anything to do here? */
if
(
!
cell_is_active
(
ci
,
e
)
&&
!
cell_is_active
(
cj
,
e
))
return
;
TIMER_TIC
;
/* Can we use M-M interactions ? */
...
...
@@ -796,6 +799,9 @@ void runner_dopair_grav(struct runner *r, struct cell *ci, struct cell *cj,
*/
void
runner_doself_grav
(
struct
runner
*
r
,
struct
cell
*
c
,
int
gettimer
)
{
/* Some constants */
const
struct
engine
*
e
=
r
->
e
;
#ifdef SWIFT_DEBUG_CHECKS
/* Early abort? */
if
(
c
->
gcount
==
0
)
error
(
"Doing self gravity on an empty cell !"
);
...
...
@@ -803,6 +809,9 @@ void runner_doself_grav(struct runner *r, struct cell *c, int gettimer) {
TIMER_TIC
;
/* Anything to do here? */
if
(
!
cell_is_active
(
c
,
e
))
return
;
/* If the cell is split, interact each progeny with itself, and with
each of its siblings. */
if
(
c
->
split
)
{
...
...
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