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

When running gravity+hydro only consider gparts for the cell splitting.

parent c624b8e6
No related branches found
No related tags found
1 merge request!579Lean gravity option
......@@ -1731,6 +1731,7 @@ void space_split_recursive(struct space *s, struct cell *c,
const int count = c->count;
const int gcount = c->gcount;
const int scount = c->scount;
const int with_gravity = s->gravity;
const int depth = c->depth;
int maxdepth = 0;
float h_max = 0.0f;
......@@ -1792,8 +1793,8 @@ void space_split_recursive(struct space *s, struct cell *c,
}
/* Split or let it be? */
if (count > space_splitsize || gcount > space_splitsize ||
scount > space_splitsize) {
if ((with_gravity && gcount > space_splitsize) ||
(!with_gravity && (count > space_splitsize || scount > space_splitsize))) {
/* No longer just a leaf. */
c->split = 1;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment