function [f,g,h] = minsurf_wrapper(xyz,trilist,isbdry, x)
%%% [f,g,h] = minsurf_wrapper(xyz,trilist,isbdry, x)
%%% This function takes as input xyz, trilist, isbdry to describe a
%%% triangulation (see documentation of unitsquare_meshgen for more info)
%%% and also a vector x, which is a guess for the z-coordinates of the
%%% interior nodes.  Then it computes f, g, h, as the function value,
%%% gradient, and hessian where f is the surface area of the triangulation,
%%% and g and h are the gradient and hessian respectively of these with
%%% respect to the interior z-coordinates.

xyz(~isbdry,3) = x;
[f0,g0,h0] = minsurf(xyz,trilist);
[n1,n2] = size(f0);
f = f0;
g = g0(~isbdry);
h = h0(~isbdry,~isbdry);
