Commit 1d1e86c2 authored by Matthieu Schaller's avatar Matthieu Schaller
Browse files

Misplaced if-statement leading to 0-sized time-step for gparts with counterparts

parent f3c535b4
......@@ -929,7 +929,9 @@ void runner_dokick(struct runner *r, struct cell *c, int timer) {
struct gpart *const gp = &gparts[k];
/* If the g-particle has no counterpart and needs to be kicked */
if (gp->id < 0 && (is_fixdt || gp->ti_end <= ti_current)) {
if (gp->id < 0) {
if (is_fixdt || gp->ti_end <= ti_current) {
/* First, finish the force calculation */
gravity_end_force(gp);
......@@ -999,6 +1001,7 @@ void runner_dokick(struct runner *r, struct cell *c, int timer) {
ti_end_min = min(gp->ti_end, ti_end_min);
ti_end_max = max(gp->ti_end, ti_end_max);
}
}
/* Now do the hydro ones... */
......
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