clc; close all;

save_figures = 0;

% n_dt = 6; % otestovat - 
% t_vect = 0:(n_dt * dt):T;

% (x,y) = (100,0)
% values_p_R = p_boundary_R(1:n_dt:end);


t_step_exact = 0.1;
t_vect_exact = 0:t_step_exact:T;
n = length(t_vect_exact);
values_p_exact_R = zeros(1,n);

x_boundary_R = 100; y_boundary_R = 0;
tic;
for i = 1:n
    p_point = ExactSolution(x_boundary_R,y_boundary_R,t_vect_exact(i));
    values_p_exact_R(i) = p_point; 
end
toc;

% vykresleni numerickeho reseni bodove
fig_p_R = figure;
plot(t_vect_exact,values_p_exact_R,'Color','red','LineWidth',2); hold on;
% plot(t_vect,values_p_R,'*');
% legend('analytical','numerical','Location','NorthEast');
xlim([0,T]);
% ylim([-0.04,0.08]);
xlabel('t'); ylabel('p''');

if save_figures == 1
    mesh_size_string = sprintf('%0.2f',mesh_size_parametr);
    mesh_size_string = strrep(mesh_size_string,'.',',');
    
    filename_string = ['Bailly_Juve_monopole_subsonic_p_solution_on_boundary_x=100_y=0_for_h=',mesh_size_string,',_N=',num2str(N)];
    saveas(fig_p_R,filename_string,'pdf');
    saveas(fig_p_R,filename_string,'png');
end