1 function X=regular_mesh(n,h,v)
3 % Creates a regular mesh that is stretched in the vertical direction but
4 % uniform horizationally.
5 % Use plot_mesh_3d(X) to see the result.
7 % n size 3 number of cells in each direction
8 % h size 3 step size in each direction
9 % v size 1 vertical stretch factor
11 % X cell array with x y z grid coordinates
19 zz(i) = zz(i-1) + h(3) * v^(i-2);
21 [x,y,z] = ndgrid(h(1)*[0:n(1)],h(2)*[0:n(2)],zz);