function pass = systemeig

% Eigenvalue test, inspired by Maxwell's equation

d = domain(0,pi);
D = diff(d); I = eye(d); Z = zeros(d);
A = [ -I D;D Z ];
A.lbc = [I Z];
A.rbc = [I Z];

lam = eigs(A,16);

lamcorrect = [
   -0.000000000000000                     
  0.000000000000002                     
 -0.499999999999999+0.866025403784436i
 -0.499999999999999- 0.866025403784436i
 -0.500000000000001+ 1.936491673103704i
 -0.500000000000001- 1.936491673103704i
 -0.499999999999996+ 2.958039891549807i
 -0.499999999999996- 2.958039891549807i
 -0.499999999999996+ 3.968626966596876i
 -0.499999999999996- 3.968626966596876i
 -0.499999999999998+ 4.974937185533104i
 -0.499999999999998- 4.974937185533104i
 -0.500000000000000+ 5.979130371550705i
 -0.500000000000000- 5.979130371550705i
 -0.499999999999998+ 6.982120021884483i
 -0.499999999999998- 6.982120021884483i
 ];

pass = norm( lam-lamcorrect, inf ) < 1e-12;
