SEM (For RTM)
SEM (For RTM)
% SEM solves the 2D wave equation using the Spectral Element Method
% Inputs:
% nx - number of points in the x-direction
% ny - number of points in the y-direction
% Lx - length of the domain in the x-direction
% Ly - length of the domain in the y-direction
% c - wave velocity in m/s
% nt - number of time steps
% dt - time step in seconds
% u0 - initial condition at t=0
% u1 - time derivative of the initial condition at t=0
% Outputs:
% u - pressure field at all time steps