From ff27fd810a170fdca83138af247fe6535e854811 Mon Sep 17 00:00:00 2001 From: Matthieu Schaller <schaller@strw.leidenuniv.nl> Date: Thu, 2 May 2019 18:44:27 +0200 Subject: [PATCH] Also take the BH kernel size into account when splitting the hydro tasks. --- src/cell.h | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/cell.h b/src/cell.h index 9b234c7227..222c632202 100644 --- a/src/cell.h +++ b/src/cell.h @@ -1065,7 +1065,8 @@ __attribute__((always_inline)) INLINE static int cell_can_split_pair_hydro_task( /* into account any part motion (i.e. dx_max == 0 here) */ return c->split && (space_stretch * kernel_gamma * c->hydro.h_max < 0.5f * c->dmin) && - (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->black_holes.h_max < 0.5f * c->dmin); } /** @@ -1084,7 +1085,8 @@ __attribute__((always_inline)) INLINE static int cell_can_split_self_hydro_task( /* tasks will be created. So no need to check for h_max */ return c->split && (space_stretch * kernel_gamma * c->hydro.h_max < 0.5f * c->dmin) && - (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->black_holes.h_max < 0.5f * c->dmin); } /** @@ -1134,6 +1136,7 @@ cell_need_rebuild_for_hydro_pair(const struct cell *ci, const struct cell *cj) { } return 0; } + /** * @brief Have star particles in a pair of cells moved too much and require a * rebuild? -- GitLab