GRay2: A General Purpose Geodesic Integrator for Kerr Spacetimes

Chi Kwan Chan, Lia Medeiros, Feryal Özel, Dimitrios Psaltis

Research output: Contribution to journalArticlepeer-review

18 Scopus citations


Fast and accurate integration of geodesics in Kerr spacetimes is an important tool in modeling the orbits of stars and the transport of radiation in the vicinities of black holes. Most existing integration algorithms employ Boyer-Lindquist (BL) coordinates, which have coordinate singularities at the event horizon and along the poles. Handling the singularities requires special numerical treatment in these regions, often slows down the calculations, and may lead to inaccurate geodesics. We present here a new general-purpose geodesic integrator, GRay2, that overcomes these issues by employing the Cartesian form of Kerr-Schild (KS) coordinates. By performing particular mathematical manipulations of the geodesic equations and several optimizations, we develop an implementation of the Cartesian KS coordinates that outperforms calculations that use the seemingly simpler equations in BL coordinates. We also employ the OpenCL framework, which allows GRay2 to run on multicore CPUs as well as on a wide range of graphics processing units hardware accelerators, making the algorithm more versatile. We report numerous convergence tests and benchmark results for GRay2 for both time-like (particle) and null (photon) geodesics.

Original languageEnglish (US)
Article number59
JournalAstrophysical Journal
Issue number1
StatePublished - Nov 1 2018


  • black hole physics
  • gravitation
  • methods: numerical

ASJC Scopus subject areas

  • Astronomy and Astrophysics
  • Space and Planetary Science


Dive into the research topics of 'GRay2: A General Purpose Geodesic Integrator for Kerr Spacetimes'. Together they form a unique fingerprint.

Cite this