Skip to content
Snippets Groups Projects
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
No related branches found
No related tags found
1 merge request!143Gravity particles
...@@ -929,7 +929,9 @@ void runner_dokick(struct runner *r, struct cell *c, int timer) { ...@@ -929,7 +929,9 @@ void runner_dokick(struct runner *r, struct cell *c, int timer) {
struct gpart *const gp = &gparts[k]; struct gpart *const gp = &gparts[k];
/* If the g-particle has no counterpart and needs to be kicked */ /* 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 */ /* First, finish the force calculation */
gravity_end_force(gp); gravity_end_force(gp);
...@@ -999,6 +1001,7 @@ void runner_dokick(struct runner *r, struct cell *c, int timer) { ...@@ -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_min = min(gp->ti_end, ti_end_min);
ti_end_max = max(gp->ti_end, ti_end_max); ti_end_max = max(gp->ti_end, ti_end_max);
} }
}
/* Now do the hydro ones... */ /* Now do the hydro ones... */
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment