1 function err=wind2flux_trans_test
4 X = regular_mesh([nx,ny,nz],h,1.2);
5 X = add_terrain_to_mesh(X,'hill','squash',0.1);
8 U = grad3z(rand(size(X{1})-1),[1 1 1]);
9 V = grad3z(rand(size(X{1})-1),[1 1 1]);
11 % Test that <Mu,v>=<u,M^Tv>
12 rhs = aprod3(wind2flux(U,X),V);
13 lhs = aprod3(U,wind2flux_trans(V,X));
21 function a=aprod3(x,y)
22 a = aprod(x{1},y{1})+aprod(x{2},y{2})+aprod(x{3},y{3});