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
c26a3770
Commit
c26a3770
authored
Nov 23, 2017
by
Matthieu Schaller
Browse files
Properly set the drift time of foreign multipoles when rebuilding.
parent
8e6278cb
Changes
3
Hide whitespace changes
Inline
Side-by-side
src/cell.c
View file @
c26a3770
...
...
@@ -177,6 +177,7 @@ int cell_pack(struct cell *restrict c, struct pcell *restrict pc) {
pc
->
ti_end_max
=
c
->
ti_end_max
;
pc
->
ti_old_part
=
c
->
ti_old_part
;
pc
->
ti_old_gpart
=
c
->
ti_old_gpart
;
pc
->
ti_old_multipole
=
c
->
ti_old_multipole
;
pc
->
count
=
c
->
count
;
pc
->
gcount
=
c
->
gcount
;
pc
->
scount
=
c
->
scount
;
...
...
@@ -221,6 +222,7 @@ int cell_unpack(struct pcell *restrict pc, struct cell *restrict c,
c
->
ti_end_max
=
pc
->
ti_end_max
;
c
->
ti_old_part
=
pc
->
ti_old_part
;
c
->
ti_old_gpart
=
pc
->
ti_old_gpart
;
c
->
ti_old_multipole
=
pc
->
ti_old_multipole
;
c
->
count
=
pc
->
count
;
c
->
gcount
=
pc
->
gcount
;
c
->
scount
=
pc
->
scount
;
...
...
src/cell.h
View file @
c26a3770
...
...
@@ -95,6 +95,9 @@ struct pcell {
/*! Integer time of the last drift of the #gpart in this cell */
integertime_t
ti_old_gpart
;
/*! Integer time of the last drift of the #multipole in this cell */
integertime_t
ti_old_multipole
;
/*! Number of #part in this cell. */
int
count
;
...
...
src/engine.c
View file @
c26a3770
...
...
@@ -4344,10 +4344,11 @@ void engine_do_drift_all_mapper(void *map_data, int num_elements,
/* Drift all the g-particles */
cell_drift_gpart
(
c
,
e
,
1
);
/* Drift the multipoles */
if
(
e
->
policy
&
engine_policy_self_gravity
)
cell_drift_all_multipoles
(
c
,
e
);
}
/* Drift the multipoles */
if
(
e
->
policy
&
engine_policy_self_gravity
)
{
cell_drift_all_multipoles
(
c
,
e
);
}
}
}
...
...
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