Skip to content
Snippets Groups Projects
Commit 8a32750c authored by Loic Hausammann's avatar Loic Hausammann
Browse files

Add check for hydro in cell_can_split_self_gravity_task (and pairs)

parent 1ef38fc1
Branches
Tags
3 merge requests!745Rewrite of MPI loops - Add stellar feedback loops,!744Mpi stars2 matthieu,!700Stars smoothing length over MPI
......@@ -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);
}
/**
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment