Light++ It is not open source but you can try to contact the author, Werner Benger.
A few years ago we have access to the source code of 'light++'. Not anymore :(
Light++ Raytracer! (general relativistic raytracing)
Simulation of a Black Hole by Raytracing
About the simulation of galactic close encounters, or a n-body general simulation, under the constraints of GR I found nothing.