Commit c26a3770 authored by Matthieu Schaller's avatar Matthieu Schaller
Browse files

Properly set the drift time of foreign multipoles when rebuilding.

parent 8e6278cb
......@@ -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;
......
......@@ -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;
......
......@@ -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);
}
}
}
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment