Seismic imaging and inversion based on spectral-element and adjoint methods