1 function err = mat_gen_wind_flux_div_test
2 % test mat_gen_wind_flux_div against mat_wind_flux_div
5 % mesh_len vector size 3 of mesh dimensions
6 % h vector size 3 of mesh steps
9 disp('mat_wind_flux_div_test')
10 % test mesh with a hill terrain (unit vectors for now)
12 X = regular_mesh(mesh_len,h,1.2);
13 X = add_terrain_to_mesh(X,'hill','shift',0.4);
14 %X = add_terrain_to_mesh(X,'hill','squash',0.1);
15 % matrix of wind flux divergence
16 disp('Time for new matrix generation:')
18 DM = mat_gen_wind_flux_div(X);
21 disp('Time for old matrix generation:')
23 DM_old = mat_wind_flux_div(X);
25 disp('Compare both methods')
26 err = big(DM - DM_old);