Commit 9d250bc2 authored by Matthieu Schaller's avatar Matthieu Schaller

Ignore inhibited particles in the stats collection

parent abc9699e
......@@ -139,6 +139,11 @@ void stats_collect_part_mapper(void *map_data, int nr_parts, void *extra_data) {
const struct xpart *xp = &xparts[k];
const struct gpart *gp = p->gpart;
/* Ignore non-existing particles */
if (p->time_bin == time_bin_inhibited ||
p->time_bin == time_bin_not_created)
continue;
/* Get useful time variables */
const integertime_t ti_beg =
get_integer_time_begin(ti_current, p->time_bin);
......@@ -251,7 +256,14 @@ void stats_collect_gpart_mapper(void *map_data, int nr_gparts,
const struct gpart *gp = &gparts[k];
/* If the g-particle has a counterpart, ignore it */
if (gp->id_or_neg_offset < 0) continue;
if (gp->type != swift_type_dark_matter &&
gp->type != swift_type_dark_matter_background)
continue;
/* Ignore non-existing particles */
if (gp->time_bin == time_bin_inhibited ||
gp->time_bin == time_bin_not_created)
continue;
/* Get useful variables */
const integertime_t ti_beg =
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment