1 function X=regular_mesh(n,h,v)
3 % Creates a regular mesh that is stretched in the vertical direction but
4 % uniform horizationally
6 % n number of cells in each direction
7 % h step size in each direction
8 % v vertical stretch factor
10 % Mmat matrix computing fluxes in normal directions on mesh
18 zz(i) = zz(i-1) + h(3) * v^(i-2);
20 [x,y,z] = ndgrid(h(1)*[0:n(1)],h(2)*[0:n(2)],zz);