A flexible spectral code for the study of general relativistic
magnetohydrodynamics is presented. Aiming at investigating the physics of
slowly rotating magnetized compact stars, this new code makes use of various
physically motivated approximations. Among them, the relativistic anelastic
approximation is a key ingredient of the current version of the code. In this
article, we mainly outline the method, putting emphasis on algorithmic
techniques that enable to benefit as much as possible of the non-dissipative
character of spectral methods, showing also a potential astrophysical
application and providing a few illustrative tests.Comment: 15 pages, 4 figures (new figure added, misprints corrected) Article
accepted for publication in a special issue of Classical and Quantum Gravity
"New Frontiers in Numerical Relativity