dsconv
C DSCONV SOURCE BP208322 20/02/06 21:15:29 10512
c-----------------------------------------------------------------------
c\BeginDoc
c
c\Name: dsconv
c
c\Description:
c Convergence testing for the symmetric Arnoldi eigenvalue routine.
c
c\Usage:
c call dsconv
c ( N, RITZ, BOUNDS, TOL, NCONV )
c
c\Arguments
c N Integer. (INPUT)
c Number of Ritz values to check for convergence.
c
c RITZ Double precision array of length N. (INPUT)
c The Ritz values to be checked for convergence.
c
c BOUNDS Double precision array of length N. (INPUT)
c Ritz estimates associated with the Ritz values in RITZ.
c
c TOL Double precision scalar. (INPUT)
c Desired relative accuracy 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\Routines called:
c arscnd ARPACK utility routine for timing. -> deleted by BP in 2020
c dlamch LAPACK routine that determines machine constants.
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\SCCS Information: @(#)
c FILE: sconv.F SID: 2.4 DATE OF SID: 4/19/96 RELEASE: 2
c
c\Remarks
c 1. Starting with version 2.4, this routine no longer uses the
c Parlett strategy using the gap conditions.
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 real*8 T0,T1
c
c %-----------------%
c | Array Arguments |
c %-----------------%
c
REAL*8
& ritz(n), bounds(n)
c
c %---------------%
c | Local Scalars |
c %---------------%
c
integer i
REAL*8
& temp, eps23
c
c %-------------------%
c | External routines |
c %-------------------%
c
REAL*8
& dlamch
external dlamch
c %---------------------%
**c | Intrinsic Functions |
**c %---------------------%
**c
** intrinsic abs
**c
**c %-----------------------%
**c | Executable Statements |
c %-----------------------%
c T0=0.D0
c T1=0.D0
c
* call arscnd (t0)
c
eps23 = eps23**(2.0D+0 / 3.0D+0)
c
nconv = 0
do 10 i = 1, n
c
c %-----------------------------------------------------%
c | The i-th Ritz value is considered "converged" |
c | when: bounds(i) .le. TOL*max(eps23, abs(ritz(i))) |
c %-----------------------------------------------------%
c
temp = max( eps23, abs(ritz(i)) )
if ( bounds(i) .le. tol*temp ) then
nconv = nconv + 1
end if
c
10 continue
c
* call arscnd (t1)
c tsconv = tsconv + (t1 - t0)
c
c return
c
c %---------------%
c | End of dsconv |
c %---------------%
c
end
					© Cast3M 2003 - Tous droits réservés.
					Mentions légales