Mercurial > octave-nkf
annotate libcruft/arpack/src/cngets.f @ 12274:9f5d2ef078e8 release-3-4-x
import ARPACK sources to libcruft from Debian package libarpack2 2.1+parpack96.dfsg-3+b1
author | John W. Eaton <jwe@octave.org> |
---|---|
date | Fri, 28 Jan 2011 14:04:33 -0500 |
parents | |
children |
rev | line source |
---|---|
12274
9f5d2ef078e8
import ARPACK sources to libcruft from Debian package libarpack2 2.1+parpack96.dfsg-3+b1
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
1 c\BeginDoc |
9f5d2ef078e8
import ARPACK sources to libcruft from Debian package libarpack2 2.1+parpack96.dfsg-3+b1
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
2 c |
9f5d2ef078e8
import ARPACK sources to libcruft from Debian package libarpack2 2.1+parpack96.dfsg-3+b1
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
3 c\Name: cngets |
9f5d2ef078e8
import ARPACK sources to libcruft from Debian package libarpack2 2.1+parpack96.dfsg-3+b1
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
4 c |
9f5d2ef078e8
import ARPACK sources to libcruft from Debian package libarpack2 2.1+parpack96.dfsg-3+b1
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
5 c\Description: |
9f5d2ef078e8
import ARPACK sources to libcruft from Debian package libarpack2 2.1+parpack96.dfsg-3+b1
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
6 c Given the eigenvalues of the upper Hessenberg matrix H, |
9f5d2ef078e8
import ARPACK sources to libcruft from Debian package libarpack2 2.1+parpack96.dfsg-3+b1
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
7 c computes the NP shifts AMU that are zeros of the polynomial of |
9f5d2ef078e8
import ARPACK sources to libcruft from Debian package libarpack2 2.1+parpack96.dfsg-3+b1
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
8 c degree NP which filters out components of the unwanted eigenvectors |
9f5d2ef078e8
import ARPACK sources to libcruft from Debian package libarpack2 2.1+parpack96.dfsg-3+b1
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
9 c corresponding to the AMU's based on some given criteria. |
9f5d2ef078e8
import ARPACK sources to libcruft from Debian package libarpack2 2.1+parpack96.dfsg-3+b1
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
10 c |
9f5d2ef078e8
import ARPACK sources to libcruft from Debian package libarpack2 2.1+parpack96.dfsg-3+b1
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
11 c NOTE: call this even in the case of user specified shifts in order |
9f5d2ef078e8
import ARPACK sources to libcruft from Debian package libarpack2 2.1+parpack96.dfsg-3+b1
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
12 c to sort the eigenvalues, and error bounds of H for later use. |
9f5d2ef078e8
import ARPACK sources to libcruft from Debian package libarpack2 2.1+parpack96.dfsg-3+b1
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
13 c |
9f5d2ef078e8
import ARPACK sources to libcruft from Debian package libarpack2 2.1+parpack96.dfsg-3+b1
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
14 c\Usage: |
9f5d2ef078e8
import ARPACK sources to libcruft from Debian package libarpack2 2.1+parpack96.dfsg-3+b1
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
15 c call cngets |
9f5d2ef078e8
import ARPACK sources to libcruft from Debian package libarpack2 2.1+parpack96.dfsg-3+b1
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
16 c ( ISHIFT, WHICH, KEV, NP, RITZ, BOUNDS ) |
9f5d2ef078e8
import ARPACK sources to libcruft from Debian package libarpack2 2.1+parpack96.dfsg-3+b1
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
17 c |
9f5d2ef078e8
import ARPACK sources to libcruft from Debian package libarpack2 2.1+parpack96.dfsg-3+b1
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
18 c\Arguments |
9f5d2ef078e8
import ARPACK sources to libcruft from Debian package libarpack2 2.1+parpack96.dfsg-3+b1
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
19 c ISHIFT Integer. (INPUT) |
9f5d2ef078e8
import ARPACK sources to libcruft from Debian package libarpack2 2.1+parpack96.dfsg-3+b1
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
20 c Method for selecting the implicit shifts at each iteration. |
9f5d2ef078e8
import ARPACK sources to libcruft from Debian package libarpack2 2.1+parpack96.dfsg-3+b1
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
21 c ISHIFT = 0: user specified shifts |
9f5d2ef078e8
import ARPACK sources to libcruft from Debian package libarpack2 2.1+parpack96.dfsg-3+b1
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
22 c ISHIFT = 1: exact shift with respect to the matrix H. |
9f5d2ef078e8
import ARPACK sources to libcruft from Debian package libarpack2 2.1+parpack96.dfsg-3+b1
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
23 c |
9f5d2ef078e8
import ARPACK sources to libcruft from Debian package libarpack2 2.1+parpack96.dfsg-3+b1
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
24 c WHICH Character*2. (INPUT) |
9f5d2ef078e8
import ARPACK sources to libcruft from Debian package libarpack2 2.1+parpack96.dfsg-3+b1
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
25 c Shift selection criteria. |
9f5d2ef078e8
import ARPACK sources to libcruft from Debian package libarpack2 2.1+parpack96.dfsg-3+b1
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
26 c 'LM' -> want the KEV eigenvalues of largest magnitude. |
9f5d2ef078e8
import ARPACK sources to libcruft from Debian package libarpack2 2.1+parpack96.dfsg-3+b1
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
27 c 'SM' -> want the KEV eigenvalues of smallest magnitude. |
9f5d2ef078e8
import ARPACK sources to libcruft from Debian package libarpack2 2.1+parpack96.dfsg-3+b1
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
28 c 'LR' -> want the KEV eigenvalues of largest REAL part. |
9f5d2ef078e8
import ARPACK sources to libcruft from Debian package libarpack2 2.1+parpack96.dfsg-3+b1
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
29 c 'SR' -> want the KEV eigenvalues of smallest REAL part. |
9f5d2ef078e8
import ARPACK sources to libcruft from Debian package libarpack2 2.1+parpack96.dfsg-3+b1
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
30 c 'LI' -> want the KEV eigenvalues of largest imaginary part. |
9f5d2ef078e8
import ARPACK sources to libcruft from Debian package libarpack2 2.1+parpack96.dfsg-3+b1
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
31 c 'SI' -> want the KEV eigenvalues of smallest imaginary part. |
9f5d2ef078e8
import ARPACK sources to libcruft from Debian package libarpack2 2.1+parpack96.dfsg-3+b1
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
32 c |
9f5d2ef078e8
import ARPACK sources to libcruft from Debian package libarpack2 2.1+parpack96.dfsg-3+b1
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
33 c KEV Integer. (INPUT) |
9f5d2ef078e8
import ARPACK sources to libcruft from Debian package libarpack2 2.1+parpack96.dfsg-3+b1
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
34 c The number of desired eigenvalues. |
9f5d2ef078e8
import ARPACK sources to libcruft from Debian package libarpack2 2.1+parpack96.dfsg-3+b1
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
35 c |
9f5d2ef078e8
import ARPACK sources to libcruft from Debian package libarpack2 2.1+parpack96.dfsg-3+b1
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
36 c NP Integer. (INPUT) |
9f5d2ef078e8
import ARPACK sources to libcruft from Debian package libarpack2 2.1+parpack96.dfsg-3+b1
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
37 c The number of shifts to compute. |
9f5d2ef078e8
import ARPACK sources to libcruft from Debian package libarpack2 2.1+parpack96.dfsg-3+b1
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
38 c |
9f5d2ef078e8
import ARPACK sources to libcruft from Debian package libarpack2 2.1+parpack96.dfsg-3+b1
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
39 c RITZ Complex array of length KEV+NP. (INPUT/OUTPUT) |
9f5d2ef078e8
import ARPACK sources to libcruft from Debian package libarpack2 2.1+parpack96.dfsg-3+b1
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
40 c On INPUT, RITZ contains the the eigenvalues of H. |
9f5d2ef078e8
import ARPACK sources to libcruft from Debian package libarpack2 2.1+parpack96.dfsg-3+b1
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
41 c On OUTPUT, RITZ are sorted so that the unwanted |
9f5d2ef078e8
import ARPACK sources to libcruft from Debian package libarpack2 2.1+parpack96.dfsg-3+b1
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
42 c eigenvalues are in the first NP locations and the wanted |
9f5d2ef078e8
import ARPACK sources to libcruft from Debian package libarpack2 2.1+parpack96.dfsg-3+b1
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
43 c portion is in the last KEV locations. When exact shifts are |
9f5d2ef078e8
import ARPACK sources to libcruft from Debian package libarpack2 2.1+parpack96.dfsg-3+b1
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
44 c selected, the unwanted part corresponds to the shifts to |
9f5d2ef078e8
import ARPACK sources to libcruft from Debian package libarpack2 2.1+parpack96.dfsg-3+b1
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
45 c be applied. Also, if ISHIFT .eq. 1, the unwanted eigenvalues |
9f5d2ef078e8
import ARPACK sources to libcruft from Debian package libarpack2 2.1+parpack96.dfsg-3+b1
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
46 c are further sorted so that the ones with largest Ritz values |
9f5d2ef078e8
import ARPACK sources to libcruft from Debian package libarpack2 2.1+parpack96.dfsg-3+b1
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
47 c are first. |
9f5d2ef078e8
import ARPACK sources to libcruft from Debian package libarpack2 2.1+parpack96.dfsg-3+b1
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
48 c |
9f5d2ef078e8
import ARPACK sources to libcruft from Debian package libarpack2 2.1+parpack96.dfsg-3+b1
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
49 c BOUNDS Complex array of length KEV+NP. (INPUT/OUTPUT) |
9f5d2ef078e8
import ARPACK sources to libcruft from Debian package libarpack2 2.1+parpack96.dfsg-3+b1
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
50 c Error bounds corresponding to the ordering in RITZ. |
9f5d2ef078e8
import ARPACK sources to libcruft from Debian package libarpack2 2.1+parpack96.dfsg-3+b1
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
51 c |
9f5d2ef078e8
import ARPACK sources to libcruft from Debian package libarpack2 2.1+parpack96.dfsg-3+b1
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
52 c |
9f5d2ef078e8
import ARPACK sources to libcruft from Debian package libarpack2 2.1+parpack96.dfsg-3+b1
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
53 c |
9f5d2ef078e8
import ARPACK sources to libcruft from Debian package libarpack2 2.1+parpack96.dfsg-3+b1
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
54 c\EndDoc |
9f5d2ef078e8
import ARPACK sources to libcruft from Debian package libarpack2 2.1+parpack96.dfsg-3+b1
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
55 c |
9f5d2ef078e8
import ARPACK sources to libcruft from Debian package libarpack2 2.1+parpack96.dfsg-3+b1
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
56 c----------------------------------------------------------------------- |
9f5d2ef078e8
import ARPACK sources to libcruft from Debian package libarpack2 2.1+parpack96.dfsg-3+b1
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
57 c |
9f5d2ef078e8
import ARPACK sources to libcruft from Debian package libarpack2 2.1+parpack96.dfsg-3+b1
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
58 c\BeginLib |
9f5d2ef078e8
import ARPACK sources to libcruft from Debian package libarpack2 2.1+parpack96.dfsg-3+b1
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
59 c |
9f5d2ef078e8
import ARPACK sources to libcruft from Debian package libarpack2 2.1+parpack96.dfsg-3+b1
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
60 c\Local variables: |
9f5d2ef078e8
import ARPACK sources to libcruft from Debian package libarpack2 2.1+parpack96.dfsg-3+b1
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
61 c xxxxxx Complex |
9f5d2ef078e8
import ARPACK sources to libcruft from Debian package libarpack2 2.1+parpack96.dfsg-3+b1
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
62 c |
9f5d2ef078e8
import ARPACK sources to libcruft from Debian package libarpack2 2.1+parpack96.dfsg-3+b1
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
63 c\Routines called: |
9f5d2ef078e8
import ARPACK sources to libcruft from Debian package libarpack2 2.1+parpack96.dfsg-3+b1
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
64 c csortc ARPACK sorting routine. |
9f5d2ef078e8
import ARPACK sources to libcruft from Debian package libarpack2 2.1+parpack96.dfsg-3+b1
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
65 c ivout ARPACK utility routine that prints integers. |
9f5d2ef078e8
import ARPACK sources to libcruft from Debian package libarpack2 2.1+parpack96.dfsg-3+b1
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
66 c arscnd ARPACK utility routine for timing. |
9f5d2ef078e8
import ARPACK sources to libcruft from Debian package libarpack2 2.1+parpack96.dfsg-3+b1
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
67 c cvout ARPACK utility routine that prints vectors. |
9f5d2ef078e8
import ARPACK sources to libcruft from Debian package libarpack2 2.1+parpack96.dfsg-3+b1
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
68 c |
9f5d2ef078e8
import ARPACK sources to libcruft from Debian package libarpack2 2.1+parpack96.dfsg-3+b1
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
69 c\Author |
9f5d2ef078e8
import ARPACK sources to libcruft from Debian package libarpack2 2.1+parpack96.dfsg-3+b1
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
70 c Danny Sorensen Phuong Vu |
9f5d2ef078e8
import ARPACK sources to libcruft from Debian package libarpack2 2.1+parpack96.dfsg-3+b1
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
71 c Richard Lehoucq CRPC / Rice University |
9f5d2ef078e8
import ARPACK sources to libcruft from Debian package libarpack2 2.1+parpack96.dfsg-3+b1
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
72 c Dept. of Computational & Houston, Texas |
9f5d2ef078e8
import ARPACK sources to libcruft from Debian package libarpack2 2.1+parpack96.dfsg-3+b1
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
73 c Applied Mathematics |
9f5d2ef078e8
import ARPACK sources to libcruft from Debian package libarpack2 2.1+parpack96.dfsg-3+b1
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
74 c Rice University |
9f5d2ef078e8
import ARPACK sources to libcruft from Debian package libarpack2 2.1+parpack96.dfsg-3+b1
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
75 c Houston, Texas |
9f5d2ef078e8
import ARPACK sources to libcruft from Debian package libarpack2 2.1+parpack96.dfsg-3+b1
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
76 c |
9f5d2ef078e8
import ARPACK sources to libcruft from Debian package libarpack2 2.1+parpack96.dfsg-3+b1
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
77 c\SCCS Information: @(#) |
9f5d2ef078e8
import ARPACK sources to libcruft from Debian package libarpack2 2.1+parpack96.dfsg-3+b1
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
78 c FILE: ngets.F SID: 2.2 DATE OF SID: 4/20/96 RELEASE: 2 |
9f5d2ef078e8
import ARPACK sources to libcruft from Debian package libarpack2 2.1+parpack96.dfsg-3+b1
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
79 c |
9f5d2ef078e8
import ARPACK sources to libcruft from Debian package libarpack2 2.1+parpack96.dfsg-3+b1
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
80 c\Remarks |
9f5d2ef078e8
import ARPACK sources to libcruft from Debian package libarpack2 2.1+parpack96.dfsg-3+b1
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
81 c 1. This routine does not keep complex conjugate pairs of |
9f5d2ef078e8
import ARPACK sources to libcruft from Debian package libarpack2 2.1+parpack96.dfsg-3+b1
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
82 c eigenvalues together. |
9f5d2ef078e8
import ARPACK sources to libcruft from Debian package libarpack2 2.1+parpack96.dfsg-3+b1
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
83 c |
9f5d2ef078e8
import ARPACK sources to libcruft from Debian package libarpack2 2.1+parpack96.dfsg-3+b1
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
84 c\EndLib |
9f5d2ef078e8
import ARPACK sources to libcruft from Debian package libarpack2 2.1+parpack96.dfsg-3+b1
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
85 c |
9f5d2ef078e8
import ARPACK sources to libcruft from Debian package libarpack2 2.1+parpack96.dfsg-3+b1
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
86 c----------------------------------------------------------------------- |
9f5d2ef078e8
import ARPACK sources to libcruft from Debian package libarpack2 2.1+parpack96.dfsg-3+b1
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
87 c |
9f5d2ef078e8
import ARPACK sources to libcruft from Debian package libarpack2 2.1+parpack96.dfsg-3+b1
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
88 subroutine cngets ( ishift, which, kev, np, ritz, bounds) |
9f5d2ef078e8
import ARPACK sources to libcruft from Debian package libarpack2 2.1+parpack96.dfsg-3+b1
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
89 c |
9f5d2ef078e8
import ARPACK sources to libcruft from Debian package libarpack2 2.1+parpack96.dfsg-3+b1
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
90 c %----------------------------------------------------% |
9f5d2ef078e8
import ARPACK sources to libcruft from Debian package libarpack2 2.1+parpack96.dfsg-3+b1
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
91 c | Include files for debugging and timing information | |
9f5d2ef078e8
import ARPACK sources to libcruft from Debian package libarpack2 2.1+parpack96.dfsg-3+b1
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
92 c %----------------------------------------------------% |
9f5d2ef078e8
import ARPACK sources to libcruft from Debian package libarpack2 2.1+parpack96.dfsg-3+b1
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
93 c |
9f5d2ef078e8
import ARPACK sources to libcruft from Debian package libarpack2 2.1+parpack96.dfsg-3+b1
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
94 include 'debug.h' |
9f5d2ef078e8
import ARPACK sources to libcruft from Debian package libarpack2 2.1+parpack96.dfsg-3+b1
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
95 include 'stat.h' |
9f5d2ef078e8
import ARPACK sources to libcruft from Debian package libarpack2 2.1+parpack96.dfsg-3+b1
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
96 c |
9f5d2ef078e8
import ARPACK sources to libcruft from Debian package libarpack2 2.1+parpack96.dfsg-3+b1
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
97 c %------------------% |
9f5d2ef078e8
import ARPACK sources to libcruft from Debian package libarpack2 2.1+parpack96.dfsg-3+b1
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
98 c | Scalar Arguments | |
9f5d2ef078e8
import ARPACK sources to libcruft from Debian package libarpack2 2.1+parpack96.dfsg-3+b1
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
99 c %------------------% |
9f5d2ef078e8
import ARPACK sources to libcruft from Debian package libarpack2 2.1+parpack96.dfsg-3+b1
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
100 c |
9f5d2ef078e8
import ARPACK sources to libcruft from Debian package libarpack2 2.1+parpack96.dfsg-3+b1
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
101 character*2 which |
9f5d2ef078e8
import ARPACK sources to libcruft from Debian package libarpack2 2.1+parpack96.dfsg-3+b1
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
102 integer ishift, kev, np |
9f5d2ef078e8
import ARPACK sources to libcruft from Debian package libarpack2 2.1+parpack96.dfsg-3+b1
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
103 c |
9f5d2ef078e8
import ARPACK sources to libcruft from Debian package libarpack2 2.1+parpack96.dfsg-3+b1
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
104 c %-----------------% |
9f5d2ef078e8
import ARPACK sources to libcruft from Debian package libarpack2 2.1+parpack96.dfsg-3+b1
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
105 c | Array Arguments | |
9f5d2ef078e8
import ARPACK sources to libcruft from Debian package libarpack2 2.1+parpack96.dfsg-3+b1
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
106 c %-----------------% |
9f5d2ef078e8
import ARPACK sources to libcruft from Debian package libarpack2 2.1+parpack96.dfsg-3+b1
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
107 c |
9f5d2ef078e8
import ARPACK sources to libcruft from Debian package libarpack2 2.1+parpack96.dfsg-3+b1
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
108 Complex |
9f5d2ef078e8
import ARPACK sources to libcruft from Debian package libarpack2 2.1+parpack96.dfsg-3+b1
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
109 & bounds(kev+np), ritz(kev+np) |
9f5d2ef078e8
import ARPACK sources to libcruft from Debian package libarpack2 2.1+parpack96.dfsg-3+b1
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
110 c |
9f5d2ef078e8
import ARPACK sources to libcruft from Debian package libarpack2 2.1+parpack96.dfsg-3+b1
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
111 c %------------% |
9f5d2ef078e8
import ARPACK sources to libcruft from Debian package libarpack2 2.1+parpack96.dfsg-3+b1
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
112 c | Parameters | |
9f5d2ef078e8
import ARPACK sources to libcruft from Debian package libarpack2 2.1+parpack96.dfsg-3+b1
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
113 c %------------% |
9f5d2ef078e8
import ARPACK sources to libcruft from Debian package libarpack2 2.1+parpack96.dfsg-3+b1
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
114 c |
9f5d2ef078e8
import ARPACK sources to libcruft from Debian package libarpack2 2.1+parpack96.dfsg-3+b1
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
115 Complex |
9f5d2ef078e8
import ARPACK sources to libcruft from Debian package libarpack2 2.1+parpack96.dfsg-3+b1
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
116 & one, zero |
9f5d2ef078e8
import ARPACK sources to libcruft from Debian package libarpack2 2.1+parpack96.dfsg-3+b1
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
117 parameter (one = (1.0E+0, 0.0E+0), zero = (0.0E+0, 0.0E+0)) |
9f5d2ef078e8
import ARPACK sources to libcruft from Debian package libarpack2 2.1+parpack96.dfsg-3+b1
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
118 c |
9f5d2ef078e8
import ARPACK sources to libcruft from Debian package libarpack2 2.1+parpack96.dfsg-3+b1
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
119 c %---------------% |
9f5d2ef078e8
import ARPACK sources to libcruft from Debian package libarpack2 2.1+parpack96.dfsg-3+b1
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
120 c | Local Scalars | |
9f5d2ef078e8
import ARPACK sources to libcruft from Debian package libarpack2 2.1+parpack96.dfsg-3+b1
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
121 c %---------------% |
9f5d2ef078e8
import ARPACK sources to libcruft from Debian package libarpack2 2.1+parpack96.dfsg-3+b1
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
122 c |
9f5d2ef078e8
import ARPACK sources to libcruft from Debian package libarpack2 2.1+parpack96.dfsg-3+b1
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
123 integer msglvl |
9f5d2ef078e8
import ARPACK sources to libcruft from Debian package libarpack2 2.1+parpack96.dfsg-3+b1
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
124 c |
9f5d2ef078e8
import ARPACK sources to libcruft from Debian package libarpack2 2.1+parpack96.dfsg-3+b1
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
125 c %----------------------% |
9f5d2ef078e8
import ARPACK sources to libcruft from Debian package libarpack2 2.1+parpack96.dfsg-3+b1
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
126 c | External Subroutines | |
9f5d2ef078e8
import ARPACK sources to libcruft from Debian package libarpack2 2.1+parpack96.dfsg-3+b1
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
127 c %----------------------% |
9f5d2ef078e8
import ARPACK sources to libcruft from Debian package libarpack2 2.1+parpack96.dfsg-3+b1
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
128 c |
9f5d2ef078e8
import ARPACK sources to libcruft from Debian package libarpack2 2.1+parpack96.dfsg-3+b1
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
129 external cvout, csortc, arscnd |
9f5d2ef078e8
import ARPACK sources to libcruft from Debian package libarpack2 2.1+parpack96.dfsg-3+b1
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
130 c |
9f5d2ef078e8
import ARPACK sources to libcruft from Debian package libarpack2 2.1+parpack96.dfsg-3+b1
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
131 c %-----------------------% |
9f5d2ef078e8
import ARPACK sources to libcruft from Debian package libarpack2 2.1+parpack96.dfsg-3+b1
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
132 c | Executable Statements | |
9f5d2ef078e8
import ARPACK sources to libcruft from Debian package libarpack2 2.1+parpack96.dfsg-3+b1
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
133 c %-----------------------% |
9f5d2ef078e8
import ARPACK sources to libcruft from Debian package libarpack2 2.1+parpack96.dfsg-3+b1
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
134 c |
9f5d2ef078e8
import ARPACK sources to libcruft from Debian package libarpack2 2.1+parpack96.dfsg-3+b1
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
135 c %-------------------------------% |
9f5d2ef078e8
import ARPACK sources to libcruft from Debian package libarpack2 2.1+parpack96.dfsg-3+b1
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
136 c | Initialize timing statistics | |
9f5d2ef078e8
import ARPACK sources to libcruft from Debian package libarpack2 2.1+parpack96.dfsg-3+b1
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
137 c | & message level for debugging | |
9f5d2ef078e8
import ARPACK sources to libcruft from Debian package libarpack2 2.1+parpack96.dfsg-3+b1
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
138 c %-------------------------------% |
9f5d2ef078e8
import ARPACK sources to libcruft from Debian package libarpack2 2.1+parpack96.dfsg-3+b1
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
139 c |
9f5d2ef078e8
import ARPACK sources to libcruft from Debian package libarpack2 2.1+parpack96.dfsg-3+b1
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
140 call arscnd (t0) |
9f5d2ef078e8
import ARPACK sources to libcruft from Debian package libarpack2 2.1+parpack96.dfsg-3+b1
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
141 msglvl = mcgets |
9f5d2ef078e8
import ARPACK sources to libcruft from Debian package libarpack2 2.1+parpack96.dfsg-3+b1
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
142 c |
9f5d2ef078e8
import ARPACK sources to libcruft from Debian package libarpack2 2.1+parpack96.dfsg-3+b1
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
143 call csortc (which, .true., kev+np, ritz, bounds) |
9f5d2ef078e8
import ARPACK sources to libcruft from Debian package libarpack2 2.1+parpack96.dfsg-3+b1
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
144 c |
9f5d2ef078e8
import ARPACK sources to libcruft from Debian package libarpack2 2.1+parpack96.dfsg-3+b1
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
145 if ( ishift .eq. 1 ) then |
9f5d2ef078e8
import ARPACK sources to libcruft from Debian package libarpack2 2.1+parpack96.dfsg-3+b1
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
146 c |
9f5d2ef078e8
import ARPACK sources to libcruft from Debian package libarpack2 2.1+parpack96.dfsg-3+b1
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
147 c %-------------------------------------------------------% |
9f5d2ef078e8
import ARPACK sources to libcruft from Debian package libarpack2 2.1+parpack96.dfsg-3+b1
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
148 c | Sort the unwanted Ritz values used as shifts so that | |
9f5d2ef078e8
import ARPACK sources to libcruft from Debian package libarpack2 2.1+parpack96.dfsg-3+b1
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
149 c | the ones with largest Ritz estimates are first | |
9f5d2ef078e8
import ARPACK sources to libcruft from Debian package libarpack2 2.1+parpack96.dfsg-3+b1
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
150 c | This will tend to minimize the effects of the | |
9f5d2ef078e8
import ARPACK sources to libcruft from Debian package libarpack2 2.1+parpack96.dfsg-3+b1
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
151 c | forward instability of the iteration when the shifts | |
9f5d2ef078e8
import ARPACK sources to libcruft from Debian package libarpack2 2.1+parpack96.dfsg-3+b1
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
152 c | are applied in subroutine cnapps. | |
9f5d2ef078e8
import ARPACK sources to libcruft from Debian package libarpack2 2.1+parpack96.dfsg-3+b1
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
153 c | Be careful and use 'SM' since we want to sort BOUNDS! | |
9f5d2ef078e8
import ARPACK sources to libcruft from Debian package libarpack2 2.1+parpack96.dfsg-3+b1
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
154 c %-------------------------------------------------------% |
9f5d2ef078e8
import ARPACK sources to libcruft from Debian package libarpack2 2.1+parpack96.dfsg-3+b1
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
155 c |
9f5d2ef078e8
import ARPACK sources to libcruft from Debian package libarpack2 2.1+parpack96.dfsg-3+b1
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
156 call csortc ( 'SM', .true., np, bounds, ritz ) |
9f5d2ef078e8
import ARPACK sources to libcruft from Debian package libarpack2 2.1+parpack96.dfsg-3+b1
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
157 c |
9f5d2ef078e8
import ARPACK sources to libcruft from Debian package libarpack2 2.1+parpack96.dfsg-3+b1
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
158 end if |
9f5d2ef078e8
import ARPACK sources to libcruft from Debian package libarpack2 2.1+parpack96.dfsg-3+b1
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
159 c |
9f5d2ef078e8
import ARPACK sources to libcruft from Debian package libarpack2 2.1+parpack96.dfsg-3+b1
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
160 call arscnd (t1) |
9f5d2ef078e8
import ARPACK sources to libcruft from Debian package libarpack2 2.1+parpack96.dfsg-3+b1
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
161 tcgets = tcgets + (t1 - t0) |
9f5d2ef078e8
import ARPACK sources to libcruft from Debian package libarpack2 2.1+parpack96.dfsg-3+b1
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
162 c |
9f5d2ef078e8
import ARPACK sources to libcruft from Debian package libarpack2 2.1+parpack96.dfsg-3+b1
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
163 if (msglvl .gt. 0) then |
9f5d2ef078e8
import ARPACK sources to libcruft from Debian package libarpack2 2.1+parpack96.dfsg-3+b1
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
164 call ivout (logfil, 1, kev, ndigit, '_ngets: KEV is') |
9f5d2ef078e8
import ARPACK sources to libcruft from Debian package libarpack2 2.1+parpack96.dfsg-3+b1
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
165 call ivout (logfil, 1, np, ndigit, '_ngets: NP is') |
9f5d2ef078e8
import ARPACK sources to libcruft from Debian package libarpack2 2.1+parpack96.dfsg-3+b1
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
166 call cvout (logfil, kev+np, ritz, ndigit, |
9f5d2ef078e8
import ARPACK sources to libcruft from Debian package libarpack2 2.1+parpack96.dfsg-3+b1
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
167 & '_ngets: Eigenvalues of current H matrix ') |
9f5d2ef078e8
import ARPACK sources to libcruft from Debian package libarpack2 2.1+parpack96.dfsg-3+b1
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
168 call cvout (logfil, kev+np, bounds, ndigit, |
9f5d2ef078e8
import ARPACK sources to libcruft from Debian package libarpack2 2.1+parpack96.dfsg-3+b1
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
169 & '_ngets: Ritz estimates of the current KEV+NP Ritz values') |
9f5d2ef078e8
import ARPACK sources to libcruft from Debian package libarpack2 2.1+parpack96.dfsg-3+b1
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
170 end if |
9f5d2ef078e8
import ARPACK sources to libcruft from Debian package libarpack2 2.1+parpack96.dfsg-3+b1
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
171 c |
9f5d2ef078e8
import ARPACK sources to libcruft from Debian package libarpack2 2.1+parpack96.dfsg-3+b1
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
172 return |
9f5d2ef078e8
import ARPACK sources to libcruft from Debian package libarpack2 2.1+parpack96.dfsg-3+b1
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
173 c |
9f5d2ef078e8
import ARPACK sources to libcruft from Debian package libarpack2 2.1+parpack96.dfsg-3+b1
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
174 c %---------------% |
9f5d2ef078e8
import ARPACK sources to libcruft from Debian package libarpack2 2.1+parpack96.dfsg-3+b1
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
175 c | End of cngets | |
9f5d2ef078e8
import ARPACK sources to libcruft from Debian package libarpack2 2.1+parpack96.dfsg-3+b1
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
176 c %---------------% |
9f5d2ef078e8
import ARPACK sources to libcruft from Debian package libarpack2 2.1+parpack96.dfsg-3+b1
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
177 c |
9f5d2ef078e8
import ARPACK sources to libcruft from Debian package libarpack2 2.1+parpack96.dfsg-3+b1
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
178 end |