Full waveform inversion through double-sweeping solver