Télécharger dsconv.eso

Retour à la liste

Numérotation des lignes :

  1. C DSCONV SOURCE GF238795 18/02/01 21:15:19 9724
  2. c-----------------------------------------------------------------------
  3. c\BeginDoc
  4. c
  5. c\Name: dsconv
  6. c
  7. c\Description:
  8. c Convergence testing for the symmetric Arnoldi eigenvalue routine.
  9. c
  10. c\Usage:
  11. c call dsconv
  12. c ( N, RITZ, BOUNDS, TOL, NCONV )
  13. c
  14. c\Arguments
  15. c N Integer. (INPUT)
  16. c Number of Ritz values to check for convergence.
  17. c
  18. c RITZ Double precision array of length N. (INPUT)
  19. c The Ritz values to be checked for convergence.
  20. c
  21. c BOUNDS Double precision array of length N. (INPUT)
  22. c Ritz estimates associated with the Ritz values in RITZ.
  23. c
  24. c TOL Double precision scalar. (INPUT)
  25. c Desired relative accuracy for a Ritz value to be considered
  26. c "converged".
  27. c
  28. c NCONV Integer scalar. (OUTPUT)
  29. c Number of "converged" Ritz values.
  30. c
  31. c\EndDoc
  32. c
  33. c-----------------------------------------------------------------------
  34. c
  35. c\BeginLib
  36. c
  37. c\Routines called:
  38. c arscnd ARPACK utility routine for timing.
  39. c dlamch LAPACK routine that determines machine constants.
  40. c
  41. c\Author
  42. c Danny Sorensen Phuong Vu
  43. c Richard Lehoucq CRPC / Rice University
  44. c Dept. of Computational & Houston, Texas
  45. c Applied Mathematics
  46. c Rice University
  47. c Houston, Texas
  48. c
  49. c\SCCS Information: @(#)
  50. c FILE: sconv.F SID: 2.4 DATE OF SID: 4/19/96 RELEASE: 2
  51. c
  52. c\Remarks
  53. c 1. Starting with version 2.4, this routine no longer uses the
  54. c Parlett strategy using the gap conditions.
  55. c
  56. c\EndLib
  57. c
  58. c-----------------------------------------------------------------------
  59. c
  60. subroutine dsconv (n, ritz, bounds, tol, nconv)
  61. c
  62. c %----------------------------------------------------%
  63. c | Include files for debugging and timing information |
  64. -INC TARTRAK
  65. c %----------------------------------------------------%
  66. c
  67. c
  68. c %------------------%
  69. c | Scalar Arguments |
  70. c %------------------%
  71. c
  72. integer n, nconv
  73. REAL*8
  74. & tol
  75. real*8 T0,T1
  76. c
  77. c %-----------------%
  78. c | Array Arguments |
  79. c %-----------------%
  80. c
  81. REAL*8
  82. & ritz(n), bounds(n)
  83. c
  84. c %---------------%
  85. c | Local Scalars |
  86. c %---------------%
  87. c
  88. integer i
  89. REAL*8
  90. & temp, eps23
  91. c
  92. c %-------------------%
  93. c | External routines |
  94. c %-------------------%
  95. c
  96. REAL*8
  97. external dlamch
  98.  
  99. c %---------------------%
  100. **c | Intrinsic Functions |
  101. **c %---------------------%
  102. **c
  103. ** intrinsic abs
  104. **c
  105. **c %-----------------------%
  106. **c | Executable Statements |
  107. c %-----------------------%
  108. T0=0.D0
  109. T1=0.D0
  110. c
  111. * call arscnd (t0)
  112. c
  113. eps23 = dlamch('Epsilon-Machine')
  114. eps23 = eps23**(2.0D+0 / 3.0D+0)
  115. c
  116. nconv = 0
  117. do 10 i = 1, n
  118. c
  119. c %-----------------------------------------------------%
  120. c | The i-th Ritz value is considered "converged" |
  121. c | when: bounds(i) .le. TOL*max(eps23, abs(ritz(i))) |
  122. c %-----------------------------------------------------%
  123. c
  124. temp = max( eps23, abs(ritz(i)) )
  125. if ( bounds(i) .le. tol*temp ) then
  126. nconv = nconv + 1
  127. end if
  128. c
  129. 10 continue
  130. c
  131. * call arscnd (t1)
  132. tsconv = tsconv + (t1 - t0)
  133. c
  134. return
  135. c
  136. c %---------------%
  137. c | End of dsconv |
  138. c %---------------%
  139. c
  140. end
  141.  
  142.  
  143.  

© Cast3M 2003 - Tous droits réservés.
Mentions légales