Simulation Archive

group SimulationArchiveFunctions

Functions for interacting with simulation archives


struct reb_simulation *reb_create_simulation_from_simulationarchive(char *filename)

Restart a simulation using a SimulationArchive file. This function restarts a simulation from a SimulationArchive binary file. It loads the last snapshot in the archive. Note that this function depends on many requirements, for example a constant particle number. See python documentation and Rein & Tamayo (2017) for more details.

Returns a pointer to a new reb_simulation structure. Returns NULL if an error occured. User needs to free the simulation when not used anymore.
  • filename -

    The name of the file to be opened.

int reb_simulationarchive_load_snapshot(struct reb_simulation *r, char *filename, long snapshot)

Load information from a specific snapshot a SimulationArchive file. This function is used by the python wrapper. If you use it by itself, be sure to look at the python source code beforehand.

long reb_simulationarchive_estimate_size(struct reb_simulation *r, double tmax)

Estimate the file size of a simulation using SimulationArchive.

Returns the approximate size of the SimulationArchive file in bytes.
  • r -

    The simulation to be considered. Needs to have r->simulationarchive_interval set and particles need to be present in the simulation.

  • tmax -

    Maximum integration time.