1% fun_laplacian.m — The surface Laplacian (Laplace-Beltrami operator).
2%
3% Higher-order operators are built by composing the basic ones. lap(f)
4% is the surface Laplacian of f.
6mip load --install flatironinstitute/flatironinstitute/surfacefun
8p = 16;
9nref = 2;
10dom = surfacemesh.sphere(p + 1, nref);
12f = surfacefun(@(x, y, z) cos(6*x) .* y + exp(z), dom);
14figure(1);
15plot(lap(f)), colorbar
16title('\Delta_\Gamma f');