% vec_curl.m — The surface curl of a vector field. % % curl of a surfacefunv is again a surfacefunv. mip load --install flatironinstitute/flatironinstitute/surfacefun rng(0) p = 16; nref = 2; dom = surfacemesh.blob(p + 1, nref); v = surfacefunv(@(x, y, z) cos(2*x), ... @(x, y, z) sin(4*y), ... @(x, y, z) sin(3*z), dom); figure(1); quiver(curl(v), 0.1, 6) title('Surface curl of a vector field');