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="zneupd" xml:lang="ja">
7 <refname>zneupd</refname>
11 暗黙のうちに再開されるArnoldi反復へのインターフェイスで,
13 A * z = lambda * B * z の固有値を収束的近似により計算します.
15 <emphasis role="bold">
17 この関数は廃止されました. <link linkend="eigs">eigs</link>を使用してください
27 <title>Calling Sequence</title>
31 [D, Z, RESID, IPARAM, IPNTR, WORKD, WORKL, RWORK, INFO] = zneupd(RVEC, HOWMANY, SELECT, D, Z, SIGMA, WORKev,
33 BMAT, N, WHICH, NEV, TOL, RESID, NCV, V, IPARAM, IPNTR, WORKD, WORKL, RWORK, INFO)
41 <title>Arguments</title>
51 <para>Integer. (INPUT) </para>
55 Specifies whether a basis for the invariant subspace
57 corresponding to the converged Ritz value approximations for the
59 eigenproblem A * z = lambda * B * z is computed.
67 <para>RVEC = 0 Compute Ritz values only.</para>
75 RVEC = 1 Compute Ritz vectors or Schur vectors. See
95 <para>Character. (INPUT) </para>
99 Specifies the form of the basis for the invariant subspace
101 corresponding to the converged Ritz values that is to be computed.
109 <para>'A': Compute NEV Ritz vectors;</para>
115 <para>'P': Compute NEV Schur vectors;</para>
123 'S': compute some of the Ritz vectors, specified by the
125 integer array SELECT.
143 <para>Integer array of dimension NCV. (INPUT) </para>
147 If HOWMANY = 'S', SELECT specifies the Ritz vectors to be
149 computed. To select the Ritz vector corresponding to a Ritz value
151 D(j), SELECT(j) must be set to 1.
157 If HOWMANY = 'A' or 'P', SELECT need not be initialized but it
159 is used as internal workspace.
173 <para>Complex*16 array of dimension NEV + 1. (OUTPUT) </para>
177 On exit, D contains the Ritz approximations to the eigenvalues
179 lambda for A * z = lambda * B * z.
193 <para>Complex*16 N by NEV array. (OUTPUT) </para>
195 <para>On exit, </para>
199 If RVEC = 1 and HOWMANY = 'A', then the columns of Z
201 represents approximate eigenvectors (Ritz vectors) corresponding to
203 the NCONV = IPARAM(5) Ritz values for eigensystem A * z = lambda * B * z.
209 If RVEC = 0 or HOWMANY = 'P', then Z is NOT REFERENCED.
215 NOTE: If if RVEC = 1 and a Schur basis is not required, the
217 array Z may be set equal to first NEV+1 columns of the Arnoldi basis
219 array V computed by ZNAUPD. In this case the Arnoldi basis will be
221 destroyed and overwritten with the eigenvector basis.
235 <para>Complex*16. (INPUT) </para>
237 <para>If IPARAM(7) = 3 then SIGMA represents the shift. </para>
239 <para>Not referenced if IPARAM(7) = 1 or 2.</para>
251 <para>Complex*16 work array of dimension 2 * NCV. (WORKSPACE)</para>
261 NOTE: The remaining arguments BMAT, N, WHICH, NEV, TOL, RESID, NCV,
263 V, IPARAM, IPNTR, WORKD, WORKL, LWORKL, RWORK, INFO must be passed
265 directly to ZNEUPD following the last call to ZNAUPD.
271 These arguments MUST NOT BE MODIFIED between the last call to
273 ZNAUPD and the call to ZNEUPD.
279 Three of these parameters (V, WORKL and INFO) are also output
293 <para>Complex*16 N by NCV array. (INPUT/OUTPUT) </para>
297 Upon INPUT: the NCV columns of V contain the Arnoldi basis
299 vectors for OP as constructed by ZNAUPD.
305 Upon OUTPUT: If RVEC = 1 the first NCONV = IPARAM(5) columns
307 contain approximate Schur vectors that span the desired invariant
315 NOTE: If the array Z has been set equal to first NEV+1 columns
317 of the array V and RVEC = 1 and HOWMANY = 'A', then the Arnoldi basis
319 held by V has been overwritten by the desired Ritz vectors. If a
321 separate array Z has been passed then the first NCONV=IPARAM(5)
323 columns of V will contain approximate Schur vectors that span the
325 desired invariant subspace.
341 Double precision work array of length LWORKL.
349 WORKL(1:ncv * ncv + 2 * ncv) contains information obtained in
351 znaupd. They are not changed by zneupd.
357 WORKL(ncv * ncv + 2 * ncv + 1:3 * ncv * ncv + 4 * ncv) holds the untransformed
359 Ritz values, the untransformed error estimates of the Ritz values,
361 the upper triangular matrix for H, and the associated matrix
363 representation of the invariant subspace for H.
369 Note: IPNTR(9:13) contains the pointer into WORKL for
371 addresses of the above information computed by zneupd.
381 IPNTR(9): pointer to the NCV RITZ values of the original
391 <para>IPNTR(10): Not used </para>
399 IPNTR(11): pointer to the NCV corresponding error
411 IPNTR(12): pointer to the NCV by NCV upper triangular
423 IPNTR(13): pointer to the NCV by NCV matrix of
425 eigenvectors of the upper Hessenberg matrix H. Only referenced
427 by zneupd if RVEC = 1 See Remark 2 below.
445 <para>Integer. (OUTPUT) </para>
447 <para>Error flag on output.</para>
453 <para>0: Normal exit.</para>
461 1: The Schur form computed by LAPACK routine csheqr could
463 not be reordered by LAPACK routine ztrsen. Re-enter subroutine
465 zneupd with IPARAM(5) = NCV and increase the size of the array D
467 to have dimension at least dimension NCV and allocate at least
475 NOTE: Not necessary if Z and V share the same space.
477 Please notify the authors if this error occurs.
485 <para>-1: N must be positive.</para>
491 <para>-2: NEV must be positive.</para>
497 <para>-3: NCV-NEV >= 1 and less than or equal to N.</para>
505 -5: WHICH must be one of 'LM', 'SM', 'LR', 'SR', 'LI',
515 <para>-6: BMAT must be one of 'I' or 'G'.</para>
523 -7: Length of private work WORKL array is not
535 -8: Error return from LAPACK eigenvalue calculation. This
537 should never happened.
547 -9: Error return from calculation of eigenvectors.
549 Informational error from LAPACK routine ztrevc.
557 <para>-10: IPARAM(7) must be 1, 2, 3.</para>
563 <para>-11: IPARAM(7) = 1 and BMAT = 'G' are incompatible.</para>
569 <para>-12: HOWMANY = 'S' not yet implemented.</para>
577 -13: HOWMANY must be one of 'A' or 'P' if RVEC = .true.
587 -14: ZNAUPD did not find any eigenvalues to sufficient
599 -15: ZNEUPD got a different count of the number of
601 converged Ritz values than ZNAUPD got. This indicates the user
603 probably made an error in passing data from ZNAUPD to ZNEUPD or
605 that the data was modified before entering ZNEUPD.
623 <title>Description</title>
627 This subroutine returns the converged approximations to eigenvalues
629 of A * z = lambda * B * z and (optionally):
637 <para>The corresponding approximate eigenvectors; </para>
645 An orthonormal basis for the associated approximate invariant
663 There is negligible additional cost to obtain eigenvectors. An
665 orthonormal basis is always computed.
671 There is an additional storage cost of n*nev if both are requested
673 (in this case a separate array Z must be supplied).
679 The approximate eigenvalues and eigenvectors of A * z = lambda * B * z are
681 derived from approximate eigenvalues and eigenvectors of of the linear
683 operator OP prescribed by the MODE selection in the call to ZNAUPD.
687 <para>ZNAUPD must be called before this routine is called. </para>
691 These approximate eigenvalues and vectors are commonly called Ritz
693 values and Ritz vectors respectively. They are referred to as such in the
695 comments that follow.
701 The computed orthonormal basis for the invariant subspace
703 corresponding to these Ritz values is referred to as a Schur basis.
709 The definition of OP as well as other terms and the relation of
711 computed Ritz values and vectors of OP with respect to the given problem
713 A*z = lambda*B*z may be found in the header of ZNAUPD. For a brief
715 description, see definitions of IPARAM(7), MODE and WHICH in the
717 documentation of ZNAUPD.
725 <title>Remarks</title>
731 <para>Currently only HOWMNY = 'A' and 'P' are implemented. </para>
739 Schur vectors are an orthogonal representation for the basis of
741 Ritz vectors. Thus, their numerical properties are often superior.
745 <para>If RVEC = 1 then the relationship </para>
747 <para>A * V(:,1:IPARAM(5)) = V(:,1:IPARAM(5)) * T, </para>
751 <para>transpose( V(:,1:IPARAM(5)) ) * V(:,1:IPARAM(5)) = I </para>
755 are approximately satisfied. Here T is the leading submatrix of
757 order IPARAM(5) of the upper triangular matrix stored
771 <title>Example</title>
773 <programlisting role="example">
776 // The following sets dimensions for this problem.
787 iparam = zeros(11, 1);
788 ipntr = zeros(14, 1);
789 _select = zeros(ncv, 1);
790 d = zeros(nev + 1, 1) + 0 * %i;
791 z = zeros(nx, nev) + 0* %i;
792 resid = zeros(nx, 1) + 0 * %i;
793 v = zeros(nx, ncv) + 0 * %i;
794 workd = zeros(3 * nx, 1) + 0 * %i;
795 workev = zeros(2 * ncv, 1) + 0 * %i;
796 rwork = zeros(ncv, 1);
797 workl = zeros(3 * ncv * ncv + 5 *ncv, 1) + 0 * %i;
799 // Build the complex test matrix
800 A = diag(10 * ones(nx,1) + %i * ones(nx,1));
801 A(1:$-1,2:$) = A(1:$-1,2:$) + diag(6 * ones(nx - 1,1));
802 A(2:$,1:$-1) = A(2:$,1:$-1) + diag(-6 * ones(nx - 1,1));
817 // M A I N L O O P (Reverse communication)
819 // Repeatedly call the routine ZNAUPD and take actions indicated by parameter IDO until
820 // either convergence is indicated or maxitr has been exceeded.
822 [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);
825 printf('\nError with znaupd, info = %d\n', info_znaupd);
826 printf('Check the documentation of znaupd\n\n');
829 if(ido == -1 | ido == 1)
830 // Perform matrix vector multiplication
831 workd(ipntr(2):ipntr(2) + nx - 1) = A * workd(ipntr(1):ipntr(1) + nx - 1);
835 // Post-Process using ZNEUPD.
841 [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, ...
842 iparam, ipntr, workd, workl, rwork, info_zneupd);
845 printf('\nError with zneupd, info = %d\n', info_zneupd);
846 printf('Check the documentation of zneupd.\n\n');
849 // Done with program znsimp.
850 printf('\nZNSIMP\n');
853 printf('Size of the matrix is %d\n', nx);
854 printf('The number of Ritz values requested is %d\n', nev);
855 printf('The number of Arnoldi vectors generated (NCV) is %d\n', ncv);
856 printf('What portion of the spectrum: %s\n', which);
857 printf('The number of Implicit Arnoldi update iterations taken is %d\n', iparam(3));
858 printf('The number of OP*x is %d\n', iparam(9));
859 printf('The convergence criterion is %d\n', tol);
867 <refsection role="see also">
869 <title>See Also</title>
871 <simplelist type="inline">
875 <link linkend="dnaupd">znaupd</link>
881 <link linkend="dnaupd">dnaupd</link>
887 <link linkend="dnaupd">dneupd</link>
897 <title>Bibliography</title>
901 1. D.C. Sorensen, "Implicit Application of Polynomial Filters in a
903 k-Step Arnoldi Method", SIAM J. Matr. Anal. Apps., 13 (1992), pp
911 2. R.B. Lehoucq, "Analysis and Implementation of an Implicitly
913 Restarted Arnoldi Iteration", Rice University Technical Report TR95-13,
915 Department of Computational and Applied Mathematics.
921 3. B.N. Parlett and Y. Saad, "Complex Shift and Invert Strategies
923 for Real Matrices", Linear Algebra and its Applications, vol 88/89, pp
933 <title>Used Functions</title>
935 <para>Based on ARPACK routine zneupd</para>
947 <revnumber>5.4.0</revnumber>
951 関数は廃止され,<link linkend="eigs">eigs</link>に代替されました.