17 January 2017 11:22:18 AM JACOBI_EIGENVALUE_PRB C version Test the JACOBI_EIGENVALUE library. TEST01 For a symmetric matrix A, JACOBI_EIGENVALUE computes the eigenvalues D and eigenvectors V so that A * V = D * V. Input matrix A: Col: 0 1 2 3 Row 0: 4.000000 -30.000000 60.000000 -35.000000 1: -30.000000 300.000000 -675.000000 420.000000 2: 60.000000 -675.000000 1620.000000 -1050.000000 3: -35.000000 420.000000 -1050.000000 700.000000 Number of iterations = 11 Number of rotations = 21 Eigenvalues D: 0: 0.166643 1: 1.478055 2: 37.101491 3: 2585.253811 Eigenvector matrix V: Col: 0 1 2 3 Row 0: 0.792608 0.582076 0.179186 0.029193 1: 0.451923 -0.370502 -0.741918 -0.328712 2: 0.322416 -0.509579 0.100228 0.791411 3: 0.252161 -0.514048 0.638283 -0.514553 Frobenius norm error in eigensystem A*V-D*V = 1.20349e-12 TEST02 For a symmetric matrix A, JACOBI_EIGENVALUE computes the eigenvalues D and eigenvectors V so that A * V = D * V. As a sanity check, input a diagonal matrix. Input matrix A: Col: 0 1 2 3 Row 0: 4.000000 0.000000 0.000000 0.000000 1: 0.000000 1.000000 0.000000 0.000000 2: 0.000000 0.000000 3.000000 0.000000 3: 0.000000 0.000000 0.000000 2.000000 Number of iterations = 1 Number of rotations = 0 Eigenvalues D: 0: 1.000000 1: 2.000000 2: 3.000000 3: 4.000000 Eigenvector matrix V: Col: 0 1 2 3 Row 0: 0.000000 0.000000 0.000000 1.000000 1: 1.000000 0.000000 0.000000 0.000000 2: 0.000000 0.000000 1.000000 0.000000 3: 0.000000 1.000000 0.000000 0.000000 Frobenius norm error in eigensystem A*V-D*V = 0 TEST03 For a symmetric matrix A, JACOBI_EIGENVALUE computes the eigenvalues D and eigenvectors V so that A * V = D * V. Use the discretized second derivative matrix. Input matrix A: Col: 0 1 2 3 4 Row 0: -2.000000 1.000000 0.000000 0.000000 0.000000 1: 1.000000 -2.000000 1.000000 0.000000 0.000000 2: 0.000000 1.000000 -2.000000 1.000000 0.000000 3: 0.000000 0.000000 1.000000 -2.000000 1.000000 4: 0.000000 0.000000 0.000000 1.000000 -2.000000 Number of iterations = 10 Number of rotations = 43 Eigenvalues D: 0: -3.732051 1: -3.000000 2: -2.000000 3: -1.000000 4: -0.267949 Eigenvector matrix V: Col: 0 1 2 3 4 Row 0: 0.288675 0.500000 0.577350 -0.500000 0.288675 1: -0.500000 -0.500000 -0.000000 -0.500000 0.500000 2: 0.577350 0.000000 -0.577350 -0.000000 0.577350 3: -0.500000 0.500000 0.000000 0.500000 0.500000 4: 0.288675 -0.500000 0.577350 0.500000 0.288675 Frobenius norm error in eigensystem A*V-D*V = 9.40195e-16 JACOBI_EIGENVALUE_PRB Normal end of execution. 17 January 2017 11:22:18 AM