function mesh = deletepoints( mesh, pointstodelete )
    if nargin==1, return; end
    if size(pointstodelete,2)==0, return; end
    numcells = size(mesh.tricellvxs,1);
    nf = 0;
    for pi=pointstodelete
        for fi=1:numcells
            if mesh.tricellvxs(fi,1)==pi
                nf = nf+1;
                cellsToDelete(nf) = fi;
            end
            if mesh.tricellvxs(fi,2)==pi
                nf = nf+1;
                cellsToDelete(nf) = fi;
            end
            if mesh.tricellvxs(fi,3)==pi
                nf = nf+1;
                cellsToDelete(nf) = fi;
            end
        end
    end
    if nf > 0
        mesh = deletecell( mesh, cellsToDelete );
    end
end

