diff --git a/src/cell.h b/src/cell.h index b73fd3ebe572b0ffbaf1c8c2890f7aeb777495de..49ee0c2a00a512de1b3038faae8ffeaae175368d 100644 --- a/src/cell.h +++ b/src/cell.h @@ -941,7 +941,8 @@ __attribute__((always_inline)) INLINE static int cell_can_split_pair_stars_task( /* Note that since tasks are create after a rebuild no need to take */ /* into account any part motion (i.e. dx_max == 0 here) */ return c->split && - (space_stretch * kernel_gamma * c->stars.h_max < 0.5f * c->dmin); + (space_stretch * kernel_gamma * c->stars.h_max < 0.5f * c->dmin) && + (space_stretch * kernel_gamma * c->hydro.h_max < 0.5f * c->dmin); } /** @@ -959,7 +960,8 @@ __attribute__((always_inline)) INLINE static int cell_can_split_self_stars_task( /* Note: No need for more checks here as all the sub-pairs and sub-self */ /* tasks will be created. So no need to check for h_max */ return c->split && - (space_stretch * kernel_gamma * c->stars.h_max < 0.5f * c->dmin); + (space_stretch * kernel_gamma * c->stars.h_max < 0.5f * c->dmin) && + (space_stretch * kernel_gamma * c->hydro.h_max < 0.5f * c->dmin); } /**