% mesh_single_patch.m — A surface from a single high-order patch. % % Every patch of a surfacemesh is represented on tensor-product Chebyshev % nodes in [-1,1]^2. Here we build one patch and map it to the graph of % z = cos(u)cos(v). The constructor takes cell arrays of node coordinates % (one cell per patch). mip load --install flatironinstitute/flatironinstitute/surfacefun n = 16; [u, v] = chebpts2(n); x = u; y = v; z = cos(u) .* cos(v); dom = surfacemesh({x}, {y}, {z}); figure(1); plot(dom), camlight title('Single high-order patch'); fprintf('number of patches: %d\n', length(dom));