Time and frequency domain forward modeling and inversion of seismic wave