function lambda = DirichletEig(p, t, e, num)
[S, M]=assemble(p,t); N=length(p);
%%%-------Find boundary nodes----------------------------------------------
bdnodeE = unique([e(1,:),e(2,:)]);
Inode = setdiff(linspace(1,N,N), bdnodeE);
A = S(Inode, Inode); B = M(Inode, Inode); 
[V,D]=eigs(A, B, num, 'sm'); 
lambda = diag(D);