Input: Initial approximation U = [u1,...,ud] for the eigenvectors. |
Output: Diagonal matrix of eigenvalues Λ and matrix V with the eigenvectors as its columns. |
1: | Orthonormalize U | ▹ MODIFIED GRAM-SCHMIDT |
2: | Compute the Ritz approximations U, W | ▹ RAYLEIGH-RITZ GEN. |
3: | conv=0 (conv indicates the number of converged eigenvalues) | |
4: | while conv < q do | |
5: | Compute $\begin{array}{}
\displaystyle
\Delta U =[\Delta u^{\lambda}_{1},\dots,\Delta u^{\lambda}_{\text{end}}]
\end{array}$ | ▹ CORRECTION NEWTON EQ. (16) |
6: | U = U − ΔU | |
7: | Orthonormalize(U) | ▹ MODIFIED GRAM-SCHMIDT |
8: | Compute the Ritz approximatisons U, W | ▹ RAYLEIGH-RITZ GEN. |
9: | fori =conv → q do | |
10: | if${{M{u_i} - {w_i}L{u_i}} \over {{u_i}}} < to{l_i}$then | ▹ CONVERGENCE CHECKING |
11: | Λ = [Λ,wi] | ▹ LOCKING CONVERGED EIGENPAIRS |
12: | V = [V,ui] | |
13: | else | |
14: | break | |
15: | end if | |
16: | end for | |
17: | conv=i | |
18: | W = [wconv,...,wend] | |
19: | U = [uconv,...,uend] | |
20: | end while | |