Skip to content
Snippets Groups Projects
Commit ff27fd81 authored by Matthieu Schaller's avatar Matthieu Schaller
Browse files

Also take the BH kernel size into account when splitting the hydro tasks.

parent bc279065
No related branches found
No related tags found
1 merge request!804Implementation of black hole accretion and feedback
......@@ -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?
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment