diff --git a/src/cell.h b/src/cell.h index 09c144675ea4b57bfa0da882754a7232656dc601..a9ba34b0935dcd13f9bc06b17a7c6d01e130e0f6 100644 --- a/src/cell.h +++ b/src/cell.h @@ -549,7 +549,7 @@ __attribute__((always_inline)) INLINE static int cell_can_recurse_in_self_task( const struct cell *c) { /* Is the cell split and not smaller than the smoothing length? */ - return c->split && (kernel_gamma * c->h_max < 0.5f * c->dmin); + return c->split && (kernel_gamma * c->h_max_old < 0.5f * c->dmin); } /** diff --git a/src/runner_doiact.h b/src/runner_doiact.h index a2d359edc4d201d9ec2971a629bc7f5d37e5c6c6..09b6a83ec29dd4f57b8a850ee77a2e5692e1c4ec 100644 --- a/src/runner_doiact.h +++ b/src/runner_doiact.h @@ -1675,7 +1675,7 @@ void DOSELF1_BRANCH(struct runner *r, struct cell *c) { if (!cell_is_active_hydro(c, e)) return; /* Did we mess up the recursion? */ - if (c->h_max * kernel_gamma > c->dmin) + if (c->h_max_old * kernel_gamma > c->dmin) error("Cell smaller than smoothing length"); /* Check that cells are drifted. */ @@ -1826,7 +1826,7 @@ void DOSELF2_BRANCH(struct runner *r, struct cell *c) { if (!cell_is_active_hydro(c, e)) return; /* Did we mess up the recursion? */ - if (c->h_max * kernel_gamma > c->dmin) + if (c->h_max_old * kernel_gamma > c->dmin) error("Cell smaller than smoothing length"); /* Check that cells are drifted. */