Rebuild condition over MPI
When we unskip tasks, we check for each pair whether particles have moved too much by checking this:
__attribute__((always_inline)) INLINE static int cell_need_rebuild_for_pair(
const struct cell *ci, const struct cell *cj) {
return (kernel_gamma * max(ci->h_max, cj->h_max) + ci->dx_max_part +
cj->dx_max_part >
cj->dmin);
}
Now, if the pair is over MPI, we will have a problem. We don't have a value for dx_max_part
for a foreign cell, it's set to 0. So, for a pair taking place over MPI, we will not be able to trigger a rebuild whilst the same run without MPI may trigger a rebuild for the same exact pair.