From 6ad75bd5808c70bd50d21b706deaa79f65fb920c Mon Sep 17 00:00:00 2001 From: Matthieu Schaller <schaller@strw.leidenuniv.nl> Date: Sat, 16 Mar 2019 14:59:35 +0000 Subject: [PATCH] Make a hydro super pointer for cells with stars and no densit task. --- src/cell.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/cell.c b/src/cell.c index 9fd32ed8c6..10221d48d4 100644 --- a/src/cell.c +++ b/src/cell.c @@ -3627,7 +3627,8 @@ void cell_set_super(struct cell *c, struct cell *super, const int with_hydro, void cell_set_super_hydro(struct cell *c, struct cell *super_hydro) { /* Are we in a cell with some kind of self/pair task ? */ - if (super_hydro == NULL && c->hydro.density != NULL) super_hydro = c; + if (super_hydro == NULL && (c->hydro.density != NULL || c->stars.count > 0)) + super_hydro = c; /* Set the super-cell */ c->hydro.super = super_hydro; -- GitLab