An advanced feature far down the road might be to support particle groups (aka "events"). The file writing interface would perhaps get something like:
//If your particles should be grouped (into "events" typically),
//mcpl_add_particle calls must come between calls to:
void mcpl_begin_particle_group(mcpl_outfile_t);
void mcpl_end_particle_group(mcpl_outfile_t);
And the file reading interface might get corresponding functions as well. If we want to keep constant-size particles, we might need a flag on all particles with internal group-id, and a special read method which can be used to loop over particles in a group. Challenge: support empty events (fake particle with negative group id? - a bit wasteful but could at least contain info about number of empty events represented). Better might be to add a single unsigned integer at the start of each event with nparticles, but would loose fast skip-ahead capability.
So far this was not requested by anyone and it seems like a lot of hassle. Nonetheless, it might come up and I am opening this issue so we can cleanup a TODO item that was previously listed in mcpl.c.
An advanced feature far down the road might be to support particle groups (aka "events"). The file writing interface would perhaps get something like:
And the file reading interface might get corresponding functions as well. If we want to keep constant-size particles, we might need a flag on all particles with internal group-id, and a special read method which can be used to loop over particles in a group. Challenge: support empty events (fake particle with negative group id? - a bit wasteful but could at least contain info about number of empty events represented). Better might be to add a single unsigned integer at the start of each event with nparticles, but would loose fast skip-ahead capability.
So far this was not requested by anyone and it seems like a lot of hassle. Nonetheless, it might come up and I am opening this issue so we can cleanup a TODO item that was previously listed in mcpl.c.