1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290
|
---
:name: slarrd
:md5sum: 1d17cb93ea8bc4bff6584301e13e6ec7
:category: :subroutine
:arguments:
- range:
:type: char
:intent: input
- order:
:type: char
:intent: input
- n:
:type: integer
:intent: input
- vl:
:type: real
:intent: input
- vu:
:type: real
:intent: input
- il:
:type: integer
:intent: input
- iu:
:type: integer
:intent: input
- gers:
:type: real
:intent: input
:dims:
- 2*n
- reltol:
:type: real
:intent: input
- d:
:type: real
:intent: input
:dims:
- n
- e:
:type: real
:intent: input
:dims:
- n-1
- e2:
:type: real
:intent: input
:dims:
- n-1
- pivmin:
:type: real
:intent: input
- nsplit:
:type: integer
:intent: input
- isplit:
:type: integer
:intent: input
:dims:
- n
- m:
:type: integer
:intent: output
- w:
:type: real
:intent: output
:dims:
- n
- werr:
:type: real
:intent: output
:dims:
- n
- wl:
:type: real
:intent: output
- wu:
:type: real
:intent: output
- iblock:
:type: integer
:intent: output
:dims:
- n
- indexw:
:type: integer
:intent: output
:dims:
- n
- work:
:type: real
:intent: workspace
:dims:
- 4*n
- iwork:
:type: integer
:intent: workspace
:dims:
- 3*n
- info:
:type: integer
:intent: output
:substitutions: {}
:fortran_help: " SUBROUTINE SLARRD( RANGE, ORDER, N, VL, VU, IL, IU, GERS, RELTOL, D, E, E2, PIVMIN, NSPLIT, ISPLIT, M, W, WERR, WL, WU, IBLOCK, INDEXW, WORK, IWORK, INFO )\n\n\
* Purpose\n\
* =======\n\
*\n\
* SLARRD computes the eigenvalues of a symmetric tridiagonal\n\
* matrix T to suitable accuracy. This is an auxiliary code to be\n\
* called from SSTEMR.\n\
* The user may ask for all eigenvalues, all eigenvalues\n\
* in the half-open interval (VL, VU], or the IL-th through IU-th\n\
* eigenvalues.\n\
*\n\
* To avoid overflow, the matrix must be scaled so that its\n\
* largest element is no greater than overflow**(1/2) *\n\
* underflow**(1/4) in absolute value, and for greatest\n\
* accuracy, it should not be much smaller than that.\n\
*\n\
* See W. Kahan \"Accurate Eigenvalues of a Symmetric Tridiagonal\n\
* Matrix\", Report CS41, Computer Science Dept., Stanford\n\
* University, July 21, 1966.\n\
*\n\n\
* Arguments\n\
* =========\n\
*\n\
* RANGE (input) CHARACTER*1\n\
* = 'A': (\"All\") all eigenvalues will be found.\n\
* = 'V': (\"Value\") all eigenvalues in the half-open interval\n\
* (VL, VU] will be found.\n\
* = 'I': (\"Index\") the IL-th through IU-th eigenvalues (of the\n\
* entire matrix) will be found.\n\
*\n\
* ORDER (input) CHARACTER*1\n\
* = 'B': (\"By Block\") the eigenvalues will be grouped by\n\
* split-off block (see IBLOCK, ISPLIT) and\n\
* ordered from smallest to largest within\n\
* the block.\n\
* = 'E': (\"Entire matrix\")\n\
* the eigenvalues for the entire matrix\n\
* will be ordered from smallest to\n\
* largest.\n\
*\n\
* N (input) INTEGER\n\
* The order of the tridiagonal matrix T. N >= 0.\n\
*\n\
* VL (input) REAL \n\
* VU (input) REAL \n\
* If RANGE='V', the lower and upper bounds of the interval to\n\
* be searched for eigenvalues. Eigenvalues less than or equal\n\
* to VL, or greater than VU, will not be returned. VL < VU.\n\
* Not referenced if RANGE = 'A' or 'I'.\n\
*\n\
* IL (input) INTEGER\n\
* IU (input) INTEGER\n\
* If RANGE='I', the indices (in ascending order) of the\n\
* smallest and largest eigenvalues to be returned.\n\
* 1 <= IL <= IU <= N, if N > 0; IL = 1 and IU = 0 if N = 0.\n\
* Not referenced if RANGE = 'A' or 'V'.\n\
*\n\
* GERS (input) REAL array, dimension (2*N)\n\
* The N Gerschgorin intervals (the i-th Gerschgorin interval\n\
* is (GERS(2*i-1), GERS(2*i)).\n\
*\n\
* RELTOL (input) REAL \n\
* The minimum relative width of an interval. When an interval\n\
* is narrower than RELTOL times the larger (in\n\
* magnitude) endpoint, then it is considered to be\n\
* sufficiently small, i.e., converged. Note: this should\n\
* always be at least radix*machine epsilon.\n\
*\n\
* D (input) REAL array, dimension (N)\n\
* The n diagonal elements of the tridiagonal matrix T.\n\
*\n\
* E (input) REAL array, dimension (N-1)\n\
* The (n-1) off-diagonal elements of the tridiagonal matrix T.\n\
*\n\
* E2 (input) REAL array, dimension (N-1)\n\
* The (n-1) squared off-diagonal elements of the tridiagonal matrix T.\n\
*\n\
* PIVMIN (input) REAL \n\
* The minimum pivot allowed in the Sturm sequence for T.\n\
*\n\
* NSPLIT (input) INTEGER\n\
* The number of diagonal blocks in the matrix T.\n\
* 1 <= NSPLIT <= N.\n\
*\n\
* ISPLIT (input) INTEGER array, dimension (N)\n\
* The splitting points, at which T breaks up into submatrices.\n\
* The first submatrix consists of rows/columns 1 to ISPLIT(1),\n\
* the second of rows/columns ISPLIT(1)+1 through ISPLIT(2),\n\
* etc., and the NSPLIT-th consists of rows/columns\n\
* ISPLIT(NSPLIT-1)+1 through ISPLIT(NSPLIT)=N.\n\
* (Only the first NSPLIT elements will actually be used, but\n\
* since the user cannot know a priori what value NSPLIT will\n\
* have, N words must be reserved for ISPLIT.)\n\
*\n\
* M (output) INTEGER\n\
* The actual number of eigenvalues found. 0 <= M <= N.\n\
* (See also the description of INFO=2,3.)\n\
*\n\
* W (output) REAL array, dimension (N)\n\
* On exit, the first M elements of W will contain the\n\
* eigenvalue approximations. SLARRD computes an interval\n\
* I_j = (a_j, b_j] that includes eigenvalue j. The eigenvalue\n\
* approximation is given as the interval midpoint\n\
* W(j)= ( a_j + b_j)/2. The corresponding error is bounded by\n\
* WERR(j) = abs( a_j - b_j)/2\n\
*\n\
* WERR (output) REAL array, dimension (N)\n\
* The error bound on the corresponding eigenvalue approximation\n\
* in W.\n\
*\n\
* WL (output) REAL \n\
* WU (output) REAL \n\
* The interval (WL, WU] contains all the wanted eigenvalues.\n\
* If RANGE='V', then WL=VL and WU=VU.\n\
* If RANGE='A', then WL and WU are the global Gerschgorin bounds\n\
* on the spectrum.\n\
* If RANGE='I', then WL and WU are computed by SLAEBZ from the\n\
* index range specified.\n\
*\n\
* IBLOCK (output) INTEGER array, dimension (N)\n\
* At each row/column j where E(j) is zero or small, the\n\
* matrix T is considered to split into a block diagonal\n\
* matrix. On exit, if INFO = 0, IBLOCK(i) specifies to which\n\
* block (from 1 to the number of blocks) the eigenvalue W(i)\n\
* belongs. (SLARRD may use the remaining N-M elements as\n\
* workspace.)\n\
*\n\
* INDEXW (output) INTEGER array, dimension (N)\n\
* The indices of the eigenvalues within each block (submatrix);\n\
* for example, INDEXW(i)= j and IBLOCK(i)=k imply that the\n\
* i-th eigenvalue W(i) is the j-th eigenvalue in block k.\n\
*\n\
* WORK (workspace) REAL array, dimension (4*N)\n\
*\n\
* IWORK (workspace) INTEGER array, dimension (3*N)\n\
*\n\
* INFO (output) INTEGER\n\
* = 0: successful exit\n\
* < 0: if INFO = -i, the i-th argument had an illegal value\n\
* > 0: some or all of the eigenvalues failed to converge or\n\
* were not computed:\n\
* =1 or 3: Bisection failed to converge for some\n\
* eigenvalues; these eigenvalues are flagged by a\n\
* negative block number. The effect is that the\n\
* eigenvalues may not be as accurate as the\n\
* absolute and relative tolerances. This is\n\
* generally caused by unexpectedly inaccurate\n\
* arithmetic.\n\
* =2 or 3: RANGE='I' only: Not all of the eigenvalues\n\
* IL:IU were found.\n\
* Effect: M < IU+1-IL\n\
* Cause: non-monotonic arithmetic, causing the\n\
* Sturm sequence to be non-monotonic.\n\
* Cure: recalculate, using RANGE='A', and pick\n\
* out eigenvalues IL:IU. In some cases,\n\
* increasing the PARAMETER \"FUDGE\" may\n\
* make things work.\n\
* = 4: RANGE='I', and the Gershgorin interval\n\
* initially used was too small. No eigenvalues\n\
* were computed.\n\
* Probable cause: your machine has sloppy\n\
* floating-point arithmetic.\n\
* Cure: Increase the PARAMETER \"FUDGE\",\n\
* recompile, and try again.\n\
*\n\
* Internal Parameters\n\
* ===================\n\
*\n\
* FUDGE REAL , default = 2\n\
* A \"fudge factor\" to widen the Gershgorin intervals. Ideally,\n\
* a value of 1 should work, but on machines with sloppy\n\
* arithmetic, this needs to be larger. The default for\n\
* publicly released versions should be large enough to handle\n\
* the worst machine around. Note that this has no effect\n\
* on accuracy of the solution.\n\
*\n\
* Based on contributions by\n\
* W. Kahan, University of California, Berkeley, USA\n\
* Beresford Parlett, University of California, Berkeley, USA\n\
* Jim Demmel, University of California, Berkeley, USA\n\
* Inderjit Dhillon, University of Texas, Austin, USA\n\
* Osni Marques, LBNL/NERSC, USA\n\
* Christof Voemel, University of California, Berkeley, USA\n\
*\n\n\
* =====================================================================\n\
*\n"
|