save_figures = 0;

disp('Initial conditions:');

dx = x_l:0.05:x_u; dy = y_l:0.05:y_u; [X,Y] = meshgrid(dx,dy);

% density
fig_rho_IC = figure('Name','Density initial condition');
surf(dx, dy, rho_IC(X,Y), 'EdgeColor', 'none');
xlabel('x'); ylabel('y'); zlabel('p');
colorbar('Location','EastOutside');
view(0, 90);
grid on;
axis equal;
xlim(x_axis_limits); ylim(y_axis_limits);

if save_figures == 1
    filename_string = 'PML_test_rho_initial_condition';
    saveas(fig_rho_IC,filename_string,'pdf');
    saveas(fig_rho_IC,filename_string,'png');
end


% velocities
fig_u_IC = figure('Name','Velocity u initial condition');
surf(dx, dy, u_IC(X,Y), 'EdgeColor', 'none');
xlabel('x'); ylabel('y'); zlabel('p');
colorbar('Location','EastOutside');
view(0, 90);
grid on;
axis equal;
xlim(x_axis_limits); ylim(y_axis_limits);

fig_v_IC = figure('Name','Velocity v initial condition');
surf(dx, dy, v_IC(X,Y), 'EdgeColor', 'none');
xlabel('x'); ylabel('y'); zlabel('p');
colorbar('Location','EastOutside');
view(0, 90);
grid on;
axis equal;
xlim(x_axis_limits); ylim(y_axis_limits);

if save_figures == 1
    filename_string = 'PML_test_u_initial_condition';
    saveas(fig_u_IC,filename_string,'pdf');
    saveas(fig_u_IC,filename_string,'png');
    
    filename_string = 'PML_test_v_initial_condition';
    saveas(fig_v_IC,filename_string,'pdf');
    saveas(fig_v_IC,filename_string,'png');
end


% pressure
fig_p_IC = figure('Name','Pressure initial condition');
surf(dx, dy, p_IC(X,Y), 'EdgeColor', 'none');
xlabel('x'); ylabel('y'); zlabel('p');
colorbar('Location','EastOutside');
view(0, 90);
grid on;
axis equal;
xlim(x_axis_limits); ylim(y_axis_limits);

if save_figures == 1
    filename_string = 'PML_test_p_initial_condition';
    saveas(fig_p_IC,filename_string,'pdf');
    saveas(fig_p_IC,filename_string,'png');
end