This changelog only includes the most important changes in recent updates. For a full log of all changes, please refer to git.
- Various bug fixes to MERCURIUS
- Performance increase when using the BASIC Gravity Routine with OpenMP
- Bug fixes to LINE and LINETREE algorithms
- Added LINETREE collision search algorithm. This algorithm uses a tree to check if any two particle trajectories overlapped during the last timestep. This should be beneficial in large N, low density situation as it allows for much larger timesteps. A modification of the collision resolve routine might be necessary to allow for multiple collisions of the same particle during one timestep. This depends on the application and the default is to only allow one collision per timestep.
- Added support for test particles and first-order variational particles to the Embedded Operator Splitting (EOS).
- BASIC Gravity routine changed from O(N^2) to O(0.5 N^2). This should lead to a speed-up in most cases but will break bit-wise reproducibility from earlier versions as the ordering of floating point opperations has changed.
- This version adds the new Embedded Operator Splitting methods from Rein (2019). See the tutorial in the ipython_examples folder for how to use them.
- Updates to OrbitPlot. Includes better layout of plot and some syntax changes. See OrbitPlot documentation for the new syntax.
- Small syntax changes for SABA integrator family.
- Includes high order integrators by Blanes et al. (2013).
- Changes for the new version of REBOUNDx.
- Added new high order symplectic integrators from Wisdom et al. (1996) and Laskar & Robutel (2001). The implementation of these integrators are discussed in Rein, Tamayo & Brown (2019).
- Implemented new bit-wise comparison functions for simulations. Python syntax is simply sim1==sim2.
- Fixed a bug in IAS15 which prevented a restarted simulation to reproduce the original simulation exactly.
- Improves and fixes various issues related to variational equations and MEGNO.
- Fixes a bug which resulted in duplicate snapshots in SimulationArchives when restarting simulations.
- Syntax change on the python side to create a simulation from a binary file or SimulationArchive: rebound.Simulation.from_file("test.bin") becomes rebound.Simulation("test.bin") rebound.Simulation.from_archive("test.bin",5) becomes rebound.Simulation("test.bin",5)
- The hybrid integrator MERCURIUS has been completely rewritten. It can now much more easily be used in simulations where physical collisions occur. There are no more hidden particle arrays in the background, meaning adding and removing particles can occur in the same way as for other integrators. It also works reliably with any additional forces.
- The old hybrid integrator HERMES has been removed. MERCURIUS should always be equal or better in performance and accuracy.
- Added getBezierPaths to SimulationArchive to allow for easy plotting of complicated trajectories. To do this, store a lot of snapshots in the SimulationArchive (several per orbit!).
- Added functionality to add, subtract, multiply and divide simulations. This might be useful when developing new algorithms, but is most likely not useful for most users.
- Added a deep copy functionality: reb_copy_simulation() in C, and sim.copy() in python.
- Refactored WHFast to enable calling only certain substeps.
- Added the rhill property to reb_orbit in C and the Orbit and Particle classes in Python. This parameter corresponds to the circular Hill radius of the particle: a*pow(m/(3M),1./3.).
- Fixes an issue related to collisions and the Mercurius integrator that prevented the lastcollision property to be updated.
- New: Fancy plotting routine. Usage: rebound.OrbitPlot(sim, fancy=True)
- One can now add particles from NASA Horizons using Julian Days. For example: sim.add("Earth", date="JD2458327.500000")
- Fixes a memory leak when using the old SimulationArchive version. Thanks to Ian Rabago for reporting the issue.
- Fixes a memory leak in the SimulationArchive read function.
- Removed function calls to open_memstream and fmemopen which might not work on older Mac OSX versions. This only affects the internals and there are no changes to user interface.
- Minor bug fixes
- SimulationArchive Version 2. With the new version of the SimulationArchive file format, you can now create snapshots of your simulations without any restrictions. You can change the number of particles, the timestep, even the integrator used during the integration. REBOUND automatically detects what has changed and only stores the differences in incremental snaphots. This reduces the filesize while keeping the format as flexible as possible. The old SimulationArchive Version 1 is still supported for now but might become deprecated in the future. All examples have been updated. As usual these are as usual good starting points for understanding the functionality and the syntax.
- Added REB_COLLISION_LINE. This is a collision detection routine which serves for collisions during the last timestep, assuming that all particles travel along straight lines. This can be useful in cases where not every collision needs to be detected exactly, but the overall collision rate should be reproduced. The algorithm is O(N**2).
- Bug related to N_active and variational particles has been fixed.
- A bug where WHFast might not converge in rare cases involving negative timesteps has been fixed.
- Changed default collision behaviour from hardsphere bouncing to halting the simulation. An exception is raised when using the python version. In C, you need to check the status flag after integrating the simulation.
- Refactored OrbitPlot.
- SIGINT handler added. Allows for garceful exit and keyboard interrupts (even from python).
- WebGL widget text overlay added.
- Bug fixes related to WebGL widget and ipywidgets version 6
- Updated WebGL widget to work with ipywidgets version 7
- Various fixed for Mercurius
- Bug fix for N_active=-1 (default)
- Allow for better parallelization of WHFast with OpenMP.
- Addded example of the Solar System with Testparticles.
- Made simulationarchive_append a public function (might be useful for some hacking projects).
- Fixes an issue with the WebGL widget.
- Fixes an issue with external forces and MERCURIUS.
- MERCURIUS is not compatible with binary files and the SimulationArchive.
- The WHFast integrator now supports Jacobi coordinates (default), democratic heliocentric coordinates and WHDS coordinates. The previously separate WHFastHelio integrator has been removed. The coordinate system can now be changed by simply setting the coordinates flag in the ri_whfast struct.
- Included a experimental new integrator MERCURIUS. This is similar to the hybrid integrator in Mercury but uses WHFast and IAS15. Not ready for production yet.
- Added a screenshot functionality for the WebGL ipython widget. This lets you take screenshots programmatically which is useful to create movies of simulations.
- Removed the march=native compiler flag as it seems to be problematic for some OSX/Sierra compilers.
- JANUS integrator added. This is a bit-wise reversible high-order symplectic integrator. At this time, it remains experimental. Details about this integrator will be published in an upcoming paper.
- Changes to the WHFastHelio integrator. This integrator now uses democratic heliocentric coordinates and a Hamiltonian splitted as proposed by Hernandez and Dehnen (2017), WHDS, which splits the Hamiltonian into three parts. It has the advantage that the integrator solves the two body problem exactly. It is not compatible with symplectic correctors, this functionality has been removed for WHFastHelio. For very high accuracy integrations of stable planetary systems, the WHFast integrator in Jacobi coordinated (and potentially symplectic correctors) should be better suited.
- Various minor bug fixes. Added pre-timestep modifications for REBOUNDx.
- Various minor bug fixes. One related to exact_finish_time=1.
- Added real-time interactive 3D visualizations using WebGL for Jupyter notebooks. This is an early release. Not everything might be working yet and new feature will be added to the widget class. To try it out, simply run sim.getWidget() in a Jupyter notebook. Note that you need to have ipywidgets installed and enabled.
- Minor changes to the Visualization backend. This should not have any consequences for users.
- Now stores the first characters of the current githash in binary files. This is helpful when trying to restart simulations from a binary file and making sure one uses the same version of REBOUND than in the original run. Currently, the git hash is not automatically compared when reloading a binary file. To view the githash, use e.g. hexdump. The hash appears between the first and second zero character in the first 64 bytes of the file.
- Updated visualization. REBOUND now uses a modern version of OpenGL (3.3) that allows for custom shaders and therefore better looking visualizations. However, REBOUND now requires glfw3 to compile the visualization module. If you are on a Mac, then the easiest way to install the glfw3 library is with homebrew: brew tap homebrew/versions && brew install glfw3. If you are on Linux, you can install it with your package manager, for example with sudo apt-get install libglfw3-dev.
- Introducing the Simulation Archive. The Simulation Archive allows for exact (bit-by-bit) reproducibility in N-body simulations and a completely new way of analyzing simulations. See Rein&Tamayo (2017) for details.
- The binary format has changed. Binary files created with an earlier version of REBOUND can not be loaded with this version. However, future binary files will be backwards compatible from this point forward.
- Minor bug fixes in HERMES integrator and some examples.
- NASA Horizons changed a telnet command. This update implements those changes and restores access to NASA Horizons from within REBOUND.
- Improvements to the Kepler solver. This is typically only relevant for extremly long simulation (1e11 timesteps or more) and extremely accurate simulation with symplectic correctors and a relative energy error of less than 1e-10.
- Small changes to HERMES integrator. It now has a Solar Switch Factor SSF to allow for close encounters with the central object.
- Added adaptive HSF for HERMES integrator. More documentation and paper to follow.
- Added symplectic correctors for WHFastHelio integrator. See Wisdom (2006).
- Improved accuracy of symplectic corrector coefficients for WHFast and WHFastHelio.
- Added new WHFastHelio integrator. This integrator uses the WHFast Kepler solver, but uses democratic heliocentric coordinates (WHFast itself uses Jacobi coordinates). Heliocentric coordinates are advantages if planets swap positions.
- Changes to how particle hashes are handled.
- This version removes the old SWIFTER based Wisdom-Holman routine, INTEGRATOR_WH. It wasn't working correctly for a while and the WHFast (INTEGRATOR_WHFAST) should be superior in any possible case we can think of.
- Added warning/error message system. This allows warning messages to be shown directly in iPython/python programs, rather than being shown on the console. To hide the warning messages, use a filter, e.g.
with warnings.catch_warnings(record=True) as w:
warnings.simplefilter("always")
# Execute a command which triggers a warning message.
# The message will not show up.
- Improvements regarding the WHFast logic for hyperbolic orbis. No changes should be noticable to users.
- Added the reb_serialize_particle_data function for fast access to particle data via numpy array. The full syntax is explain in the documentation. Here is a short example:
import numpy as np
a = np.zeros((sim.N,3),dtype="float64")
sim.serialize_particle_data(xyz=a)
print(a)
- When loading a simulation from a binary file, REBOUND now checks if the version of the binary file is the same as the current version.
- When saving a simulation to a binary file, all the auxiliary arrays for IAS15 are now stored. This allows for bit-by-bit reproducability in simulations that are making use of checkpoints.
- We replaced the old HYBRID integrator with the new and better HERMES integrator. Details of the HERMES integrator will be explained in an upcoming paper Silburt et al (2016, in prep).
- What used to be called
id
in the particle structure is now calledhash
. This can be used to uniquely identify particles in a simulation. In many cases, one can just identify particles by their position in the particle array, e.g. usingsim.particles[5]
. However, in cases where particles might get reordered in the particle array (e.g. when using a tree code), when particles can merge (by using thecollision_resolve_merge
routine), or when particles get added or removed manually. - The syntax is as follows:
sim = rebound.Simulation()
sim.add(m=1)
sim.add(m=1e-3,a=1)
# Setting a hash using a string:
sim.particles[1].hash = "planet1"
# Finding a particle using a string:
p = sim.get_particle_by_hash("planet1")
# Setting a random unique hash:
sim.particles[1].hash = sim.generate_unique_hash()
# Save unique hash to find particle later
uhash = sim.particles[1].hash
# Find particle using the hash
p = sim.get_particle_by_hash(uhash)
- We made many changes to the code. Most importanly, REBOUND is now thread-safe and does not use global variables anymore. All the variables that were previously global, are now contained in the
reb_simulation
structure. This has many advantages, for example, you can run separate simulations in parallel from within one process. - We also made it possible to choose all modules at runtime (compared to the selection in the
Makefile
that was used before). This is much more in line with standard UNIX coding practice and does not severely impact performance (it might even help making REBOUND a tiny bit faster). This makes REBOUND a fully functional shared library. We added a prefix to all public functions and struct definitions:reb_
. - There are still some features that haven't been fully ported. Most importantly, the MPI parallelization and the SWEEP collision detection routine.
- The best way to get and idea of the changes we made is to look at some of the example problems and the new REBOUND documentation. If you have trouble using the new version or find a bug, please submit an issue or a pull request on github.