An analysis of a discontinuous spectral element method for elastic wave propagation in a heterogeneous material