% moje testovaci uloha c. 1
% L_x = 0; R_x = 4; L_y = 0; R_y = 4; T = 5; % vymezeni oblasti vypoctu
% a_advec = 0.3; b_advec = -0.3; % parametry advekce
% RHS = @(x,y,t) 0 * x + 0 * y + 0 * t; % prava strana rovnice
% c = 25; IC = @(x,y) exp(-c * ((x - (L_x + R_x) / 2) .^ 2 + (y - (L_y + R_y) / 2) .^ 2)); % pocatecni podminka
% BC = @(x,y,t) 0 * x + 0 * y + 0 * t; % okrajova podminka
% 
% %[P,E] = MshToMatlab2D('Advection2D_4elem.msh'); % nacteni site (prostorova diskretizace)
% mesh_size_parametr = 0.50;
% [P,E] = MshToMatlab2D(['Advection2D_h=',sprintf('%0.2f',mesh_size_parametr),'.msh']); % nacteni site (prostorova diskretizace)
% %[P,E] = MeshGeneration2D(L_x, R_x, L_y, R_y, 16, 16); % moje vlastni generovani site pro 2D ulohy
% 
% x_axis_limits = [L_x, R_x]; y_axis_limits = [L_y, R_y];


% moje testovaci uloha c. 2
x_l = -5; x_u = 15; y_l = -5; y_u = 15; T = 10; % vymezeni oblasti vypoctu
a_advec = 1; b_advec = 1; % parametry advekce
RHS = @(x,y,t) 0 * x + 0 * y + 0 * t; % prava strana rovnice
b = 1; IC = @(x,y) exp((-log(2) / (b ^ 2)) * (x .^ 2 + y .^ 2)); % pocatecni podminka
BC = @(x,y,t) IC(x - a_advec * t,y - b_advec * t); % okrajova podminka

mesh_size_parametr = 1.00;
[P,E] = MshToMatlab2D(['Advection2D_new_h=',sprintf('%0.2f',mesh_size_parametr),'.msh']);
%[P,E] = MshToMatlab2D(['Advection2D_new_clockwise_h=',sprintf('%0.2f',mesh_size_parametr),'.msh']); % test clockwise site
%[P,E,E_parts,E_parts_neighs] = MshToMatlab2D_with_partitions(['Advection2D_new_h=',sprintf('%0.2f',mesh_size_parametr),'_2partitions.msh']);
%[P,E,E_parts,E_parts_neighs] = MshToMatlab2D_with_partitions(['Advection2D_new_h=',sprintf('%0.2f',mesh_size_parametr),'_4partitions.msh']);
%[Nv, VX, VY, K, EToV] = MeshReaderGambit2D(['Advection2D_new_h=',sprintf('%0.2f',mesh_size_parametr),'.neu']);
%P = [VX; VY];
%E = EToV';

x_axis_limits = [x_l, x_u]; y_axis_limits = [y_l, y_u];


% testovaci uloha, ale large [-10,60]^2
%x_l = -10; x_u = 60; y_l = -10; y_u = 60; T = 50; % vymezeni oblasti vypoctu
%a_advec = 1; b_advec = 1; % parametry advekce
%RHS = @(x,y,t) 0 * x + 0 * y + 0 * t; % prava strana rovnice
%b = 2; IC = @(x,y) exp((-log(2) / (b ^ 2)) * (x .^ 2 + y .^ 2)); % pocatecni podminka
%BC = @(x,y,t) IC(x - a_advec * t,y - b_advec * t); % okrajova podminka
%
%mesh_size_parametr = 1.50;
%%[P,E] = MshToMatlab2D(['Advection2D_large_h=',sprintf('%0.2f',mesh_size_parametr),'.msh']);
%%[P,E,E_parts,E_parts_neighs] = MshToMatlab2D_with_partitions(['Advection2D_large_h=',sprintf('%0.2f',mesh_size_parametr),'_4partitions.msh']);
%[P,E,E_parts,E_parts_neighs] = MshToMatlab2D_with_partitions(['Advection2D_large_h=',sprintf('%0.2f',mesh_size_parametr),'_2partitions.msh']);
%
%x_axis_limits = [x_l, x_u]; y_axis_limits = [y_l, y_u];