  Modern simulation codes for general relativistic ideal magnetohydrodynamics
are all facing a long standing technical problem given by the need to recover
fundamental variables from those variables that are evolved in time. In the
relativistic case, this requires the numerical solution of a system of
nonlinear equations. Although several approaches are available, none has proven
completely reliable. A recent study comparing different methods showed that all
can fail, in particular for the important case of strong magnetization and
moderate Lorentz factors. Here, we propose a new robust, efficient, and
accurate solution scheme, along with a proof for the existence and uniqueness
of a solution, and analytic bounds for the accuracy. Further, the scheme allows
us to reliably detect evolution errors leading to unphysical states and
automatically applies corrections for typical harmless cases. A reference
implementation of the method is made publicly available as a software library.
The aim of this library is to improve the reliability of binary neutron star
merger simulations, in particular in the investigation of jet formation and
magnetically driven winds.
