Skip to content
Snippets Groups Projects
Commit e8dbafac authored by Pedro Gonnet's avatar Pedro Gonnet
Browse files

runner_do_sort now only looks at the do_sort and do_sub_sort flags set in the...

runner_do_sort now only looks at the do_sort and do_sub_sort flags set in the cell, not quite sure if we still need the cleanup flag.
parent 5e0bb45c
Branches
Tags
1 merge request!343Subset sorting
...@@ -332,9 +332,13 @@ void runner_do_sort(struct runner *r, struct cell *c, int flags, int cleanup, ...@@ -332,9 +332,13 @@ void runner_do_sort(struct runner *r, struct cell *c, int flags, int cleanup,
float buff[8]; float buff[8];
TIMER_TIC; TIMER_TIC;
/* We need to do the local sorts plus whatever was requested further up. */
flags |= c->do_sort;
if (flags == 0 && !c->do_sub_sort) return;
/* Check that the particles have been moved to the current time */ /* Check that the particles have been moved to the current time */
if (!cell_are_part_drifted(c, r->e)) error("Sorting un-drifted cell"); if (flags && !cell_are_part_drifted(c, r->e)) error("Sorting un-drifted cell");
#ifdef SWIFT_DEBUG_CHECKS #ifdef SWIFT_DEBUG_CHECKS
/* Make sure the sort flags are consistent (downward). */ /* Make sure the sort flags are consistent (downward). */
...@@ -347,17 +351,6 @@ void runner_do_sort(struct runner *r, struct cell *c, int flags, int cleanup, ...@@ -347,17 +351,6 @@ void runner_do_sort(struct runner *r, struct cell *c, int flags, int cleanup,
} }
#endif #endif
/* Clean-up the flags, i.e. filter out what's already been sorted unless
we're cleaning up. */
if (cleanup && c->dx_max_sort > 0.0f) {
/* Clear stale sorts. */
c->sorted = 0;
} else {
/* Ignore dimensions that are already sorted. */
flags &= ~c->sorted;
}
if (flags == 0) return;
/* Update the sort timer which represents the last time the sorts /* Update the sort timer which represents the last time the sorts
were re-set. */ were re-set. */
if (c->sorted == 0) c->ti_sort = r->e->ti_current; if (c->sorted == 0) c->ti_sort = r->e->ti_current;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment