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
d097d467
Commit
d097d467
authored
Apr 12, 2017
by
Matthieu Schaller
Browse files
Force a rebuild every so often when gravity is on.
parent
a0931f61
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/engine.c
View file @
d097d467
...
...
@@ -3222,7 +3222,8 @@ void engine_step(struct engine *e) {
for
(
int
i
=
0
;
i
<
e
->
s
->
nr_cells
;
++
i
)
num_gpart_mpole
+=
e
->
s
->
cells_top
[
i
].
multipole
->
m_pole
.
num_gpart
;
if
(
num_gpart_mpole
!=
e
->
s
->
nr_gparts
)
error
(
"Multipoles don't contain the total number of gpart"
);
error
(
"Multipoles don't contain the total number of gpart mpoles=%zd ngparts=%zd"
,
num_gpart_mpole
,
e
->
s
->
nr_gparts
);
}
#endif
...
...
@@ -3244,6 +3245,9 @@ void engine_step(struct engine *e) {
gravity_exact_force_check
(
e
->
s
,
e
,
1e-1
);
#endif
if
(
!
(
e
->
policy
&
engine_policy_hydro
)
&&
(
e
->
policy
&
engine_policy_self_gravity
)
&&
e
->
step
%
20
==
0
)
e
->
forcerebuild
=
1
;
/* Collect the values of rebuild from all nodes and recover the (integer)
* end of the next time-step. Do these together to reduce the collective MPI
* calls per step, but some of the gathered information is not applied just
...
...
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