1 <?xml version="1.0" encoding="UTF-8"?>
3 <refentry xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:svg="http://www.w3.org/2000/svg" xmlns:ns5="http://www.w3.org/1999/xhtml" xmlns:mml="http://www.w3.org/1998/Math/MathML" xmlns:db="http://docbook.org/ns/docbook" xmlns:scilab="http://www.scilab.org" xml:id="znaupd" xml:lang="ja">
7 <refname>znaupd</refname>
11 暗黙のうちに再開されるArnoldi反復へのインターフェイスで,
13 エルミート準正定実行列Bにより定義される準内積に関する
15 複素線形演算子 OP の小数の固有値/ベクトルの組を近似的に計算します.
17 <emphasis role="bold">
19 この関数は廃止されました. <link linkend="eigs">eigs</link>を使用してください
29 <title>Calling Sequence</title>
31 <synopsis>[IDO, RESID, V, IPARAM, IPNTR, WORKD, WORKL, RWORK, INFO] = znaupd(ID0, BMAT, N, WHICH, NEV, TOL, RESID, NCV, V, IPARAM, IPNTR, WORKD, WORKL, RWORK, INFO)</synopsis>
37 <title>Arguments</title>
47 <para>Integer. (INPUT/OUTPUT) </para>
51 Reverse communication flag. IDO must be zero on the first call
53 to znaupd. IDO will be set internally to indicate the type of
55 operation to be performed. Control is then given back to the calling
57 routine which has the responsibility to carry out the requested
59 operation and call znaupd with the result.
65 The operand is given in WORKD(IPNTR(1)), the result must be
67 put in WORKD(IPNTR(2)).
77 IDO = 0: first call to the reverse communication interface
87 IDO = -1: compute Y = OP * X where IPNTR(1) is the pointer
89 into WORKD for X, IPNTR(2) is the pointer into WORKD for Y.
95 This is for the initialization phase to force the starting
97 vector into the range of OP.
107 IDO = 1: compute Y = OP * X where IPNTR(1) is the pointer
109 into WORKD for X, IPNTR(2) is the pointer into WORKD for Y.
115 In mode 3, the vector B * X is already available in
117 WORKD(ipntr(3)). It does not need to be recomputed in forming OP
129 IDO = 2: compute Y = M * X where IPNTR(1) is the pointer
131 into WORKD for X, IPNTR(2) is the pointer into WORKD for
143 IDO = 3: compute and return the shifts in the first NP
153 <para>IDO = 99: done </para>
161 After the initialization phase, when the routine is used in
163 the "shift-and-invert" mode, the vector M * X is already available
165 and does not need to be recomputed in forming OP*X.
179 <para>Character. (INPUT) </para>
183 specifies the type of the matrix B that defines the
185 semi-inner product for the operator OP.
193 <para>'I': standard eigenvalue problem A * x = lambda * x</para>
201 'G': generalized eigenvalue problem A * x =
221 <para>Integer. (INPUT) </para>
223 <para>Dimension of the eigenproblem.</para>
235 <para>string of length 2. (INPUT) </para>
243 'LM': want the NEV eigenvalues of largest
255 'SM': want the NEV eigenvalues of smallest
267 'LR': want the NEV eigenvalues of largest real
279 'SR': want the NEV eigenvalues of smallest real part.
289 'LI': want the NEV eigenvalues of largest imaginary
301 'SI': want the NEV eigenvalues of smallest imaginary
321 <para>Integer. (INPUT) </para>
325 Number of eigenvalues of OP to be computed. 0 < NEV <
341 <para>Double precision scalar. (INPUT) </para>
345 Stopping criteria: the relative accuracy of the Ritz value is
347 considered acceptable if BOUNDS(I) .LE. TOL * ABS(RITZ(I)) where
349 ABS(RITZ(I)) is the magnitude when RITZ(I) is complex. DEFAULT =
351 dlamch('EPS') (machine precision as computed by the LAPACK auxiliary
367 <para>Complex*16 array of length N. (INPUT/OUTPUT) </para>
371 On INPUT: If INFO .EQ. 0, a random initial residual vector is
373 used. If INFO .NE. 0, RESID contains the initial residual vector,
375 possibly from a previous run.
379 <para>On OUTPUT: RESID contains the final residual vector.</para>
391 <para>Integer. (INPUT) </para>
395 Number of columns of the matrix V. NCV must satisfy the two
397 inequalities 2 <= NCV - NEV and NCV <= N.
403 This will indicate how many Arnoldi vectors are generated at
405 each iteration. After the startup phase in which NEV Arnoldi vectors
407 are generated, the algorithm generates approximately NCV - NEV Arnoldi
409 vectors at each subsequent update iteration. Most of the cost in
411 generating each Arnoldi vector is in the matrix-vector operation
413 OP * x. (See remark 4 below.)
427 <para>Complex*16 array N by NCV. (OUTPUT) </para>
429 <para>Contains the final set of Arnoldi basis vectors.</para>
441 <para>Integer array of length 11. (INPUT/OUTPUT) </para>
449 IPARAM(1) = ISHIFT: method for selecting the implicit
451 shifts. The shifts selected at each iteration are used to filter
453 out the components of the unwanted eigenvector.
463 ISHIFT = 0: the shifts are to be provided by the user
465 via reverse communication. The NCV eigenvalues of the
467 Hessenberg matrix H are returned in the part of WORKL array
469 corresponding to RITZ.
479 ISHIFT = 1: exact shifts with respect to the current
481 Hessenberg matrix H. This is equivalent to restarting the
483 iteration from the beginning after updating the starting
485 vector with a linear combination of Ritz vectors associated
487 with the "wanted" eigenvalues.
497 ISHIFT = 2: other choice of internal shift to be
511 <para>IPARAM(2) = No longer referenced</para>
517 <para>IPARAM(3) = MXITER </para>
521 On INPUT: maximum number of Arnoldi update iterations
529 On OUTPUT: actual number of Arnoldi update iterations
541 IPARAM(4) = NB: blocksize to be used in the recurrence.
543 The code currently works only for NB = 1.
553 IPARAM(5) = NCONV: number of "converged" Ritz values. This
555 represents the number of Ritz values that satisfy the
557 convergence criterion.
567 IPARAM(6) = IUPD No longer referenced. Implicit restarting
579 IPARAM(7) = MODE On INPUT determines what type of
581 eigenproblem is being solved. Must be 1,2,3; See under
583 Description of znaupd for the four modes available.
593 IPARAM(8) = NP When ido = 3 and the user provides shifts
595 through reverse communication (IPARAM(1)=0), _naupd returns NP,
597 the number of shifts the user is to provide. 0 < NP <
607 <para>IPARAM(9) = NUMOP, </para>
609 <para>IPARAM(10) = NUMOPB, </para>
613 IPARAM(11) = NUMREO, OUTPUT: NUMOP = total number of OP*x
615 operations, NUMOPB = total number of B*x operations if BMAT='G',
617 NUMREO = total number of steps of re-orthogonalization.
635 <para>Integer array of length 14. (OUTPUT) </para>
639 Pointer to mark the starting locations in the WORKD and WORKL
641 arrays for matrices/vectors used by the Arnoldi iteration.
651 IPNTR(1): pointer to the current operand vector X in
663 IPNTR(2): pointer to the current result vector Y in
675 IPNTR(3): pointer to the vector B * X in WORKD when used
677 in the shift-and-invert mode.
687 IPNTR(4): pointer to the next available location in WORKL
689 that is untouched by the program.
699 IPNTR(5): pointer to the NCV by NCV upper Hessenberg
709 <para>IPNTR(6): pointer to the ritz value array RITZ </para>
717 IPNTR(7): pointer to the (projected) ritz vector array Q
727 IPNTR(8): pointer to the error BOUNDS array in WORKL.
737 IPNTR(14): pointer to the NP shifts in WORKL. See Remark 5
749 Note: IPNTR(9:13) is only referenced by zneupd. See Remark 2
761 IPNTR(9): pointer to the NCV RITZ values of the original
771 <para>IPNTR(10): Not Used </para>
779 IPNTR(11): pointer to the NCV corresponding error
791 IPNTR(12): pointer to the NCV by NCV upper triangular
803 IPNTR(13): pointer to the NCV by NCV matrix of
805 eigenvectors of the upper Hessenberg matrix H. Only referenced
807 by zneupd if RVEC = 1 See Remark 2 below.
827 Complex*16 work array of length 3 * N. (REVERSE COMMUNICATION)
833 Distributed array to be used in the basic Arnoldi iteration
835 for reverse communication.
841 The user should not use WORKD as temporary workspace during
843 the iteration !!!!!!!!!!
847 <para>See Data Distribution Note below.</para>
861 Complex*16 work array of length 3 * NCV ** 2 + 5 * NCV. (OUTPUT/WORKSPACE)
867 Private (replicated) array on each PE or array allocated on
869 the front end. See Data Distribution Note below.
885 Double precision work array of length NCV (WORKSPACE) Private
887 (replicated) array on each PE or array allocated on the front
903 <para>Integer. (INPUT/OUTPUT) </para>
907 If INFO == 0, a randomly initial residual vector is used.
913 If INFO ~= 0, RESID contains the initial residual vector,
915 possibly from a previous run.
919 <para>Error flag on output.</para>
925 <para>0: Normal exit.</para>
933 1: Maximum number of iterations taken. All possible
935 eigenvalues of OP has been found. IPARAM(5) returns the number
937 of wanted converged Ritz values.
947 2: No longer an informational error. Deprecated starting
949 with release 2 of ARPACK.
959 3: No shifts could be applied during a cycle of the
961 Implicitly restarted Arnoldi iteration. One possibility is to
963 increase the size of NCV relative to NEV. See remark 4
973 <para>-1: N must be positive.</para>
979 <para>-2: NEV must be positive.</para>
985 <para>-3: NCV-NEV >= 1 and less than or equal to N.</para>
993 -4: The maximum number of Arnoldi update iteration must be
1005 -5: WHICH must be one of 'LM', 'SM', 'LR', 'SR', 'LI',
1015 <para>-6: BMAT must be one of 'I' or 'G'.</para>
1021 <para>-7: Length of private work array is not sufficient.</para>
1029 -8: Error return from LAPACK eigenvalue
1039 <para>-9: Starting vector is zero.</para>
1045 <para>-10: IPARAM(7) must be 1, 2, 3.</para>
1051 <para>-11: IPARAM(7) = 1 and BMAT = 'G' are incompatible.</para>
1057 <para>-12: IPARAM(1) must be equal to 0 or 1.</para>
1065 -9999: Could not build an Arnoldi factorization. User
1067 input error highly likely. Please check actual array dimensions
1069 and layout. IPARAM(5) returns the size of the current Arnoldi
1089 <title>Description</title>
1093 Reverse communication interface for the Implicitly Restarted Arnoldi
1095 iteration. This is intended to be used to find a few eigenpairs of a
1097 complex linear operator OP with respect to a semi-inner product defined by
1099 a hermitian positive semi-definite real matrix B. B may be the identity
1107 NOTE: if both OP and B are real, then dsaupd or dnaupd should be
1115 The computed approximate eigenvalues are called Ritz values and the
1117 corresponding approximate eigenvectors are called Ritz vectors. znaupd is
1119 usually called iteratively to solve one of the following problems:
1127 <para>Mode 1: A * x = lambda * x. </para>
1129 <para>===> OP = A and B = I.</para>
1135 <para>Mode 2: A * x = lambda * M * x, M hermitian positive definite </para>
1137 <para>===> OP = inv[M] * A and B = M. </para>
1139 <para>===> (If M can be factored see remark 3 below) </para>
1145 <para>Mode 3: A * x = lambda * M * x, M hermitian semi-definite </para>
1147 <para>===> OP = inv[A - sigma * M] * M and B = M. </para>
1151 ===> shift-and-invert mode If OP * x = amu * x, then lambda =
1163 NOTE: The action of w <- inv[A - sigma * M] * v or w <- inv[M] * v
1165 should be accomplished either by a direct method using a sparse matrix
1167 factorization and solving
1171 <para>[A - sigma * M] * w = v or M * w = v, </para>
1175 or through an iterative method for solving these systems. If an
1177 iterative method is used, the convergence test must be more stringent than
1179 the accuracy requirements for the eigenvalue approximations.
1187 <title>Remarks</title>
1195 The computed Ritz values are approximate eigenvalues of OP. The
1197 selection of WHICH should be made with this in mind when using Mode =
1199 3. When operating in Mode = 3 setting WHICH = 'LM' will compute the
1201 NEV eigenvalues of the original problem that are closest to the shift
1203 SIGMA . After convergence, approximate eigenvalues of the original
1205 problem may be obtained with the ARPACK subroutine zneupd.
1215 If a basis for the invariant subspace corresponding to the
1217 converged Ritz values is needed, the user must call zneupd immediately
1219 following completion of znaupd. This is new starting with release 2 of
1231 If M can be factored into a Cholesky factorization M = LL` then
1233 Mode = 2 should not be selected. Instead one should use Mode = 1 with
1235 OP = inv(L) * A * inv(L`). Appropriate triangular linear systems should be
1237 solved with L and L` rather than computing inverses. After
1239 convergence, an approximate eigenvector z of the original problem is
1241 recovered by solving L`z = x where x is a Ritz vector of OP.
1251 At present there is no a-priori analysis to guide the selection
1253 of NCV relative to NEV. The only formal requirement is that NCV >
1255 NEV + 1. However, it is recommended that NCV .ge. 2 * NEV. If many
1257 problems of the same type are to be solved, one should experiment with
1259 increasing NCV while keeping NEV fixed for a given test problem. This
1261 will usually decrease the required number of OP*x operations but it
1263 also increases the work and storage required to maintain the
1265 orthogonal basis vectors. The optimal "cross-over" with respect to CPU
1267 time is problem dependent and must be determined empirically. See
1269 Chapter 8 of Reference 2 for further information.
1279 When IPARAM(1) = 0, and IDO = 3, the user needs to provide the
1281 NP = IPARAM(8) complex shifts in locations
1287 WORKL(IPNTR(14)), WORKL(IPNTR(14)+1), ... , WORKL(IPNTR(14)+NP).
1293 Eigenvalues of the current upper Hessenberg matrix are located
1295 in WORKL(IPNTR(6)) through WORKL(IPNTR(6)+NCV-1). They are ordered
1297 according to the order defined by WHICH. The associated Ritz estimates
1305 WORKL(IPNTR(8)), WORKL(IPNTR(8)+1), ... ,
1307 WORKL(IPNTR(8)+NCV-1).
1319 <title>Example</title>
1321 <programlisting role="example">
1324 // The following sets dimensions for this problem.
1335 iparam = zeros(11, 1);
1336 ipntr = zeros(14, 1);
1337 _select = zeros(ncv, 1);
1338 d = zeros(nev + 1, 1) + 0 * %i;
1339 z = zeros(nx, nev) + 0* %i;
1340 resid = zeros(nx, 1) + 0 * %i;
1341 v = zeros(nx, ncv) + 0 * %i;
1342 workd = zeros(3 * nx, 1) + 0 * %i;
1343 workev = zeros(2 * ncv, 1) + 0 * %i;
1344 rwork = zeros(ncv, 1);
1345 workl = zeros(3 * ncv * ncv + 5 *ncv, 1) + 0 * %i;
1347 // Build the complex test matrix
1348 A = diag(10 * ones(nx,1) + %i * ones(nx,1));
1349 A(1:$-1,2:$) = A(1:$-1,2:$) + diag(6 * ones(nx - 1,1));
1350 A(2:$,1:$-1) = A(2:$,1:$-1) + diag(-6 * ones(nx - 1,1));
1365 // M A I N L O O P (Reverse communication)
1367 // Repeatedly call the routine ZNAUPD and take actions indicated by parameter IDO until
1368 // either convergence is indicated or maxitr has been exceeded.
1370 [ido, resid, v, iparam, ipntr, workd, workl, rwork, info_znaupd] = znaupd(ido, bmat, nx, which, nev, tol, resid, ncv, v, iparam, ipntr, workd, workl, rwork, info_znaupd);
1373 printf('\nError with znaupd, info = %d\n', info_znaupd);
1374 printf('Check the documentation of znaupd\n\n');
1377 if(ido == -1 | ido == 1)
1378 // Perform matrix vector multiplication
1379 workd(ipntr(2):ipntr(2) + nx - 1) = A * workd(ipntr(1):ipntr(1) + nx - 1);
1383 // Post-Process using ZNEUPD.
1389 [d, z, resid, iparam, ipntr, workd, workl, rwork, info_zneupd] = zneupd(rvec, howmany, _select, d, z, sigma, workev, bmat, nx, which, nev, tol, resid, ncv, v, ...
1390 iparam, ipntr, workd, workl, rwork, info_zneupd);
1393 printf('\nError with zneupd, info = %d\n', info_zneupd);
1394 printf('Check the documentation of zneupd.\n\n');
1397 // Done with program znsimp.
1398 printf('\nZNSIMP\n');
1401 printf('Size of the matrix is %d\n', nx);
1402 printf('The number of Ritz values requested is %d\n', nev);
1403 printf('The number of Arnoldi vectors generated (NCV) is %d\n', ncv);
1404 printf('What portion of the spectrum: %s\n', which);
1405 printf('The number of Implicit Arnoldi update iterations taken is %d\n', iparam(3));
1406 printf('The number of OP*x is %d\n', iparam(9));
1407 printf('The convergence criterion is %d\n', tol);
1415 <refsection role="see also">
1417 <title>See Also</title>
1419 <simplelist type="inline">
1423 <link linkend="dnaupd">dnaupd</link>
1429 <link linkend="dnaupd">dneupd</link>
1435 <link linkend="dnaupd">zneupd</link>
1445 <title>Bibliography</title>
1449 1. D.C. Sorensen, "Implicit Application of Polynomial Filters in a
1451 k-Step Arnoldi Method", SIAM J. Matr. Anal. Apps., 13 (1992), pp
1459 2. R.B. Lehoucq, "Analysis and Implementation of an Implicitly
1461 Restarted Arnoldi Iteration", Rice University Technical Report TR95-13,
1463 Department of Computational and Applied Mathematics.
1469 3. B.N. Parlett and Y. Saad, "Complex Shift and Invert Strategies
1471 for Real Matrices", Linear Algebra and its Applications, vol 88/89, pp
1481 <title>Used Functions</title>
1483 <para>Based on ARPACK routine znaupd</para>
1495 <revnumber>5.4.0</revnumber>
1499 関数は廃止され,<link linkend="eigs">eigs</link>に代替されました.