added japanese translation of arnoldi module.
[scilab.git] / scilab / modules / arnoldi / help / ja_JP / dneupd.xml
1 <?xml version="1.0" encoding="UTF-8"?>
2
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="dneupd" xml:lang="ja">
4     
5     <refnamediv>
6         
7         <refname>dneupd</refname>
8         
9         <refpurpose>
10             
11             暗黙のうちに再開されるArnoldi反復へのインターフェイスで,
12             
13             実線形演算子の小数の固有値/ベクトルの組を近似する
14             
15             A * z = lambda * B * z の固有値を収束的近似により計算します.
16             
17             <emphasis role="bold">
18                 
19                 この関数は廃止されました. <link linkend="eigs">eigs</link>を使用してください
20                 
21             </emphasis>
22             
23         </refpurpose>
24         
25     </refnamediv>
26     
27     <refsynopsisdiv>
28         
29         <title>Calling Sequence</title>
30         
31         <synopsis>
32             
33             [Dr, Di, Z, RESID, V, IPARAM, IPNTR, WORKD, WORKL, INFO] = dneupd(RVEC, HOWMANY, SELECT, Dr, Di, Z, SIGMAr, SIGMAi, WORKev,
34             
35             BMAT, N, WHICH, NEV, TOL, RESID, NCV, V, IPARAM, IPNTR, WORKD, WORKL, INFO)
36             
37         </synopsis>
38         
39     </refsynopsisdiv>
40     
41     <refsection>
42         
43         <title>Arguments</title>
44         
45         <variablelist>
46             
47             <varlistentry>
48                 
49                 <term>RVEC</term>
50                 
51                 <listitem>
52                     
53                     <para>Integer. (INPUT)</para>
54                     
55                     <para>
56                         
57                         Specifies whether a basis for the invariant subspace
58                         
59                         corresponding to the converged Ritz value approximations for the
60                         
61                         eigenproblem A * z = lambda * B * z is computed.
62                         
63                     </para>
64                     
65                     <itemizedlist>
66                         
67                         <listitem>
68                             
69                             <para>RVEC = 0 Compute Ritz values only.</para>
70                             
71                         </listitem>
72                         
73                         <listitem>
74                             
75                             <para>RVEC = 1 Compute the Ritz vectors or Schur vectors.</para>
76                             
77                         </listitem>
78                         
79                     </itemizedlist>
80                     
81                     <para>See Remarks below.</para>
82                     
83                 </listitem>
84                 
85             </varlistentry>
86             
87             <varlistentry>
88                 
89                 <term>HOWMANY</term>
90                 
91                 <listitem>
92                     
93                     <para>Character. (INPUT) </para>
94                     
95                     <para>
96                         
97                         Specifies the form of the basis for the invariant subspace
98                         
99                         corresponding to the converged Ritz values that is to be
100                         
101                         computed.
102                         
103                     </para>
104                     
105                     <itemizedlist>
106                         
107                         <listitem>
108                             
109                             <para>'A': Compute NEV Ritz vectors;</para>
110                             
111                         </listitem>
112                         
113                         <listitem>
114                             
115                             <para>'P': Compute NEV Schur vectors;</para>
116                             
117                         </listitem>
118                         
119                         <listitem>
120                             
121                             <para>
122                                 
123                                 'S': compute some of the Ritz vectors, specified by the
124                                 
125                                 integer array SELECT.
126                                 
127                             </para>
128                             
129                         </listitem>
130                         
131                     </itemizedlist>
132                     
133                 </listitem>
134                 
135             </varlistentry>
136             
137             <varlistentry>
138                 
139                 <term>SELECT</term>
140                 
141                 <listitem>
142                     
143                     <para>Integer array of dimension NCV. (INPUT) </para>
144                     
145                     <para>
146                         
147                         If HOWMANY = 'S', SELECT specifies the Ritz vectors to be
148                         
149                         computed. To select the Ritz vector corresponding to a Ritz value
150                         
151                         (DR(j), DI(j)), SELECT(j) must be set to 1.
152                         
153                     </para>
154                     
155                     <para>
156                         
157                         If HOWMANY = 'A' or 'P', SELECT is used as internal
158                         
159                         workspace.
160                         
161                     </para>
162                     
163                 </listitem>
164                 
165             </varlistentry>
166             
167             <varlistentry>
168                 
169                 <term>DR</term>
170                 
171                 <listitem>
172                     
173                     <para>Double precision array of dimension NEV + 1. (OUTPUT)</para>
174                     
175                     <para>
176                         
177                         If IPARAM(7) = 1, 2 or 3 and SIGMAI = 0.0 then on exit: DR
178                         
179                         contains the real part of the Ritz approximations to the eigenvalues
180                         
181                         of A * z = lambda * B * z.
182                         
183                     </para>
184                     
185                     <para>
186                         
187                         If IPARAM(7) = 3, 4 and SIGMAI is not equal to zero, then on
188                         
189                         exit: DR contains the real part of the Ritz values of OP computed by
190                         
191                         DNAUPD.
192                         
193                     </para>
194                     
195                     <para>
196                         
197                         A further computation must be performed by the user to
198                         
199                         transform the Ritz values computed for OP by DNAUPD to those of the
200                         
201                         original system A * z = lambda * B * z. See remark 3 below.
202                         
203                     </para>
204                     
205                 </listitem>
206                 
207             </varlistentry>
208             
209             <varlistentry>
210                 
211                 <term>DI</term>
212                 
213                 <listitem>
214                     
215                     <para>Double precision array of dimension NEV + 1. (OUTPUT) </para>
216                     
217                     <para>
218                         
219                         On exit, DI contains the imaginary part of the Ritz value
220                         
221                         approximations to the eigenvalues of A * z = lambda * B * z associated
222                         
223                         with DR.
224                         
225                     </para>
226                     
227                     <para>
228                         
229                         NOTE: When Ritz values are complex, they will come in complex
230                         
231                         conjugate pairs. If eigenvectors are requested, the corresponding
232                         
233                         Ritz vectors will also come in conjugate pairs and the real and
234                         
235                         imaginary parts of these are represented in two consecutive columns
236                         
237                         of the array Z (see below).
238                         
239                     </para>
240                     
241                 </listitem>
242                 
243             </varlistentry>
244             
245             <varlistentry>
246                 
247                 <term>Z</term>
248                 
249                 <listitem>
250                     
251                     <para>Double precision N by NEV + 1 array </para>
252                     
253                     <para>if RVEC = 1 and HOWMANY = 'A'. (OUTPUT) </para>
254                     
255                     <para>
256                         
257                         On exit, if RVEC = 1 and HOWMANY = 'A', then the columns of Z
258                         
259                         represent approximate eigenvectors (Ritz vectors) corresponding to
260                         
261                         the NCONV = IPARAM(5) Ritz values for eigensystem A * z = lambda * B * z.
262                         
263                         The complex Ritz vector associated with the Ritz value with positive
264                         
265                         imaginary part is stored in two consecutive columns. The first
266                         
267                         column holds the real part of the Ritz vector and the second column
268                         
269                         holds the imaginary part. The Ritz vector associated with the Ritz
270                         
271                         value with negative imaginary part is simply the complex conjugate
272                         
273                         of the Ritz vector associated with the positive imaginary part.
274                         
275                     </para>
276                     
277                     <para>
278                         
279                         If RVEC = 0 or HOWMANY = 'P', then Z is not referenced.
280                         
281                     </para>
282                     
283                     <para>
284                         
285                         NOTE: If if RVEC = 1 and a Schur basis is not required, the
286                         
287                         array Z may be set equal to first NEV+1 columns of the Arnoldi basis
288                         
289                         array V computed by DNAUPD . In this case the Arnoldi basis will be
290                         
291                         destroyed and overwritten with the eigenvector basis.
292                         
293                     </para>
294                     
295                 </listitem>
296                 
297             </varlistentry>
298             
299             <varlistentry>
300                 
301                 <term>SIGMAR</term>
302                 
303                 <listitem>
304                     
305                     <para>Double precision (INPUT) </para>
306                     
307                     <para>
308                         
309                         If IPARAM(7) = 3 or 4, represents the real part of the
310                         
311                         shift.
312                         
313                     </para>
314                     
315                     <para>Not referenced if IPARAM(7) = 1 or 2.</para>
316                     
317                 </listitem>
318                 
319             </varlistentry>
320             
321             <varlistentry>
322                 
323                 <term>SIGMAI</term>
324                 
325                 <listitem>
326                     
327                     <para>Double precision (INPUT) </para>
328                     
329                     <para>
330                         
331                         If IPARAM(7) = 3 or 4, represents the imaginary part of the
332                         
333                         shift.
334                         
335                     </para>
336                     
337                     <para>
338                         
339                         Not referenced if IPARAM(7) = 1 or 2. See remark 3
340                         
341                         below.
342                         
343                     </para>
344                     
345                 </listitem>
346                 
347             </varlistentry>
348             
349             <varlistentry>
350                 
351                 <term>WORKEV</term>
352                 
353                 <listitem>
354                     
355                     <para>
356                         
357                         Double precision work array of dimension 3 * NCV.
358                         
359                         (WORKSPACE)
360                         
361                     </para>
362                     
363                 </listitem>
364                 
365             </varlistentry>
366             
367         </variablelist>
368         
369         <para>
370             
371             NOTE: The remaining arguments BMAT, N, WHICH, NEV, TOL, RESID, NCV,
372             
373             V, IPARAM, IPNTR, WORKD, WORKL, LWORKL, INFO must be passed directly to
374             
375             DNEUPD following the last call to DNAUPD .
376             
377         </para>
378         
379         <para>
380             
381             These arguments MUST NOT BE MODIFIED between the last call to
382             
383             DNAUPD and the call to DNEUPD .
384             
385         </para>
386         
387         <para>
388             
389             Three of these parameters (V, WORKL, INFO) are also output
390             
391             parameters.
392             
393         </para>
394         
395         <variablelist>
396             
397             <varlistentry>
398                 
399                 <term>V</term>
400                 
401                 <listitem>
402                     
403                     <para>Double precision N by NCV array. (INPUT/OUTPUT) </para>
404                     
405                     <para>
406                         
407                         Upon INPUT: the NCV columns of V contain the Arnoldi basis
408                         
409                         vectors for OP as constructed by DNAUPD.
410                         
411                     </para>
412                     
413                     <para>
414                         
415                         Upon OUTPUT: If RVEC = 1 the first NCONV = IPARAM(5) columns
416                         
417                         contain approximate Schur vectors that span the desired invariant
418                         
419                         subspace. See Remark 2 below.
420                         
421                     </para>
422                     
423                     <para>
424                         
425                         NOTE: If the array Z has been set equal to first NEV+1 columns
426                         
427                         of the array V and RVEC = 1 and HOWMANY= 'A', then the Arnoldi basis
428                         
429                         held by V has been overwritten by the desired Ritz vectors. If a
430                         
431                         separate array Z has been passed then the first NCONV = IPARAM(5)
432                         
433                         columns of V will contain approximate Schur vectors that span the
434                         
435                         desired invariant subspace.
436                         
437                     </para>
438                     
439                 </listitem>
440                 
441             </varlistentry>
442             
443             <varlistentry>
444                 
445                 <term>WORKL</term>
446                 
447                 <listitem>
448                     
449                     <para>
450                         
451                         Double precision work array of length LWORKL.
452                         
453                         (OUTPUT/WORKSPACE)
454                         
455                     </para>
456                     
457                     <para>
458                         
459                         WORKL(1:ncv*ncv+3*ncv) contains information obtained in dnaupd
460                         
461                         . They are not changed by dneupd .
462                         
463                     </para>
464                     
465                     <para>
466                         
467                         WORKL(ncv*ncv+3*ncv+1:3*ncv*ncv+6*ncv) holds the real and
468                         
469                         imaginary part of the untransformed Ritz values, the upper
470                         
471                         quasi-triangular matrix for H, and the associated matrix
472                         
473                         representation of the invariant subspace for H.
474                         
475                     </para>
476                     
477                     <para>
478                         
479                         Note: IPNTR(9:13) contains the pointer into WORKL for
480                         
481                         addresses of the above information computed by dneupd .
482                         
483                     </para>
484                     
485                     <itemizedlist>
486                         
487                         <listitem>
488                             
489                             <para>
490                                 
491                                 IPNTR(9): pointer to the real part of the NCV RITZ values
492                                 
493                                 of the original system.
494                                 
495                             </para>
496                             
497                         </listitem>
498                         
499                         <listitem>
500                             
501                             <para>
502                                 
503                                 IPNTR(10): pointer to the imaginary part of the NCV RITZ
504                                 
505                                 values of the original system.
506                                 
507                             </para>
508                             
509                         </listitem>
510                         
511                         <listitem>
512                             
513                             <para>
514                                 
515                                 IPNTR(11): pointer to the NCV corresponding error
516                                 
517                                 bounds.
518                                 
519                             </para>
520                             
521                         </listitem>
522                         
523                         <listitem>
524                             
525                             <para>
526                                 
527                                 IPNTR(12): pointer to the NCV by NCV upper
528                                 
529                                 quasi-triangular Schur matrix for H.
530                                 
531                             </para>
532                             
533                         </listitem>
534                         
535                         <listitem>
536                             
537                             <para>
538                                 
539                                 IPNTR(13): pointer to the NCV by NCV matrix of
540                                 
541                                 eigenvectors of the upper Hessenberg matrix H. Only referenced
542                                 
543                                 by dneupd if RVEC = 1 See Remark 2 below.
544                                 
545                             </para>
546                             
547                         </listitem>
548                         
549                     </itemizedlist>
550                     
551                 </listitem>
552                 
553             </varlistentry>
554             
555             <varlistentry>
556                 
557                 <term>INFO</term>
558                 
559                 <listitem>
560                     
561                     <para>Integer. (OUTPUT).</para>
562                     
563                     <para>Error flag on output.</para>
564                     
565                     <itemizedlist>
566                         
567                         <listitem>
568                             
569                             <para>0: Normal exit.</para>
570                             
571                         </listitem>
572                         
573                         <listitem>
574                             
575                             <para>
576                                 
577                                 1: The Schur form computed by LAPACK routine dlahqr could
578                                 
579                                 not be reordered by LAPACK routine dtrsen . Re-enter subroutine
580                                 
581                                 dneupd with IPARAM(5)=NCV and increase the size of the arrays DR
582                                 
583                                 and DI to have dimension at least dimension NCV and allocate at
584                                 
585                                 least NCV columns for Z.
586                                 
587                             </para>
588                             
589                             <para>
590                                 
591                                 NOTE: Not necessary if Z and V share the same space.
592                                 
593                                 Please notify the authors if this error occurs.
594                                 
595                             </para>
596                             
597                         </listitem>
598                         
599                         <listitem>
600                             
601                             <para>-1: N must be positive.</para>
602                             
603                         </listitem>
604                         
605                         <listitem>
606                             
607                             <para>-2: NEV must be positive.</para>
608                             
609                         </listitem>
610                         
611                         <listitem>
612                             
613                             <para>-3: NCV-NEV &gt;= 2 and less than or equal to N.</para>
614                             
615                         </listitem>
616                         
617                         <listitem>
618                             
619                             <para>
620                                 
621                                 -5: WHICH must be one of 'LM', 'SM', 'LR', 'SR', 'LI',
622                                 
623                                 'SI'.
624                                 
625                             </para>
626                             
627                         </listitem>
628                         
629                         <listitem>
630                             
631                             <para>-6: BMAT must be one of 'I' or 'G'.</para>
632                             
633                         </listitem>
634                         
635                         <listitem>
636                             
637                             <para>
638                                 
639                                 -7: Length of private work WORKL array is not
640                                 
641                                 sufficient.
642                                 
643                             </para>
644                             
645                         </listitem>
646                         
647                         <listitem>
648                             
649                             <para>
650                                 
651                                 -8: Error return from calculation of a real Schur form.
652                                 
653                                 Informational error from LAPACK routine dlahqr.
654                                 
655                             </para>
656                             
657                         </listitem>
658                         
659                         <listitem>
660                             
661                             <para>
662                                 
663                                 -9: Error return from calculation of eigenvectors.
664                                 
665                                 Informational error from LAPACK routine dtrevc.
666                                 
667                             </para>
668                             
669                         </listitem>
670                         
671                         <listitem>
672                             
673                             <para>-10: IPARAM(7) must be 1, 2, 3, 4.</para>
674                             
675                         </listitem>
676                         
677                         <listitem>
678                             
679                             <para>-11: IPARAM(7) = 1 and BMAT = 'G' are incompatible.</para>
680                             
681                         </listitem>
682                         
683                         <listitem>
684                             
685                             <para>-12: HOWMANY = 'S' not yet implemented. </para>
686                             
687                         </listitem>
688                         
689                         <listitem>
690                             
691                             <para>-13: HOWMANY must be one of 'A' or 'P' if RVEC = 1.</para>
692                             
693                         </listitem>
694                         
695                         <listitem>
696                             
697                             <para>
698                                 
699                                 -14: DNAUPD did not find any eigenvalues to sufficient
700                                 
701                                 accuracy.
702                                 
703                             </para>
704                             
705                         </listitem>
706                         
707                         <listitem>
708                             
709                             <para>
710                                 
711                                 -15: DNEUPD got a different count of the number of
712                                 
713                                 converged Ritz values than DNAUPD got. This indicates the user
714                                 
715                                 probably made an error in passing data from DNAUPD to DNEUPD or
716                                 
717                                 that the data was modified before entering DNEUPD.
718                                 
719                             </para>
720                             
721                         </listitem>
722                         
723                     </itemizedlist>
724                     
725                 </listitem>
726                 
727             </varlistentry>
728             
729         </variablelist>
730         
731     </refsection>
732     
733     <refsection>
734         
735         <title>Description</title>
736         
737         <para>
738             
739             This subroutine returns the converged approximations to eigenvalues
740             
741             of A * z = lambda * B * z and (optionally):
742             
743         </para>
744         
745         <orderedlist>
746             
747             <listitem>
748                 
749                 <para>The corresponding approximate eigenvectors;</para>
750                 
751             </listitem>
752             
753             <listitem>
754                 
755                 <para>
756                     
757                     An orthonormal basis for the associated approximate invariant
758                     
759                     subspace;
760                     
761                 </para>
762                 
763             </listitem>
764             
765             <listitem>
766                 
767                 <para>Both.</para>
768                 
769             </listitem>
770             
771         </orderedlist>
772         
773         <para>
774             
775             There is negligible additional cost to obtain eigenvectors. An
776             
777             orthonormal basis is always computed.
778             
779         </para>
780         
781         <para>
782             
783             There is an additional storage cost of n*nev if both are requested
784             
785             (in this case a separate array Z must be supplied).
786             
787         </para>
788         
789         <para>
790             
791             The approximate eigenvalues and eigenvectors of A * z = lambda * B * z are
792             
793             derived from approximate eigenvalues and eigenvectors of of the linear
794             
795             operator OP prescribed by the MODE selection in the call to DNAUPD. DNAUPD
796             
797             must be called before this routine is called.
798             
799         </para>
800         
801         <para>
802             
803             These approximate eigenvalues and vectors are commonly called Ritz
804             
805             values and Ritz vectors respectively. They are referred to as such in the
806             
807             comments that follow.
808             
809         </para>
810         
811         <para>
812             
813             The computed orthonormal basis for the invariant subspace
814             
815             corresponding to these Ritz values is referred to as a Schur basis.
816             
817         </para>
818         
819         <para>
820             
821             See documentation in the header of the subroutine DNAUPD for
822             
823             definition of OP as well as other terms and the relation of computed Ritz
824             
825             values and Ritz vectors of OP with respect to the given problem A * z =
826             
827             lambda * B * z.
828             
829         </para>
830         
831         <para>
832             
833             For a brief description, see definitions of IPARAM(7), MODE and
834             
835             WHICH in the documentation of DNAUPD .
836             
837         </para>
838         
839     </refsection>
840     
841     <refsection>
842         
843         <title>Remarks</title>
844         
845         <orderedlist>
846             
847             <listitem>
848                 
849                 <para>Currently only HOWMNY = 'A' and 'P' are implemented. </para>
850                 
851                 <para>Let trans(X) denote the transpose of X. </para>
852                 
853             </listitem>
854             
855             <listitem>
856                 
857                 <para>
858                     
859                     Schur vectors are an orthogonal representation for the basis of
860                     
861                     Ritz vectors. Thus, their numerical properties are often superior. If
862                     
863                     RVEC = 1 then the relationship
864                     
865                 </para>
866                 
867                 <para>
868                     
869                     A * V(:,1:IPARAM(5)) = V(:,1:IPARAM(5)) * T, and
870                     
871                     trans(V(:,1:IPARAM(5))) * V(:,1:IPARAM(5)) = I
872                     
873                 </para>
874                 
875                 <para>are approximately satisfied. </para>
876                 
877                 <para>
878                     
879                     Here T is the leading submatrix of order IPARAM(5) of the real
880                     
881                     upper quasi-triangular matrix stored workl(ipntr(12)). That is, T is
882                     
883                     block upper triangular with 1-by-1 and 2-by-2 diagonal blocks; each
884                     
885                     2-by-2 diagonal block has its diagonal elements equal and its
886                     
887                     off-diagonal elements of opposite sign. Corresponding to each 2-by-2
888                     
889                     diagonal block is a complex conjugate pair of Ritz values. The real
890                     
891                     Ritz values are stored on the diagonal of T.
892                     
893                 </para>
894                 
895             </listitem>
896             
897             <listitem>
898                 
899                 <para>
900                     
901                     If IPARAM(7) = 3 or 4 and SIGMAI is not equal zero, then the
902                     
903                     user must form the IPARAM(5) Rayleigh quotients in order to transform
904                     
905                     the Ritz values computed by DNAUPD for OP to those of A * z =
906                     
907                     lambda * B * z. Set RVEC = 1 and HOWMNY = 'A', and compute
908                     
909                 </para>
910                 
911                 <para>trans(Z(:,I)) * A * Z(:,I) if DI(I) = 0. </para>
912                 
913                 <para>
914                     
915                     If DI(I) is not equal to zero and DI(I+1) = - D(I), then the
916                     
917                     desired real and imaginary parts of the Ritz value are
918                     
919                 </para>
920                 
921                 <para>
922                     
923                     trans(Z(:,I)) * A * Z(:,I) + trans(Z(:,I+1)) * A * Z(:,I+1),
924                     
925                 </para>
926                 
927                 <para>
928                     
929                     trans(Z(:,I)) * A * Z(:,I+1) - trans(Z(:,I+1)) * A * Z(:,I),
930                     
931                 </para>
932                 
933                 <para>respectively. </para>
934                 
935                 <para>
936                     
937                     Another possibility is to set RVEC = 1 and HOWMANY = 'P' and
938                     
939                     compute
940                     
941                 </para>
942                 
943                 <para>trans(V(:,1:IPARAM(5))) * A * V(:,1:IPARAM(5)) </para>
944                 
945                 <para>
946                     
947                     and then an upper quasi-triangular matrix of order IPARAM(5) is
948                     
949                     computed. See remark 2 above.
950                     
951                 </para>
952                 
953             </listitem>
954             
955         </orderedlist>
956         
957     </refsection>
958     
959     <refsection>
960         
961         <title>Example</title>
962         
963         <programlisting role="example">
964             
965             <![CDATA[ 
966
967 // The following sets dimensions for this problem.
968
969 nx    = 10;
970
971 nev   = 3;
972 ncv   = 6;
973 bmat  = 'I';
974 which = 'LM';
975
976 // Local Arrays
977
978 iparam  = zeros(11, 1);
979 ipntr   = zeros(14, 1);
980 _select = zeros(ncv, 1);
981 dr       = zeros(nev + 1, 1);
982 di      = zeros(nev + 1, 1);
983 z       = zeros(nx, nev + 1);
984 resid   = zeros(nx, 1); 
985 v       = zeros(nx, ncv);
986 workd   = zeros(3 * nx, 1); 
987 workev  = zeros(3 * ncv, 1);
988 workl   = zeros(3 * ncv * ncv + 6 * ncv, 1);
989
990 // Build the test matrix
991
992 A            = diag(10 * ones(nx, 1));
993 A(1:$-1,2:$) = A(1:$-1,2:$) + diag(6 * ones(nx-1,1));
994 A(2:$,1:$-1) = A(2:$,1:$-1) + diag(-6 * ones(nx-1,1));
995
996 tol    = 0;
997 ido    = 0;
998
999 ishfts = 1;
1000 maxitr = 300;
1001 mode1  = 1;
1002
1003 iparam(1) = ishfts;
1004 iparam(3) = maxitr;
1005 iparam(7) = mode1;
1006
1007 sigmar = 0; // the real part of the shift
1008 sigmai = 0; // the imaginary part of the shift
1009 info_dnaupd = 0;
1010
1011 // M A I N   L O O P (Reverse communication)
1012
1013 while(ido <> 99)
1014   // Repeatedly call the routine DNAUPD and take actions indicated by parameter IDO until
1015   // either convergence is indicated or maxitr has been exceeded.
1016
1017   [ido, resid, v, iparam, ipntr, workd, workl, info_dnaupd] = dnaupd(ido, bmat, nx, which, nev, tol, resid, ncv, v, iparam, ipntr, workd, workl, info_dnaupd);
1018   
1019   if(info_dnaupd < 0)
1020     printf('\nError with dnaupd, info = %d\n',info_dnaupd);
1021     printf('Check the documentation of dnaupd\n\n');
1022   end
1023   
1024   if(ido == -1 | ido == 1)
1025     // Perform matrix vector multiplication 
1026     workd(ipntr(2):ipntr(2) + nx -1) = A * workd(ipntr(1):ipntr(1) + nx - 1);
1027   end
1028 end
1029
1030 // Post-Process using DNEUPD.
1031 rvec    = 1;
1032 howmany = 'A';
1033 info_dneupd = 0;
1034
1035 [dr, di, z, resid, v, iparam, ipntr, workd, workl, info_dneupd] = dneupd(rvec, howmany, _select, dr, di, z, sigmar, sigmai, workev, ...
1036                                                                        bmat, nx, which, nev, tol, resid, ncv, v, ...
1037                                                                        iparam, ipntr, workd, workl, info_dneupd);
1038                                                                        
1039 if(info_dneupd < 0)
1040   printf('\nError with dneupd, info = %d\n', info_dneupd);
1041   printf('Check the documentation of dneupd.\n\n');
1042 end
1043
1044 printf('\nDNSIMP\n');
1045 printf('======\n');
1046 printf('\n');
1047 printf('Size of the matrix is %d\n', nx);
1048 printf('The number of Ritz values requested is %d\n', nev);
1049 printf('The number of Arnoldi vectors generated (NCV) is %d\n', ncv);
1050 printf('What portion of the spectrum: %s\n', which);
1051 printf('The number of Implicit Arnoldi update iterations taken is %d\n', iparam(3));
1052 printf('The number of OP*x is %d\n', iparam(9));
1053 printf('The convergence criterion is %d\n', tol);
1054  
1055 ]]>
1056             
1057         </programlisting>
1058         
1059     </refsection>
1060     
1061     <refsection role="see also">
1062         
1063         <title>See Also</title>
1064         
1065         <simplelist type="inline">
1066             
1067             <member>
1068                 
1069                 <link linkend="dsaupd">dsaupd</link>
1070                 
1071             </member>
1072             
1073             <member>
1074                 
1075                 <link linkend="dnaupd">dnaupd</link>
1076                 
1077             </member>
1078             
1079         </simplelist>
1080         
1081     </refsection>
1082     
1083     <refsection>
1084         
1085         <title>Bibliography</title>
1086         
1087         <para>
1088             
1089             1. D.C. Sorensen, "Implicit Application of Polynomial Filters in a
1090             
1091             k-Step Arnoldi Method", SIAM J. Matr. Anal. Apps., 13 (1992), pp
1092             
1093             357-385.
1094             
1095         </para>
1096         
1097         <para>
1098             
1099             2. R.B. Lehoucq, "Analysis and Implementation of an Implicitly
1100             
1101             Restarted Arnoldi Iteration", Rice University Technical Report TR95-13,
1102             
1103             Department of Computational and Applied Mathematics.
1104             
1105         </para>
1106         
1107         <para>
1108             
1109             3. B.N. Parlett, "The Symmetric Eigenvalue Problem". Prentice-Hall,
1110             
1111             1980.
1112             
1113         </para>
1114         
1115         <para>
1116             
1117             4. B.N. Parlett, B. Nour-Omid, "Towards a Black Box Lanczos
1118             
1119             Program", Computer Physics Communications, 53 (1989), pp 169-179.
1120             
1121         </para>
1122         
1123         <para>
1124             
1125             5. B. Nour-Omid, B.N. Parlett, T. Ericson, P.S. Jensen, "How to
1126             
1127             Implement the Spectral Transformation", Math. Comp., 48 (1987), pp
1128             
1129             663-673.
1130             
1131         </para>
1132         
1133         <para>
1134             
1135             6. R.G. Grimes, J.G. Lewis and H.D. Simon, "A Shifted Block Lanczos
1136             
1137             Algorithm for Solving Sparse Symmetric Generalized Eigenproblems", SIAM J.
1138             
1139             Matr. Anal. Apps., January (1993).
1140             
1141         </para>
1142         
1143         <para>
1144             
1145             7. L. Reichel, W.B. Gragg, "Algorithm 686: FORTRAN Subroutines for
1146             
1147             Updating the QR decomposition", ACM TOMS, December 1990, Volume 16 Number
1148             
1149             4, pp 369-377.
1150             
1151         </para>
1152         
1153         <para>
1154             
1155             8. R.B. Lehoucq, D.C. Sorensen, "Implementation of Some Spectral
1156             
1157             Transformations in a k-Step Arnoldi Method". In Preparation.
1158             
1159         </para>
1160         
1161     </refsection>
1162     
1163     <refsection>
1164         
1165         <title>Used Functions</title>
1166         
1167         <para>Based on ARPACK routine dneupd</para>
1168         
1169     </refsection>
1170     
1171     <refsection>
1172         
1173         <title>履歴</title>
1174         
1175         <revhistory>
1176             
1177             <revision>
1178                 
1179                 <revnumber>5.4.0</revnumber>
1180                 
1181                 <revremark>
1182                     
1183                     関数は廃止され,<link linkend="eigs">eigs</link>に代替されました.
1184                     
1185                 </revremark>
1186                 
1187             </revision>
1188             
1189         </revhistory>
1190         
1191     </refsection>
1192     
1193 </refentry>
1194