Incorrect Metadata In i/o
When de-selecting whole particle types (e.g. not writing gas particles in a BH only snapshot), the metadata in NumPart_ThisFile
is incorrect. We never 'remove' these particles from the i/o fully, as the following code snippet:
/* Number of particles that we will write in this file.
* Recall that background particles are never inhibited and have no extras */
const size_t Ntot_written =
e->s->nr_gparts - e->s->nr_inhibited_gparts - e->s->nr_extra_gparts;
const size_t Ngas_written =
e->s->nr_parts - e->s->nr_inhibited_parts - e->s->nr_extra_parts;
const size_t Nsinks_written =
e->s->nr_sinks - e->s->nr_inhibited_sinks - e->s->nr_extra_sinks;
const size_t Nstars_written =
e->s->nr_sparts - e->s->nr_inhibited_sparts - e->s->nr_extra_sparts;
const size_t Nblackholes_written =
e->s->nr_bparts - e->s->nr_inhibited_bparts - e->s->nr_extra_bparts;
const size_t Nbaryons_written =
Ngas_written + Nstars_written + Nblackholes_written + Nsinks_written;
const size_t Ndm_written =
Ntot_written > 0 ? Ntot_written - Nbaryons_written - Ndm_background : 0
present in all i/o subsections does not take into account cancelled particle types.