diff --git a/src/cell_convert_part.c b/src/cell_convert_part.c index 41c2c6145e81501bb015cb6f5c4b17d2987b070d..86389d36332c20899ad6f3eb71aee38b7906c8ef 100644 --- a/src/cell_convert_part.c +++ b/src/cell_convert_part.c @@ -268,6 +268,9 @@ struct spart *cell_add_spart(struct engine *e, struct cell *const c) { const size_t one = 1; atomic_sub(&e->s->nr_extra_sparts, one); + /* Give the new particle the correct depth */ + cell_set_spart_h_depth(sp, c); + return sp; }