dnconv
C DNCONV SOURCE BP208322 20/02/06 21:15:22 10512 c----------------------------------------------------------------------- c\BeginDoc c c\Name: dnconv c c\Description: c Convergence testing for the nonsymmetric Arnoldi eigenvalue routine. c c\Usage: c call dnconv c ( N, RITZR, RITZI, BOUNDS, TOL, NCONV ) c c\Arguments c N Integer. (INPUT) c Number of Ritz values to check for convergence. c c RITZR, Double precision arrays of length N. (INPUT) c RITZI Real and imaginary parts of the Ritz values to be checked c for convergence. c BOUNDS Double precision array of length N. (INPUT) c Ritz estimates for the Ritz values in RITZR and RITZI. c c TOL Double precision scalar. (INPUT) c Desired backward error for a Ritz value to be considered c "converged". c c NCONV Integer scalar. (OUTPUT) c Number of "converged" Ritz values. c c\EndDoc c c----------------------------------------------------------------------- c c\BeginLib c c\Local variables: c xxxxxx real c c\Routines called: c arscnd ARPACK utility routine for timing. -> deleted by BP in 2020 c dlamch LAPACK routine that determines machine constants. c dlapy2 LAPACK routine to compute sqrt(x**2+y**2) carefully. c c\Author c Danny Sorensen Phuong Vu c Richard Lehoucq CRPC / Rice University c Dept. of Computational & Houston, Texas c Applied Mathematics c Rice University c Houston, Texas c c\Revision history: c xx/xx/92: Version ' 2.1' c c\SCCS Information: @(#) c FILE: nconv.F SID: 2.3 DATE OF SID: 4/20/96 RELEASE: 2 c c\Remarks c 1. xxxx c c\EndLib c c----------------------------------------------------------------------- c c c %----------------------------------------------------% c | Include files for debugging and timing information | c -INC TARTRAK c %----------------------------------------------------% c c c %------------------% c | Scalar Arguments | c %------------------% c integer n, nconv REAL*8 & tol c c %-----------------% c | Array Arguments | c %-----------------% REAL*8 & ritzr(n), ritzi(n), bounds(n) c c %---------------% c | Local Scalars | c %---------------% c integer i REAL*8 & temp, eps23 c c %--------------------% c | External Functions | c %--------------------% c REAL*8 c %-----------------------% c | Executable Statements | c %-----------------------% c c %-------------------------------------------------------------% c | Convergence test: unlike in the symmetric code, I am not | c | using things like refined error bounds and gap condition | c | because I don't know the exact equivalent concept. | c | | c | Instead the i-th Ritz value is considered "converged" when: | c | | c | bounds(i) .le. ( TOL * | ritz | ) | c | | c | for some appropriate choice of norm. | c %-------------------------------------------------------------% c * call arscnd (t0) c c %---------------------------------% c | Get machine dependent constant. | c %---------------------------------% c eps23 = eps23**(2.0D+0 / 3.0D+0) c nconv = 0 do 20 i = 1, n if (bounds(i) .le. tol*temp) nconv = nconv + 1 20 continue c * call arscnd (t1) c tnconv = tnconv + (t1 - t0) c return c c %---------------% c | End of dnconv | c %---------------% c end
© Cast3M 2003 - Tous droits réservés.
Mentions légales