McVittie metric
In the general theory of relativity, the McVittie metric is the exact solution of Einstein's field equations describing a black hole or massive object immersed  in an expanding cosmological spacetime. The solution was first fully obtained by George McVittie in the 1930s, while investigating the effect of the, then recently discovered, expansion of the Universe on a mass particle. The simplest case of a spherically symmetric solution to the field equations  of General Relativity with a cosmological constant term, the Schwarzschild-De Sitter spacetime, arises as a specific case of the McVittie metric, with positive 3-space scalar curvature  and constant Hubble parameter . Metric  
In isotropic coordinates, the McVittie metric is given by

 

where  is the usual line element for the euclidean sphere, M is identified as the mass of the massive object,  is the usual scale factor found in the FLRW metric, which accounts for the expansion of the space-time; and  is a curvature parameter related to the scalar curvature   of the 3-space as

 

which is related to the curvature of the 3-space exactly as in the FLRW spacetime. It is generally assumed that , otherwise the Universe is undergoing a contraction. One can define the time-dependent mass parameter , which accounts for the mass density inside the expanding, comoving radius  at time , to write the metric in a more succinct way

Causal structure and singularities  
From here on, it is useful to define . For McVittie metrics with the general expanding FLRW solutions properties  and , the spacetime has the property of containing at least two singularities. One is a cosmological, null-like naked singularity at the smallest positive root   of the equation . This is interpreted as the black hole event-horizon in the case where . For the   case, there is an event horizon at , but no singularity, which is extinguished by the existence of an asymptotic Schwarzschild-De Sitter phase of the spacetime. The second singularity lies at the causal past of all events in the space-time, and is a space-time singularity at , which, due to its causal past nature, is interpreted as the usual Big-Bang like singularity. There are also at least two event horizons: one at the largest solution of , and space-like, protecting the Big-Bang singularity at finite past time; and one at the  smallest root of the equation, also at finite time. The second event horizon becomes a black hole horizon for the  case. Schwarzschild and FLRW limits 
One can obtain the Schwarzschild and Robertson-Walker metrics from the McVittie metric in the exact limits of  and , respectively. In trying to describe the behavior of a mass particle in an expanding Universe, the original paper of McVittie  a black hole spacetime with decreasing Schwarschild radius  for an expanding surrounding cosmological spacetime. However, one can also interpret, in the limit of a small mass parameter , a perturbed FLRW spacetime, with  the Newtonian perturbation. Below we describe how to derive these analogies between the Schwarzschild and FLRW spacetimes from the McVittie metric. Schwarzschild 
In the case of a flat 3-space, with scalar curvature constant , the metric (1) becomes

 

which, for each instant of cosmic time , is the metric of the region outside of a Schwarzschild black hole in isotropic coordinates, with Schwarzschild radius . To make this equivalence more explicit, one can make the change of radial variables

 

to obtain the metric in Schwarzschild coordinates:

 

The interesting feature of this form of the metric is that one can clearly see that the Schwarzschild radius, which dictates at which distance from the center of the massive body the event horizon  is formed, shrinks as the Universe expands. For a comoving observer, which accompanies the Hubble flow this effect is not perceptible, as its radial coordinate is given by , such that, for the comoving observer,  is constant, and the Event Horizon will remain static. FLRW 
In the case of a vanishing mass parameter , the McVittie metric becomes exactly the FLRW metric in spherical coordinates

 

which leads to the exact Friedmann equations for the evolution of the scale factor . If one takes the limit of the mass parameter , the metric (1) becomes
 
which can be mapped to a perturberd FLRW spacetime in Newtonian gauge, with perturbation potential ; that is, one can understand the small mass of the central object as the perturbation in the FLRW metric. See also 
 Cosmology
 Singularity theorems

References 

Exact solutions in general relativity
Spacetime
Mathematical methods in general relativity
Lorentzian manifolds