RePrimAnd Documentation

Recovery of Primitives And EOS framework


RePrimAnd is a support library for numerical simulations of general relativistic magnetohydrodynamics. It provides methods for recovering primitive variables like pressure and velocity from the variables evolved in quasi-conservative formulations. Further, it provides a general framework for handling matter equations of state, a TOV solver, and tools for precomputed NS sequences.

A description of the recovery algorithm and tests of the library is given in the accompanying article 1.

The latest public versions can be found on the github page. Releases are also archived on Zenodo 2. Please report any problems on the issue tracker.


RePrimAnd was written by Dr. Wolfgang Kastaun <>. Thanks for additional testing go to Jay Vijay Kalinani.


Creative Commons License
This work is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License.

Please cite the PRD article 1. and the DOI on Zenodo 2 when publishing results obtained using the library.



Wolfgang Kastaun, Jay Vijay Kalinani, and Riccardo Ciolfi. Robust recovery of primitive variables in relativistic ideal magnetohydrodynamics. Phys. Rev. D, 103(2):023018, January 2021. arXiv:2005.01821, doi:10.1103/PhysRevD.103.023018.


Wolfgang Kastaun. RePrimAnd library. 2020. DOI 10.5281/zenodo.5136386. URL:


Indices and tables