Télécharger dsconv.eso

Retour à la liste

Numérotation des lignes :

  1. C DSCONV SOURCE BP208322 15/10/13 21:15:52 8670
  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. c
  76. c %-----------------%
  77. c | Array Arguments |
  78. c %-----------------%
  79. c
  80. REAL*8
  81. & ritz(n), bounds(n)
  82. c
  83. c %---------------%
  84. c | Local Scalars |
  85. c %---------------%
  86. c
  87. integer i
  88. REAL*8
  89. & temp, eps23
  90. c
  91. c %-------------------%
  92. c | External routines |
  93. c %-------------------%
  94. c
  95. REAL*8
  96. external dlamch
  97.  
  98. c %---------------------%
  99. **c | Intrinsic Functions |
  100. **c %---------------------%
  101. **c
  102. ** intrinsic abs
  103. **c
  104. **c %-----------------------%
  105. **c | Executable Statements |
  106. c %-----------------------%
  107. c
  108. * call arscnd (t0)
  109. c
  110. eps23 = dlamch('Epsilon-Machine')
  111. eps23 = eps23**(2.0D+0 / 3.0D+0)
  112. c
  113. nconv = 0
  114. do 10 i = 1, n
  115. c
  116. c %-----------------------------------------------------%
  117. c | The i-th Ritz value is considered "converged" |
  118. c | when: bounds(i) .le. TOL*max(eps23, abs(ritz(i))) |
  119. c %-----------------------------------------------------%
  120. c
  121. temp = max( eps23, abs(ritz(i)) )
  122. if ( bounds(i) .le. tol*temp ) then
  123. nconv = nconv + 1
  124. end if
  125. c
  126. 10 continue
  127. c
  128. * call arscnd (t1)
  129. tsconv = tsconv + (t1 - t0)
  130. c
  131. return
  132. c
  133. c %---------------%
  134. c | End of dsconv |
  135. c %---------------%
  136. c
  137. end
  138.  
  139.  

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