  We develop a provably energy stable discontinuous Galerkin spectral element
method (DGSEM) approximation of the perfectly matched layer (PML) for the three
and two space dimensional (3D and 2D) linear acoustic wave equations, in first
order form, subject to well-posed linear boundary conditions. First, using the
well-known complex coordinate stretching, we derive an efficient un-split modal
PML for the 3D acoustic wave equation. Second, we prove asymptotic stability of
the continuous PML by deriving energy estimates in the Laplace space, for the
3D PML in a heterogeneous acoustic medium, assuming piece-wise constant PML
damping. Third, we develop a DGSEM for the wave equation using physically
motivated numerical flux, with penalty weights, which are compatible with all
well-posed, internal and external, boundary conditions. When the PML damping
vanishes, by construction, our choice of penalty parameters yield an upwind
scheme and a discrete energy estimate analogous to the continuous energy
estimate. Fourth, to ensure numerical stability when PML damping is present, it
is necessary to systematically extend the numerical numerical fluxes, and the
inter-element and boundary procedures, to the PML auxiliary differential
equations. This is critical for deriving discrete energy estimates analogous to
the continuous energy estimates. Finally, we propose a procedure to compute PML
damping coefficients such that the PML error converges to zero, at the optimal
convergence rate of the underlying numerical method. Numerical experiments are
presented in 2D and 3D corroborating the theoretical results.
