Context. Accreting supermassive black holes are sources of polarized radiation that propagates through highly curved spacetime before reaching the observer. Accurate and efficient numerical schemes for polarized radiative transfer in curved spacetime are needed to help interpret observations of such polarized emission.
Aims: We aim to extend our publicly available radiative transfer code RAPTOR to include polarized radiative transfer, so that it can produce simulated polarized observations of accreting black holes. The RAPTOR code must remain compatible with arbitrary spacetimes and it must be efficient in operation, despite the added complexity of polarized radiative transfer.
Methods: We provide a brief review of various codes and methods for covariant polarized radiative transfer available in the literature and existing codes, and we present an efficient new scheme. For the spacetime propagation aspect of the computation, we developed a compact, Lorentz-invariant representation of a polarized ray. For the plasma-propagation aspect of the computation, we performed a formal analysis of the stiffness of the polarized radiative-transfer equation with respect to our explicit integrator. We also developed a hybrid integration scheme that switches to an implicit integrator in case of stiffness in order to solve the equation with optimal speed and accuracy for all possible values of the local optical/Faraday thickness of the plasma.
Results: We performed a comprehensive code verification by solving a number of well-known test problems using RAPTOR and comparing its output to exact solutions. We also demonstrate convergence with existing polarized radiative-transfer codes in the context of complex astrophysical problems, where we found that the integrated flux densities for all Stokes parameters converged to excellent agreement.
Conclusions: The RAPTOR code is capable of performing polarized radiative transfer in arbitrary, highly curved spacetimes. This capability is crucial for interpreting polarized observations of accreting black holes, which can yield information about the magnetic-field configuration in such accretion flows. The efficient formalism implemented in RAPTOR is computationally light and conceptually simple. The code is publicly available.