  Worldwide very long baseline radio interferometry arrays are expected to
obtain horizon-scale images of supermassive black hole candidates as well as of
relativistic jets in several nearby active galactic nuclei. This motivates the
development of models for magnetohydrodynamic flows in strong gravitational
fields. The Black Hole Accretion Code (BHAC) intends to aid with the modelling
of such sources by means of general relativistic magnetohydrodynamical (GRMHD)
simulations in arbitrary stationary spacetimes. New additions were required to
guarantee an accurate evolution of the magnetic field when small and large
scales are captured simultaneously. We discuss the adaptive mesh refinement
(AMR) techniques employed in BHAC, essential to keep several problems
computationally tractable, as well as staggered-mesh-based constrained
transport (CT) algorithms to preserve the divergence-free constraint of the
magnetic field, including a general class of prolongation operators for
face-allocated variables compatible with them. Through several standard tests,
we show that the choice of divergence-control method can produce qualitative
differences in simulations of scientifically relevant accretion problems. We
demonstrate the ability of AMR to reduce the computational costs of accretion
simulations while sufficiently resolving turbulence from the magnetorotational
instability. In particular, we describe a simulation of an accreting Kerr black
hole in Cartesian coordinates using AMR to follow the propagation of a
relativistic jet while self-consistently including the jet engine, a problem
set up-for which the new AMR implementation is particularly advantageous. The
CT methods and AMR strategies discussed here are being employed in the
simulations performed with BHAC used in the generation of theoretical models
for the Event Horizon Telescope Collaboration.
