  With the goal of providing more accurate and realistic estimates of the
secular behavior of the mass accretion and drag rates in the "common-envelope"
scenario encountered when a black hole or a neutron star moves in the stellar
envelope of a red supergiant star, we have carried out the first general
relativistic simulations of the accretion flow onto a nonrotating black hole
moving supersonically in a medium with regular but different density gradients.
The simulations reveal that the supersonic motion always rapidly reaches a
stationary state and it produces a shock cone in the downstream part of the
flow. In the absence of density gradients we recover the phenomenology already
observed in the well-known Bondi--Hoyle--Lyttleton accretion problem, with
super-Eddington mass accretion rate and a shock cone whose axis is stably
aligned with the direction of motion. However, as the density gradient is made
stronger, the accretion rate also increases and the shock cone is progressively
and stably dragged toward the direction of motion. With sufficiently large
gradients, the shock-cone axis can become orthogonal to the direction, or even
move in the upstream region of the flow in the case of the largest density
gradient. Together with the phenomenological aspects of the accretion flow, we
have also quantified the rates of accretion of mass and momentum onto the black
hole. Simple analytic expressions have been found for the rates of accretion of
mass, momentum, drag force, and bremsstrahlung luminosity, all of which have
been employed in the astrophysical modelling of the secular evolution of a
binary system experiencing a common-envelope evolution...
