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
|
---
:name: clar1v
:md5sum: 476c7fc59e63411f4a380b0ca17e4c25
:category: :subroutine
:arguments:
- n:
:type: integer
:intent: input
- b1:
:type: integer
:intent: input
- bn:
:type: integer
:intent: input
- lambda:
:type: real
:intent: input
- d:
:type: real
:intent: input
:dims:
- n
- l:
:type: real
:intent: input
:dims:
- n-1
- ld:
:type: real
:intent: input
:dims:
- n-1
- lld:
:type: real
:intent: input
:dims:
- n-1
- pivmin:
:type: real
:intent: input
- gaptol:
:type: real
:intent: input
- z:
:type: complex
:intent: input/output
:dims:
- n
- wantnc:
:type: logical
:intent: input
- negcnt:
:type: integer
:intent: output
- ztz:
:type: real
:intent: output
- mingma:
:type: real
:intent: output
- r:
:type: integer
:intent: input/output
- isuppz:
:type: integer
:intent: output
:dims:
- "2"
- nrminv:
:type: real
:intent: output
- resid:
:type: real
:intent: output
- rqcorr:
:type: real
:intent: output
- work:
:type: real
:intent: workspace
:dims:
- 4*n
:substitutions: {}
:fortran_help: " SUBROUTINE CLAR1V( N, B1, BN, LAMBDA, D, L, LD, LLD, PIVMIN, GAPTOL, Z, WANTNC, NEGCNT, ZTZ, MINGMA, R, ISUPPZ, NRMINV, RESID, RQCORR, WORK )\n\n\
* Purpose\n\
* =======\n\
*\n\
* CLAR1V computes the (scaled) r-th column of the inverse of\n\
* the sumbmatrix in rows B1 through BN of the tridiagonal matrix\n\
* L D L^T - sigma I. When sigma is close to an eigenvalue, the\n\
* computed vector is an accurate eigenvector. Usually, r corresponds\n\
* to the index where the eigenvector is largest in magnitude.\n\
* The following steps accomplish this computation :\n\
* (a) Stationary qd transform, L D L^T - sigma I = L(+) D(+) L(+)^T,\n\
* (b) Progressive qd transform, L D L^T - sigma I = U(-) D(-) U(-)^T,\n\
* (c) Computation of the diagonal elements of the inverse of\n\
* L D L^T - sigma I by combining the above transforms, and choosing\n\
* r as the index where the diagonal of the inverse is (one of the)\n\
* largest in magnitude.\n\
* (d) Computation of the (scaled) r-th column of the inverse using the\n\
* twisted factorization obtained by combining the top part of the\n\
* the stationary and the bottom part of the progressive transform.\n\
*\n\n\
* Arguments\n\
* =========\n\
*\n\
* N (input) INTEGER\n\
* The order of the matrix L D L^T.\n\
*\n\
* B1 (input) INTEGER\n\
* First index of the submatrix of L D L^T.\n\
*\n\
* BN (input) INTEGER\n\
* Last index of the submatrix of L D L^T.\n\
*\n\
* LAMBDA (input) REAL \n\
* The shift. In order to compute an accurate eigenvector,\n\
* LAMBDA should be a good approximation to an eigenvalue\n\
* of L D L^T.\n\
*\n\
* L (input) REAL array, dimension (N-1)\n\
* The (n-1) subdiagonal elements of the unit bidiagonal matrix\n\
* L, in elements 1 to N-1.\n\
*\n\
* D (input) REAL array, dimension (N)\n\
* The n diagonal elements of the diagonal matrix D.\n\
*\n\
* LD (input) REAL array, dimension (N-1)\n\
* The n-1 elements L(i)*D(i).\n\
*\n\
* LLD (input) REAL array, dimension (N-1)\n\
* The n-1 elements L(i)*L(i)*D(i).\n\
*\n\
* PIVMIN (input) REAL \n\
* The minimum pivot in the Sturm sequence.\n\
*\n\
* GAPTOL (input) REAL \n\
* Tolerance that indicates when eigenvector entries are negligible\n\
* w.r.t. their contribution to the residual.\n\
*\n\
* Z (input/output) COMPLEX array, dimension (N)\n\
* On input, all entries of Z must be set to 0.\n\
* On output, Z contains the (scaled) r-th column of the\n\
* inverse. The scaling is such that Z(R) equals 1.\n\
*\n\
* WANTNC (input) LOGICAL\n\
* Specifies whether NEGCNT has to be computed.\n\
*\n\
* NEGCNT (output) INTEGER\n\
* If WANTNC is .TRUE. then NEGCNT = the number of pivots < pivmin\n\
* in the matrix factorization L D L^T, and NEGCNT = -1 otherwise.\n\
*\n\
* ZTZ (output) REAL \n\
* The square of the 2-norm of Z.\n\
*\n\
* MINGMA (output) REAL \n\
* The reciprocal of the largest (in magnitude) diagonal\n\
* element of the inverse of L D L^T - sigma I.\n\
*\n\
* R (input/output) INTEGER\n\
* The twist index for the twisted factorization used to\n\
* compute Z.\n\
* On input, 0 <= R <= N. If R is input as 0, R is set to\n\
* the index where (L D L^T - sigma I)^{-1} is largest\n\
* in magnitude. If 1 <= R <= N, R is unchanged.\n\
* On output, R contains the twist index used to compute Z.\n\
* Ideally, R designates the position of the maximum entry in the\n\
* eigenvector.\n\
*\n\
* ISUPPZ (output) INTEGER array, dimension (2)\n\
* The support of the vector in Z, i.e., the vector Z is\n\
* nonzero only in elements ISUPPZ(1) through ISUPPZ( 2 ).\n\
*\n\
* NRMINV (output) REAL \n\
* NRMINV = 1/SQRT( ZTZ )\n\
*\n\
* RESID (output) REAL \n\
* The residual of the FP vector.\n\
* RESID = ABS( MINGMA )/SQRT( ZTZ )\n\
*\n\
* RQCORR (output) REAL \n\
* The Rayleigh Quotient correction to LAMBDA.\n\
* RQCORR = MINGMA*TMP\n\
*\n\
* WORK (workspace) REAL array, dimension (4*N)\n\
*\n\n\
* Further Details\n\
* ===============\n\
*\n\
* Based on contributions by\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"
|