Debian Codegraph @

Modules/ThirdParty/VNL/src/vxl/v3p/netlib/arpack/dsaup2.c

raw symbols SCIP
1 /* arpack/dsaup2.f -- translated by f2c (version 20090411).
2 You must link the resulting object file with libf2c:
3 on Microsoft Windows system, link with libf2c.lib;
4 on Linux or Unix systems, link with .../path/to/libf2c.a -lm
5 or, if you install libf2c.a in a standard place, with -lf2c -lm
6 -- in that order, at the end of the command line, as in
7 cc *.o -lf2c -lm
8 Source for libf2c is in /netlib/f2c/libf2c.zip, e.g.,
9
10 http://www.netlib.org/f2c/libf2c.zip
11 */
12
13 #ifdef __cplusplus
14 extern "C" {
15 #endif
16 #include "v3p_netlib.h"cxx . . $ `<file>/Modules/ThirdParty/VNL/src/vxl/v3p/netlib/v3p_netlib.h`/
17
18 /* Common Block Declarations */
19
20 /*Extern struct { */
21 /* integer logfil, ndigit, mgetv0, msaupd, msaup2, msaitr, mseigt, msapps, */
22 /* msgets, mseupd, mnaupd, mnaup2, mnaitr, mneigh, mnapps, mngets, */
23 /* mneupd, mcaupd, mcaup2, mcaitr, mceigh, mcapps, mcgets, mceupd; */
24 /*} debug_; */
25
26 /*#define debug_1 debug_ */
27
28 /*Extern struct { */
29 /* integer nopx, nbx, nrorth, nitref, nrstrt; */
30 /* real tsaupd, tsaup2, tsaitr, tseigt, tsgets, tsapps, tsconv, tnaupd, */
31 /* tnaup2, tnaitr, tneigh, tngets, tnapps, tnconv, tcaupd, tcaup2, */
32 /* tcaitr, tceigh, tcgets, tcapps, tcconv, tmvopx, tmvbx, tgetv0, */
33 /* titref, trvec; */
34 /*} timing_; */
35
36 /*#define timing_1 timing_ */
37
38 /* Table of constant values */
39
40 static doublerealcxx . . $ `Modules/ThirdParty/VNL/src/vxl/v3p/netlib/v3p_f2c_mangle.h:57:9`! c_b3cxx . . $ c_b3. = .66666666666666663;
41 static integercxx . . $ `Modules/ThirdParty/VNL/src/vxl/v3p/netlib/v3p_f2c_mangle.h:63:9`! c__1cxx . . $ c__1. = 1;
42 static integercxx . . $ `Modules/ThirdParty/VNL/src/vxl/v3p/netlib/v3p_f2c_mangle.h:63:9`! c__0cxx . . $ c__0. = 0;
43 static logicalcxx . . $ `Modules/ThirdParty/VNL/src/vxl/v3p/netlib/v3p_f2c_mangle.h:65:9`! c_truecxx . . $ c_true. = TRUE_cxx . . $ `Modules/ThirdParty/VNL/src/vxl/v3p/netlib/v3p_f2c_original.h:29:9`!;
44
45 /* ----------------------------------------------------------------------- */
46 /* \BeginDoc */
47
48 /* \Name: dsaup2 */
49
50 /* \Description: */
51 /* Intermediate level interface called by dsaupd. */
52
53 /* \Usage: */
54 /* call dsaup2 */
55 /* ( IDO, BMAT, N, WHICH, NEV, NP, TOL, RESID, MODE, IUPD, */
56 /* ISHIFT, MXITER, V, LDV, H, LDH, RITZ, BOUNDS, Q, LDQ, WORKL, */
57 /* IPNTR, WORKD, INFO ) */
58
59 /* \Arguments */
60
61 /* IDO, BMAT, N, WHICH, NEV, TOL, RESID: same as defined in dsaupd. */
62 /* MODE, ISHIFT, MXITER: see the definition of IPARAM in dsaupd. */
63
64 /* NP Integer. (INPUT/OUTPUT) */
65 /* Contains the number of implicit shifts to apply during */
66 /* each Arnoldi/Lanczos iteration. */
67 /* If ISHIFT=1, NP is adjusted dynamically at each iteration */
68 /* to accelerate convergence and prevent stagnation. */
69 /* This is also roughly equal to the number of matrix-vector */
70 /* products (involving the operator OP) per Arnoldi iteration. */
71 /* The logic for adjusting is contained within the current */
72 /* subroutine. */
73 /* If ISHIFT=0, NP is the number of shifts the user needs */
74 /* to provide via reverse comunication. 0 < NP < NCV-NEV. */
75 /* NP may be less than NCV-NEV since a leading block of the current */
76 /* upper Tridiagonal matrix has split off and contains "unwanted" */
77 /* Ritz values. */
78 /* Upon termination of the IRA iteration, NP contains the number */
79 /* of "converged" wanted Ritz values. */
80
81 /* IUPD Integer. (INPUT) */
82 /* IUPD .EQ. 0: use explicit restart instead implicit update. */
83 /* IUPD .NE. 0: use implicit update. */
84
85 /* V Double precision N by (NEV+NP) array. (INPUT/OUTPUT) */
86 /* The Lanczos basis vectors. */
87
88 /* LDV Integer. (INPUT) */
89 /* Leading dimension of V exactly as declared in the calling */
90 /* program. */
91
92 /* H Double precision (NEV+NP) by 2 array. (OUTPUT) */
93 /* H is used to store the generated symmetric tridiagonal matrix */
94 /* The subdiagonal is stored in the first column of H starting */
95 /* at H(2,1). The main diagonal is stored in the second column */
96 /* of H starting at H(1,2). If dsaup2 converges store the */
97 /* B-norm of the final residual vector in H(1,1). */
98
99 /* LDH Integer. (INPUT) */
100 /* Leading dimension of H exactly as declared in the calling */
101 /* program. */
102
103 /* RITZ Double precision array of length NEV+NP. (OUTPUT) */
104 /* RITZ(1:NEV) contains the computed Ritz values of OP. */
105
106 /* BOUNDS Double precision array of length NEV+NP. (OUTPUT) */
107 /* BOUNDS(1:NEV) contain the error bounds corresponding to RITZ. */
108
109 /* Q Double precision (NEV+NP) by (NEV+NP) array. (WORKSPACE) */
110 /* Private (replicated) work array used to accumulate the */
111 /* rotation in the shift application step. */
112
113 /* LDQ Integer. (INPUT) */
114 /* Leading dimension of Q exactly as declared in the calling */
115 /* program. */
116
117 /* WORKL Double precision array of length at least 3*(NEV+NP). (INPUT/WORKSPACE) */
118 /* Private (replicated) array on each PE or array allocated on */
119 /* the front end. It is used in the computation of the */
120 /* tridiagonal eigenvalue problem, the calculation and */
121 /* application of the shifts and convergence checking. */
122 /* If ISHIFT .EQ. O and IDO .EQ. 3, the first NP locations */
123 /* of WORKL are used in reverse communication to hold the user */
124 /* supplied shifts. */
125
126 /* IPNTR Integer array of length 3. (OUTPUT) */
127 /* Pointer to mark the starting locations in the WORKD for */
128 /* vectors used by the Lanczos iteration. */
129 /* ------------------------------------------------------------- */
130 /* IPNTR(1): pointer to the current operand vector X. */
131 /* IPNTR(2): pointer to the current result vector Y. */
132 /* IPNTR(3): pointer to the vector B * X when used in one of */
133 /* the spectral transformation modes. X is the current */
134 /* operand. */
135 /* ------------------------------------------------------------- */
136
137 /* WORKD Double precision work array of length 3*N. (REVERSE COMMUNICATION) */
138 /* Distributed array to be used in the basic Lanczos iteration */
139 /* for reverse communication. The user should not use WORKD */
140 /* as temporary workspace during the iteration !!!!!!!!!! */
141 /* See Data Distribution Note in dsaupd. */
142
143 /* INFO Integer. (INPUT/OUTPUT) */
144 /* If INFO .EQ. 0, a randomly initial residual vector is used. */
145 /* If INFO .NE. 0, RESID contains the initial residual vector, */
146 /* possibly from a previous run. */
147 /* Error flag on output. */
148 /* = 0: Normal return. */
149 /* = 1: All possible eigenvalues of OP has been found. */
150 /* NP returns the size of the invariant subspace */
151 /* spanning the operator OP. */
152 /* = 2: No shifts could be applied. */
153 /* = -8: Error return from trid. eigenvalue calculation; */
154 /* This should never happen. */
155 /* = -9: Starting vector is zero. */
156 /* = -9999: Could not build an Lanczos factorization. */
157 /* Size that was built in returned in NP. */
158
159 /* \EndDoc */
160
161 /* ----------------------------------------------------------------------- */
162
163 /* \BeginLib */
164
165 /* \References: */
166 /* 1. D.C. Sorensen, "Implicit Application of Polynomial Filters in */
167 /* a k-Step Arnoldi Method", SIAM J. Matr. Anal. Apps., 13 (1992), */
168 /* pp 357-385. */
169 /* 2. R.B. Lehoucq, "Analysis and Implementation of an Implicitly */
170 /* Restarted Arnoldi Iteration", Rice University Technical Report */
171 /* TR95-13, Department of Computational and Applied Mathematics. */
172 /* 3. B.N. Parlett, "The Symmetric Eigenvalue Problem". Prentice-Hall, */
173 /* 1980. */
174 /* 4. B.N. Parlett, B. Nour-Omid, "Towards a Black Box Lanczos Program", */
175 /* Computer Physics Communications, 53 (1989), pp 169-179. */
176 /* 5. B. Nour-Omid, B.N. Parlett, T. Ericson, P.S. Jensen, "How to */
177 /* Implement the Spectral Transformation", Math. Comp., 48 (1987), */
178 /* pp 663-673. */
179 /* 6. R.G. Grimes, J.G. Lewis and H.D. Simon, "A Shifted Block Lanczos */
180 /* Algorithm for Solving Sparse Symmetric Generalized Eigenproblems", */
181 /* SIAM J. Matr. Anal. Apps., January (1993). */
182 /* 7. L. Reichel, W.B. Gragg, "Algorithm 686: FORTRAN Subroutines */
183 /* for Updating the QR decomposition", ACM TOMS, December 1990, */
184 /* Volume 16 Number 4, pp 369-377. */
185
186 /* \Routines called: */
187 /* dgetv0 ARPACK initial vector generation routine. */
188 /* dsaitr ARPACK Lanczos factorization routine. */
189 /* dsapps ARPACK application of implicit shifts routine. */
190 /* dsconv ARPACK convergence of Ritz values routine. */
191 /* dseigt ARPACK compute Ritz values and error bounds routine. */
192 /* dsgets ARPACK reorder Ritz values and error bounds routine. */
193 /* dsortr ARPACK sorting routine. */
194 /* second ARPACK utility routine for timing. */
195 /* dlamch LAPACK routine that determines machine constants. */
196 /* dcopy Level 1 BLAS that copies one vector to another. */
197 /* ddot Level 1 BLAS that computes the scalar product of two vectors. */
198 /* dnrm2 Level 1 BLAS that computes the norm of a vector. */
199 /* dscal Level 1 BLAS that scales a vector. */
200 /* dswap Level 1 BLAS that swaps two vectors. */
201
202 /* \Author */
203 /* Danny Sorensen Phuong Vu */
204 /* Richard Lehoucq CRPC / Rice University */
205 /* Dept. of Computational & Houston, Texas */
206 /* Applied Mathematics */
207 /* Rice University */
208 /* Houston, Texas */
209
210 /* \Revision history: */
211 /* 12/15/93: Version ' 2.4' */
212 /* xx/xx/95: Version ' 2.4'. (R.B. Lehoucq) */
213
214 /* \SCCS Information: @(#) */
215 /* FILE: saup2.F SID: 2.6 DATE OF SID: 8/16/96 RELEASE: 2 */
216
217 /* \EndLib */
218
219 /* ----------------------------------------------------------------------- */
220
221 /*< >*/
222 /* Subroutine */ int dsaup2_cxx . . $ `Modules/ThirdParty/VNL/src/vxl/v3p/netlib/v3p_netlib_mangle.h:130:9`!(integercxx . . $ `Modules/ThirdParty/VNL/src/vxl/v3p/netlib/v3p_f2c_mangle.h:63:9`! *ido, char *bmat, integercxx . . $ `Modules/ThirdParty/VNL/src/vxl/v3p/netlib/v3p_f2c_mangle.h:63:9`! *n, char *
223 which, integercxx . . $ `Modules/ThirdParty/VNL/src/vxl/v3p/netlib/v3p_f2c_mangle.h:63:9`! *nev, integercxx . . $ `Modules/ThirdParty/VNL/src/vxl/v3p/netlib/v3p_f2c_mangle.h:63:9`! *np, doublerealcxx . . $ `Modules/ThirdParty/VNL/src/vxl/v3p/netlib/v3p_f2c_mangle.h:57:9`! *tol, doublerealcxx . . $ `Modules/ThirdParty/VNL/src/vxl/v3p/netlib/v3p_f2c_mangle.h:57:9`! *resid,
224 integercxx . . $ `Modules/ThirdParty/VNL/src/vxl/v3p/netlib/v3p_f2c_mangle.h:63:9`! *mode, integercxx . . $ `Modules/ThirdParty/VNL/src/vxl/v3p/netlib/v3p_f2c_mangle.h:63:9`! *iupd, integercxx . . $ `Modules/ThirdParty/VNL/src/vxl/v3p/netlib/v3p_f2c_mangle.h:63:9`! *ishift, integercxx . . $ `Modules/ThirdParty/VNL/src/vxl/v3p/netlib/v3p_f2c_mangle.h:63:9`! *mxiter,
225 doublerealcxx . . $ `Modules/ThirdParty/VNL/src/vxl/v3p/netlib/v3p_f2c_mangle.h:57:9`! *v, integercxx . . $ `Modules/ThirdParty/VNL/src/vxl/v3p/netlib/v3p_f2c_mangle.h:63:9`! *ldv, doublerealcxx . . $ `Modules/ThirdParty/VNL/src/vxl/v3p/netlib/v3p_f2c_mangle.h:57:9`! *h__, integercxx . . $ `Modules/ThirdParty/VNL/src/vxl/v3p/netlib/v3p_f2c_mangle.h:63:9`! *ldh,
226 doublerealcxx . . $ `Modules/ThirdParty/VNL/src/vxl/v3p/netlib/v3p_f2c_mangle.h:57:9`! *ritz, doublerealcxx . . $ `Modules/ThirdParty/VNL/src/vxl/v3p/netlib/v3p_f2c_mangle.h:57:9`! *bounds, doublerealcxx . . $ `Modules/ThirdParty/VNL/src/vxl/v3p/netlib/v3p_f2c_mangle.h:57:9`! *q, integercxx . . $ `Modules/ThirdParty/VNL/src/vxl/v3p/netlib/v3p_f2c_mangle.h:63:9`! *ldq,
227 doublerealcxx . . $ `Modules/ThirdParty/VNL/src/vxl/v3p/netlib/v3p_f2c_mangle.h:57:9`! *workl, integercxx . . $ `Modules/ThirdParty/VNL/src/vxl/v3p/netlib/v3p_f2c_mangle.h:63:9`! *ipntr, doublerealcxx . . $ `Modules/ThirdParty/VNL/src/vxl/v3p/netlib/v3p_f2c_mangle.h:57:9`! *workd, integercxx . . $ `Modules/ThirdParty/VNL/src/vxl/v3p/netlib/v3p_f2c_mangle.h:63:9`! *info,
228 ftnlencxx . . $ `Modules/ThirdParty/VNL/src/vxl/v3p/netlib/v3p_f2c_mangle.h:60:9`! bmat_len, ftnlencxx . . $ `Modules/ThirdParty/VNL/src/vxl/v3p/netlib/v3p_f2c_mangle.h:60:9`! which_len)
229 {
230 /* System generated locals */
231 integercxx . . $ `Modules/ThirdParty/VNL/src/vxl/v3p/netlib/v3p_f2c_mangle.h:63:9`! h_dim1, h_offset, q_dim1, q_offset, v_dim1, v_offset, i__1, i__2,
232 i__3;
233 doublerealcxx . . $ `Modules/ThirdParty/VNL/src/vxl/v3p/netlib/v3p_f2c_mangle.h:57:9`! d__1, d__2, d__3;
234
235 /* Builtin functions */
236 double pow_ddcxx . . $ `Modules/ThirdParty/VNL/src/vxl/v3p/netlib/v3p_f2c_mangle.h:17:9`!(doublerealcxx . . $ `Modules/ThirdParty/VNL/src/vxl/v3p/netlib/v3p_f2c_mangle.h:57:9`! *, doublerealcxx . . $ `Modules/ThirdParty/VNL/src/vxl/v3p/netlib/v3p_f2c_mangle.h:57:9`! *);
237 integercxx . . $ `Modules/ThirdParty/VNL/src/vxl/v3p/netlib/v3p_f2c_mangle.h:63:9`! s_cmpcxx . . $ `Modules/ThirdParty/VNL/src/vxl/v3p/netlib/v3p_f2c_mangle.h:25:9`!(char *, char *, ftnlencxx . . $ `Modules/ThirdParty/VNL/src/vxl/v3p/netlib/v3p_f2c_mangle.h:60:9`!, ftnlencxx . . $ `Modules/ThirdParty/VNL/src/vxl/v3p/netlib/v3p_f2c_mangle.h:60:9`!);
238 /* Subroutine */ int s_copycxx . . $ `Modules/ThirdParty/VNL/src/vxl/v3p/netlib/v3p_f2c_mangle.h:26:9`!(char *, char *, ftnlencxx . . $ `Modules/ThirdParty/VNL/src/vxl/v3p/netlib/v3p_f2c_mangle.h:60:9`!, ftnlencxx . . $ `Modules/ThirdParty/VNL/src/vxl/v3p/netlib/v3p_f2c_mangle.h:60:9`!);
239 double sqrtcxx . . $ sqrt(447c67c6676f75c3).(doublerealcxx . . $ `Modules/ThirdParty/VNL/src/vxl/v3p/netlib/v3p_f2c_mangle.h:57:9`!);
240
241 /* Local variables */
242 integercxx . . $ `Modules/ThirdParty/VNL/src/vxl/v3p/netlib/v3p_f2c_mangle.h:63:9`! j;
243 /* static real t0, t1, t2, t3; */
244 /* integer kp[3]; */
245 static integercxx . . $ `Modules/ThirdParty/VNL/src/vxl/v3p/netlib/v3p_f2c_mangle.h:63:9`! np0, nev0;
246 extern doublerealcxx . . $ `Modules/ThirdParty/VNL/src/vxl/v3p/netlib/v3p_f2c_mangle.h:57:9`! ddot_cxx . . $ `Modules/ThirdParty/VNL/src/vxl/v3p/netlib/v3p_netlib_mangle.h:43:9`!(integercxx . . $ `Modules/ThirdParty/VNL/src/vxl/v3p/netlib/v3p_f2c_mangle.h:63:9`! *, doublerealcxx . . $ `Modules/ThirdParty/VNL/src/vxl/v3p/netlib/v3p_f2c_mangle.h:57:9`! *, integercxx . . $ `Modules/ThirdParty/VNL/src/vxl/v3p/netlib/v3p_f2c_mangle.h:63:9`! *, doublerealcxx . . $ `Modules/ThirdParty/VNL/src/vxl/v3p/netlib/v3p_f2c_mangle.h:57:9`! *,
247 integercxx . . $ `Modules/ThirdParty/VNL/src/vxl/v3p/netlib/v3p_f2c_mangle.h:63:9`! *);
248 static doublerealcxx . . $ `Modules/ThirdParty/VNL/src/vxl/v3p/netlib/v3p_f2c_mangle.h:57:9`! eps23;
249 integercxx . . $ `Modules/ThirdParty/VNL/src/vxl/v3p/netlib/v3p_f2c_mangle.h:63:9`! ierr;
250 static integercxx . . $ `Modules/ThirdParty/VNL/src/vxl/v3p/netlib/v3p_f2c_mangle.h:63:9`! iter;
251 doublerealcxx . . $ `Modules/ThirdParty/VNL/src/vxl/v3p/netlib/v3p_f2c_mangle.h:57:9`! temp;
252 integercxx . . $ `Modules/ThirdParty/VNL/src/vxl/v3p/netlib/v3p_f2c_mangle.h:63:9`! nevd2;
253 extern doublerealcxx . . $ `Modules/ThirdParty/VNL/src/vxl/v3p/netlib/v3p_f2c_mangle.h:57:9`! dnrm2_cxx . . $ `Modules/ThirdParty/VNL/src/vxl/v3p/netlib/v3p_netlib_mangle.h:108:9`!(integercxx . . $ `Modules/ThirdParty/VNL/src/vxl/v3p/netlib/v3p_f2c_mangle.h:63:9`! *, doublerealcxx . . $ `Modules/ThirdParty/VNL/src/vxl/v3p/netlib/v3p_f2c_mangle.h:57:9`! *, integercxx . . $ `Modules/ThirdParty/VNL/src/vxl/v3p/netlib/v3p_f2c_mangle.h:63:9`! *);
254 static logicalcxx . . $ `Modules/ThirdParty/VNL/src/vxl/v3p/netlib/v3p_f2c_mangle.h:65:9`! getv0;
255 integercxx . . $ `Modules/ThirdParty/VNL/src/vxl/v3p/netlib/v3p_f2c_mangle.h:63:9`! nevm2;
256 static logicalcxx . . $ `Modules/ThirdParty/VNL/src/vxl/v3p/netlib/v3p_f2c_mangle.h:65:9`! cnorm;
257 extern /* Subroutine */ int dcopy_cxx . . $ `Modules/ThirdParty/VNL/src/vxl/v3p/netlib/v3p_netlib_mangle.h:40:9`!(integercxx . . $ `Modules/ThirdParty/VNL/src/vxl/v3p/netlib/v3p_f2c_mangle.h:63:9`! *, doublerealcxx . . $ `Modules/ThirdParty/VNL/src/vxl/v3p/netlib/v3p_f2c_mangle.h:57:9`! *, integercxx . . $ `Modules/ThirdParty/VNL/src/vxl/v3p/netlib/v3p_f2c_mangle.h:63:9`! *,
258 doublerealcxx . . $ `Modules/ThirdParty/VNL/src/vxl/v3p/netlib/v3p_f2c_mangle.h:57:9`! *, integercxx . . $ `Modules/ThirdParty/VNL/src/vxl/v3p/netlib/v3p_f2c_mangle.h:63:9`! *), dswap_cxx . . $ `Modules/ThirdParty/VNL/src/vxl/v3p/netlib/v3p_netlib_mangle.h:146:9`!(integercxx . . $ `Modules/ThirdParty/VNL/src/vxl/v3p/netlib/v3p_f2c_mangle.h:63:9`! *, doublerealcxx . . $ `Modules/ThirdParty/VNL/src/vxl/v3p/netlib/v3p_f2c_mangle.h:57:9`! *, integercxx . . $ `Modules/ThirdParty/VNL/src/vxl/v3p/netlib/v3p_f2c_mangle.h:63:9`!
259 *, doublerealcxx . . $ `Modules/ThirdParty/VNL/src/vxl/v3p/netlib/v3p_f2c_mangle.h:57:9`! *, integercxx . . $ `Modules/ThirdParty/VNL/src/vxl/v3p/netlib/v3p_f2c_mangle.h:63:9`! *);
260 static integercxx . . $ `Modules/ThirdParty/VNL/src/vxl/v3p/netlib/v3p_f2c_mangle.h:63:9`! nconv;
261 static logicalcxx . . $ `Modules/ThirdParty/VNL/src/vxl/v3p/netlib/v3p_f2c_mangle.h:65:9`! initv;
262 static doublerealcxx . . $ `Modules/ThirdParty/VNL/src/vxl/v3p/netlib/v3p_f2c_mangle.h:57:9`! rnorm;
263 extern /* Subroutine */ int dgetv0_cxx . . $ `Modules/ThirdParty/VNL/src/vxl/v3p/netlib/v3p_netlib_mangle.h:53:9`!(integercxx . . $ `Modules/ThirdParty/VNL/src/vxl/v3p/netlib/v3p_f2c_mangle.h:63:9`! *, char *, integercxx . . $ `Modules/ThirdParty/VNL/src/vxl/v3p/netlib/v3p_f2c_mangle.h:63:9`! *, logicalcxx . . $ `Modules/ThirdParty/VNL/src/vxl/v3p/netlib/v3p_f2c_mangle.h:65:9`!
264 *, integercxx . . $ `Modules/ThirdParty/VNL/src/vxl/v3p/netlib/v3p_f2c_mangle.h:63:9`! *, integercxx . . $ `Modules/ThirdParty/VNL/src/vxl/v3p/netlib/v3p_f2c_mangle.h:63:9`! *, doublerealcxx . . $ `Modules/ThirdParty/VNL/src/vxl/v3p/netlib/v3p_f2c_mangle.h:57:9`! *, integercxx . . $ `Modules/ThirdParty/VNL/src/vxl/v3p/netlib/v3p_f2c_mangle.h:63:9`! *, doublerealcxx . . $ `Modules/ThirdParty/VNL/src/vxl/v3p/netlib/v3p_f2c_mangle.h:57:9`! *,
265 doublerealcxx . . $ `Modules/ThirdParty/VNL/src/vxl/v3p/netlib/v3p_f2c_mangle.h:57:9`! *, integercxx . . $ `Modules/ThirdParty/VNL/src/vxl/v3p/netlib/v3p_f2c_mangle.h:63:9`! *, doublerealcxx . . $ `Modules/ThirdParty/VNL/src/vxl/v3p/netlib/v3p_f2c_mangle.h:57:9`! *, integercxx . . $ `Modules/ThirdParty/VNL/src/vxl/v3p/netlib/v3p_f2c_mangle.h:63:9`! *, ftnlencxx . . $ `Modules/ThirdParty/VNL/src/vxl/v3p/netlib/v3p_f2c_mangle.h:60:9`!);
266 extern doublerealcxx . . $ `Modules/ThirdParty/VNL/src/vxl/v3p/netlib/v3p_f2c_mangle.h:57:9`! dlamch_cxx . . $ `Modules/ThirdParty/VNL/src/vxl/v3p/netlib/v3p_netlib_mangle.h:81:9`!(char *, ftnlencxx . . $ `Modules/ThirdParty/VNL/src/vxl/v3p/netlib/v3p_f2c_mangle.h:60:9`!);
267 integercxx . . $ `Modules/ThirdParty/VNL/src/vxl/v3p/netlib/v3p_f2c_mangle.h:63:9`! nevbef;
268 extern /* Subroutine */ int second_cxx . . $ `Modules/ThirdParty/VNL/src/vxl/v3p/netlib/v3p_netlib_mangle.h:233:9`!(realcxx . . $ `Modules/ThirdParty/VNL/src/vxl/v3p/netlib/v3p_f2c_mangle.h:69:9`! *);
269 static logicalcxx . . $ `Modules/ThirdParty/VNL/src/vxl/v3p/netlib/v3p_f2c_mangle.h:65:9`! update;
270 char wprime[2];
271 static logicalcxx . . $ `Modules/ThirdParty/VNL/src/vxl/v3p/netlib/v3p_f2c_mangle.h:65:9`! ushift;
272 static integercxx . . $ `Modules/ThirdParty/VNL/src/vxl/v3p/netlib/v3p_f2c_mangle.h:63:9`! kplusp /*, msglvl */;
273 integercxx . . $ `Modules/ThirdParty/VNL/src/vxl/v3p/netlib/v3p_f2c_mangle.h:63:9`! nptemp;
274 extern /* Subroutine */ int dsaitr_cxx . . $ `Modules/ThirdParty/VNL/src/vxl/v3p/netlib/v3p_netlib_mangle.h:128:9`!(integercxx . . $ `Modules/ThirdParty/VNL/src/vxl/v3p/netlib/v3p_f2c_mangle.h:63:9`! *, char *, integercxx . . $ `Modules/ThirdParty/VNL/src/vxl/v3p/netlib/v3p_f2c_mangle.h:63:9`! *, integercxx . . $ `Modules/ThirdParty/VNL/src/vxl/v3p/netlib/v3p_f2c_mangle.h:63:9`!
275 *, integercxx . . $ `Modules/ThirdParty/VNL/src/vxl/v3p/netlib/v3p_f2c_mangle.h:63:9`! *, integercxx . . $ `Modules/ThirdParty/VNL/src/vxl/v3p/netlib/v3p_f2c_mangle.h:63:9`! *, doublerealcxx . . $ `Modules/ThirdParty/VNL/src/vxl/v3p/netlib/v3p_f2c_mangle.h:57:9`! *, doublerealcxx . . $ `Modules/ThirdParty/VNL/src/vxl/v3p/netlib/v3p_f2c_mangle.h:57:9`! *, doublerealcxx . . $ `Modules/ThirdParty/VNL/src/vxl/v3p/netlib/v3p_f2c_mangle.h:57:9`! *,
276 integercxx . . $ `Modules/ThirdParty/VNL/src/vxl/v3p/netlib/v3p_f2c_mangle.h:63:9`! *, doublerealcxx . . $ `Modules/ThirdParty/VNL/src/vxl/v3p/netlib/v3p_f2c_mangle.h:57:9`! *, integercxx . . $ `Modules/ThirdParty/VNL/src/vxl/v3p/netlib/v3p_f2c_mangle.h:63:9`! *, integercxx . . $ `Modules/ThirdParty/VNL/src/vxl/v3p/netlib/v3p_f2c_mangle.h:63:9`! *, doublerealcxx . . $ `Modules/ThirdParty/VNL/src/vxl/v3p/netlib/v3p_f2c_mangle.h:57:9`! *,
277 integercxx . . $ `Modules/ThirdParty/VNL/src/vxl/v3p/netlib/v3p_f2c_mangle.h:63:9`! *, ftnlencxx . . $ `Modules/ThirdParty/VNL/src/vxl/v3p/netlib/v3p_f2c_mangle.h:60:9`!), dsconv_cxx . . $ `Modules/ThirdParty/VNL/src/vxl/v3p/netlib/v3p_netlib_mangle.h:133:9`!(integercxx . . $ `Modules/ThirdParty/VNL/src/vxl/v3p/netlib/v3p_f2c_mangle.h:63:9`! *, doublerealcxx . . $ `Modules/ThirdParty/VNL/src/vxl/v3p/netlib/v3p_f2c_mangle.h:57:9`! *, doublerealcxx . . $ `Modules/ThirdParty/VNL/src/vxl/v3p/netlib/v3p_f2c_mangle.h:57:9`! *,
278 doublerealcxx . . $ `Modules/ThirdParty/VNL/src/vxl/v3p/netlib/v3p_f2c_mangle.h:57:9`! *, integercxx . . $ `Modules/ThirdParty/VNL/src/vxl/v3p/netlib/v3p_f2c_mangle.h:63:9`! *), dseigt_cxx . . $ `Modules/ThirdParty/VNL/src/vxl/v3p/netlib/v3p_netlib_mangle.h:134:9`!(doublerealcxx . . $ `Modules/ThirdParty/VNL/src/vxl/v3p/netlib/v3p_f2c_mangle.h:57:9`! *, integercxx . . $ `Modules/ThirdParty/VNL/src/vxl/v3p/netlib/v3p_f2c_mangle.h:63:9`! *,
279 doublerealcxx . . $ `Modules/ThirdParty/VNL/src/vxl/v3p/netlib/v3p_f2c_mangle.h:57:9`! *, integercxx . . $ `Modules/ThirdParty/VNL/src/vxl/v3p/netlib/v3p_f2c_mangle.h:63:9`! *, doublerealcxx . . $ `Modules/ThirdParty/VNL/src/vxl/v3p/netlib/v3p_f2c_mangle.h:57:9`! *, doublerealcxx . . $ `Modules/ThirdParty/VNL/src/vxl/v3p/netlib/v3p_f2c_mangle.h:57:9`! *, doublerealcxx . . $ `Modules/ThirdParty/VNL/src/vxl/v3p/netlib/v3p_f2c_mangle.h:57:9`! *,
280 integercxx . . $ `Modules/ThirdParty/VNL/src/vxl/v3p/netlib/v3p_f2c_mangle.h:63:9`! *), dsgets_cxx . . $ `Modules/ThirdParty/VNL/src/vxl/v3p/netlib/v3p_netlib_mangle.h:137:9`!(integercxx . . $ `Modules/ThirdParty/VNL/src/vxl/v3p/netlib/v3p_f2c_mangle.h:63:9`! *, char *, integercxx . . $ `Modules/ThirdParty/VNL/src/vxl/v3p/netlib/v3p_f2c_mangle.h:63:9`! *, integercxx . . $ `Modules/ThirdParty/VNL/src/vxl/v3p/netlib/v3p_f2c_mangle.h:63:9`! *,
281 doublerealcxx . . $ `Modules/ThirdParty/VNL/src/vxl/v3p/netlib/v3p_f2c_mangle.h:57:9`! *, doublerealcxx . . $ `Modules/ThirdParty/VNL/src/vxl/v3p/netlib/v3p_f2c_mangle.h:57:9`! *, doublerealcxx . . $ `Modules/ThirdParty/VNL/src/vxl/v3p/netlib/v3p_f2c_mangle.h:57:9`! *, ftnlencxx . . $ `Modules/ThirdParty/VNL/src/vxl/v3p/netlib/v3p_f2c_mangle.h:60:9`!), dsapps_cxx . . $ `Modules/ThirdParty/VNL/src/vxl/v3p/netlib/v3p_netlib_mangle.h:129:9`!(
282 integercxx . . $ `Modules/ThirdParty/VNL/src/vxl/v3p/netlib/v3p_f2c_mangle.h:63:9`! *, integercxx . . $ `Modules/ThirdParty/VNL/src/vxl/v3p/netlib/v3p_f2c_mangle.h:63:9`! *, integercxx . . $ `Modules/ThirdParty/VNL/src/vxl/v3p/netlib/v3p_f2c_mangle.h:63:9`! *, doublerealcxx . . $ `Modules/ThirdParty/VNL/src/vxl/v3p/netlib/v3p_f2c_mangle.h:57:9`! *, doublerealcxx . . $ `Modules/ThirdParty/VNL/src/vxl/v3p/netlib/v3p_f2c_mangle.h:57:9`! *,
283 integercxx . . $ `Modules/ThirdParty/VNL/src/vxl/v3p/netlib/v3p_f2c_mangle.h:63:9`! *, doublerealcxx . . $ `Modules/ThirdParty/VNL/src/vxl/v3p/netlib/v3p_f2c_mangle.h:57:9`! *, integercxx . . $ `Modules/ThirdParty/VNL/src/vxl/v3p/netlib/v3p_f2c_mangle.h:63:9`! *, doublerealcxx . . $ `Modules/ThirdParty/VNL/src/vxl/v3p/netlib/v3p_f2c_mangle.h:57:9`! *, doublerealcxx . . $ `Modules/ThirdParty/VNL/src/vxl/v3p/netlib/v3p_f2c_mangle.h:57:9`! *,
284 integercxx . . $ `Modules/ThirdParty/VNL/src/vxl/v3p/netlib/v3p_f2c_mangle.h:63:9`! *, doublerealcxx . . $ `Modules/ThirdParty/VNL/src/vxl/v3p/netlib/v3p_f2c_mangle.h:57:9`! *), dsortr_cxx . . $ `Modules/ThirdParty/VNL/src/vxl/v3p/netlib/v3p_netlib_mangle.h:138:9`!(char *, logicalcxx . . $ `Modules/ThirdParty/VNL/src/vxl/v3p/netlib/v3p_f2c_mangle.h:65:9`! *, integercxx . . $ `Modules/ThirdParty/VNL/src/vxl/v3p/netlib/v3p_f2c_mangle.h:63:9`! *,
285 doublerealcxx . . $ `Modules/ThirdParty/VNL/src/vxl/v3p/netlib/v3p_f2c_mangle.h:57:9`! *, doublerealcxx . . $ `Modules/ThirdParty/VNL/src/vxl/v3p/netlib/v3p_f2c_mangle.h:57:9`! *, ftnlencxx . . $ `Modules/ThirdParty/VNL/src/vxl/v3p/netlib/v3p_f2c_mangle.h:60:9`!);
286
287
288 /* %----------------------------------------------------% */
289 /* | Include files for debugging and timing information | */
290 /* %----------------------------------------------------% */
291
292 /*< include 'debug.h' >*/
293 /*< include 'stat.h' >*/
294
295 /* \SCCS Information: @(#) */
296 /* FILE: debug.h SID: 2.3 DATE OF SID: 11/16/95 RELEASE: 2 */
297
298 /* %---------------------------------% */
299 /* | See debug.doc for documentation | */
300 /* %---------------------------------% */
301 /*< >*/
302 /*< character bmat*1, which*2 >*/
303
304 /* %------------------% */
305 /* | Scalar Arguments | */
306 /* %------------------% */
307
308 /* %--------------------------------% */
309 /* | See stat.doc for documentation | */
310 /* %--------------------------------% */
311
312 /* \SCCS Information: @(#) */
313 /* FILE: stat.h SID: 2.2 DATE OF SID: 11/16/95 RELEASE: 2 */
314
315 /*< save t0, t1, t2, t3, t4, t5 >*/
316
317 /*< integer nopx, nbx, nrorth, nitref, nrstrt >*/
318 /*< >*/
319 /*< >*/
320 /*< >*/
321 /*< >*/
322
323 /* %-----------------% */
324 /* | Array Arguments | */
325 /* %-----------------% */
326
327 /*< integer ipntr(3) >*/
328 /*< >*/
329
330 /* %------------% */
331 /* | Parameters | */
332 /* %------------% */
333
334 /*< >*/
335 /*< parameter (one = 1.0D+0, zero = 0.0D+0) >*/
336
337 /* %---------------% */
338 /* | Local Scalars | */
339 /* %---------------% */
340
341 /*< character wprime*2 >*/
342 /*< logical cnorm, getv0, initv, update, ushift >*/
343 /*< >*/
344 /*< >*/
345 /*< >*/
346
347 /* %----------------------% */
348 /* | External Subroutines | */
349 /* %----------------------% */
350
351 /*< >*/
352
353 /* %--------------------% */
354 /* | External Functions | */
355 /* %--------------------% */
356
357 /*< >*/
358 /*< external ddot, dnrm2, dlamch >*/
359
360 /* %---------------------% */
361 /* | Intrinsic Functions | */
362 /* %---------------------% */
363
364 /*< intrinsic min >*/
365
366 /* %-----------------------% */
367 /* | Executable Statements | */
368 /* %-----------------------% */
369
370 /*< if (ido .eq. 0) then >*/
371 /* Parameter adjustments */
372 --workd;
373 --resid;
374 --workl;
375 --bounds;
376 --ritz;
377 v_dim1 = *ldv;
378 v_offset = 1 + v_dim1;
379 v -= v_offset;
380 h_dim1 = *ldh;
381 h_offset = 1 + h_dim1;
382 h__ -= h_offset;
383 q_dim1 = *ldq;
384 q_offset = 1 + q_dim1;
385 q -= q_offset;
386 --ipntr;
387
388 /* Function Body */
389 if (*ido == 0) {
390
391 /* %-------------------------------% */
392 /* | Initialize timing statistics | */
393 /* | & message level for debugging | */
394 /* %-------------------------------% */
395
396 /*< call second (t0) >*/
397 /* second_(&t0); */
398 /*< msglvl = msaup2 >*/
399 /* msglvl = debug_1.msaup2; */
400
401 /* %---------------------------------% */
402 /* | Set machine dependent constant. | */
403 /* %---------------------------------% */
404
405 /*< eps23 = dlamch('Epsilon-Machine') >*/
406 eps23 = dlamch_cxx . . $ `Modules/ThirdParty/VNL/src/vxl/v3p/netlib/v3p_netlib_mangle.h:81:9`!("Epsilon-Machine", (ftnlencxx . . $ `Modules/ThirdParty/VNL/src/vxl/v3p/netlib/v3p_f2c_mangle.h:60:9`!)15);
407 /*< eps23 = eps23**(2.0D+0/3.0D+0) >*/
408 eps23 = pow_ddcxx . . $ `Modules/ThirdParty/VNL/src/vxl/v3p/netlib/v3p_f2c_mangle.h:17:9`!(&eps23, &c_b3cxx . . $ c_b3.);
409
410 /* %-------------------------------------% */
411 /* | nev0 and np0 are integer variables | */
412 /* | hold the initial values of NEV & NP | */
413 /* %-------------------------------------% */
414
415 /*< nev0 = nev >*/
416 nev0 = *nev;
417 /*< np0 = np >*/
418 np0 = *np;
419
420 /* %-------------------------------------% */
421 /* | kplusp is the bound on the largest | */
422 /* | Lanczos factorization built. | */
423 /* | nconv is the current number of | */
424 /* | "converged" eigenvlues. | */
425 /* | iter is the counter on the current | */
426 /* | iteration step. | */
427 /* %-------------------------------------% */
428
429 /*< kplusp = nev0 + np0 >*/
430 kplusp = nev0 + np0;
431 /*< nconv = 0 >*/
432 nconv = 0;
433 /*< iter = 0 >*/
434 iter = 0;
435
436 /* %--------------------------------------------% */
437 /* | Set flags for computing the first NEV steps | */
438 /* | of the Lanczos factorization. | */
439 /* %--------------------------------------------% */
440
441 /*< getv0 = .true. >*/
442 getv0 = TRUE_cxx . . $ `Modules/ThirdParty/VNL/src/vxl/v3p/netlib/v3p_f2c_original.h:29:9`!;
443 /*< update = .false. >*/
444 update = FALSE_cxx . . $ `Modules/ThirdParty/VNL/src/vxl/v3p/netlib/v3p_f2c_original.h:30:9`!;
445 /*< ushift = .false. >*/
446 ushift = FALSE_cxx . . $ `Modules/ThirdParty/VNL/src/vxl/v3p/netlib/v3p_f2c_original.h:30:9`!;
447 /*< cnorm = .false. >*/
448 cnorm = FALSE_cxx . . $ `Modules/ThirdParty/VNL/src/vxl/v3p/netlib/v3p_f2c_original.h:30:9`!;
449
450 /*< if (info .ne. 0) then >*/
451 if (*info != 0) {
452
453 /* %--------------------------------------------% */
454 /* | User provides the initial residual vector. | */
455 /* %--------------------------------------------% */
456
457 /*< initv = .true. >*/
458 initv = TRUE_cxx . . $ `Modules/ThirdParty/VNL/src/vxl/v3p/netlib/v3p_f2c_original.h:29:9`!;
459 /*< info = 0 >*/
460 *info = 0;
461 /*< else >*/
462 } else {
463 /*< initv = .false. >*/
464 initv = FALSE_cxx . . $ `Modules/ThirdParty/VNL/src/vxl/v3p/netlib/v3p_f2c_original.h:30:9`!;
465 /*< end if >*/
466 }
467 /*< end if >*/
468 }
469
470 /* %---------------------------------------------% */
471 /* | Get a possibly random starting vector and | */
472 /* | force it into the range of the operator OP. | */
473 /* %---------------------------------------------% */
474
475 /*< 10 continue >*/
476 /* L10: */
477
478 /*< if (getv0) then >*/
479 if (getv0) {
480 /*< >*/
481 dgetv0_cxx . . $ `Modules/ThirdParty/VNL/src/vxl/v3p/netlib/v3p_netlib_mangle.h:53:9`!(ido, bmat, &c__1cxx . . $ c__1., &initv, n, &c__1cxx . . $ c__1., &v[v_offset], ldv, &resid[
482 1], &rnorm, &ipntr[1], &workd[1], info, (ftnlencxx . . $ `Modules/ThirdParty/VNL/src/vxl/v3p/netlib/v3p_f2c_mangle.h:60:9`!)1);
483
484 /*< if (ido .ne. 99) go to 9000 >*/
485 if (*ido != 99) {
486 goto L9000;
487 }
488
489 /*< if (rnorm .eq. zero) then >*/
490 if (rnorm == 0.) {
491
492 /* %-----------------------------------------% */
493 /* | The initial vector is zero. Error exit. | */
494 /* %-----------------------------------------% */
495
496 /*< info = -9 >*/
497 *info = -9;
498 /*< go to 1200 >*/
499 goto L1200;
500 /*< end if >*/
501 }
502 /*< getv0 = .false. >*/
503 getv0 = FALSE_cxx . . $ `Modules/ThirdParty/VNL/src/vxl/v3p/netlib/v3p_f2c_original.h:30:9`!;
504 /*< ido = 0 >*/
505 *ido = 0;
506 /*< end if >*/
507 }
508
509 /* %------------------------------------------------------------% */
510 /* | Back from reverse communication: continue with update step | */
511 /* %------------------------------------------------------------% */
512
513 /*< if (update) go to 20 >*/
514 if (update) {
515 goto L20;
516 }
517
518 /* %-------------------------------------------% */
519 /* | Back from computing user specified shifts | */
520 /* %-------------------------------------------% */
521
522 /*< if (ushift) go to 50 >*/
523 if (ushift) {
524 goto L50;
525 }
526
527 /* %-------------------------------------% */
528 /* | Back from computing residual norm | */
529 /* | at the end of the current iteration | */
530 /* %-------------------------------------% */
531
532 /*< if (cnorm) go to 100 >*/
533 if (cnorm) {
534 goto L100;
535 }
536
537 /* %----------------------------------------------------------% */
538 /* | Compute the first NEV steps of the Lanczos factorization | */
539 /* %----------------------------------------------------------% */
540
541 /*< >*/
542 dsaitr_cxx . . $ `Modules/ThirdParty/VNL/src/vxl/v3p/netlib/v3p_netlib_mangle.h:128:9`!(ido, bmat, n, &c__0cxx . . $ c__0., &nev0, mode, &resid[1], &rnorm, &v[v_offset],
543 ldv, &h__[h_offset], ldh, &ipntr[1], &workd[1], info, (ftnlencxx . . $ `Modules/ThirdParty/VNL/src/vxl/v3p/netlib/v3p_f2c_mangle.h:60:9`!)1);
544
545 /* %---------------------------------------------------% */
546 /* | ido .ne. 99 implies use of reverse communication | */
547 /* | to compute operations involving OP and possibly B | */
548 /* %---------------------------------------------------% */
549
550 /*< if (ido .ne. 99) go to 9000 >*/
551 if (*ido != 99) {
552 goto L9000;
553 }
554
555 /*< if (info .gt. 0) then >*/
556 if (*info > 0) {
557
558 /* %-----------------------------------------------------% */
559 /* | dsaitr was unable to build an Lanczos factorization | */
560 /* | of length NEV0. INFO is returned with the size of | */
561 /* | the factorization built. Exit main loop. | */
562 /* %-----------------------------------------------------% */
563
564 /*< np = info >*/
565 *np = *info;
566 /*< mxiter = iter >*/
567 *mxiter = iter;
568 /*< info = -9999 >*/
569 *info = -9999;
570 /*< go to 1200 >*/
571 goto L1200;
572 /*< end if >*/
573 }
574
575 /* %--------------------------------------------------------------% */
576 /* | | */
577 /* | M A I N LANCZOS I T E R A T I O N L O O P | */
578 /* | Each iteration implicitly restarts the Lanczos | */
579 /* | factorization in place. | */
580 /* | | */
581 /* %--------------------------------------------------------------% */
582
583 /*< 1000 continue >*/
584 L1000:
585
586 /*< iter = iter + 1 >*/
587 ++iter;
588
589 /* if (msglvl .gt. 0) then */
590 /* call ivout (logfil, 1, iter, ndigit, */
591 /* & '_saup2: **** Start of major iteration number ****') */
592 /* end if */
593 /* if (msglvl .gt. 1) then */
594 /* call ivout (logfil, 1, nev, ndigit, */
595 /* & '_saup2: The length of the current Lanczos factorization') */
596 /* call ivout (logfil, 1, np, ndigit, */
597 /* & '_saup2: Extend the Lanczos factorization by') */
598 /* end if */
599
600 /* %------------------------------------------------------------% */
601 /* | Compute NP additional steps of the Lanczos factorization. | */
602 /* %------------------------------------------------------------% */
603
604 /*< ido = 0 >*/
605 *ido = 0;
606 /*< 20 continue >*/
607 L20:
608 /*< update = .true. >*/
609 update = TRUE_cxx . . $ `Modules/ThirdParty/VNL/src/vxl/v3p/netlib/v3p_f2c_original.h:29:9`!;
610
611 /*< >*/
612 dsaitr_cxx . . $ `Modules/ThirdParty/VNL/src/vxl/v3p/netlib/v3p_netlib_mangle.h:128:9`!(ido, bmat, n, nev, np, mode, &resid[1], &rnorm, &v[v_offset], ldv,
613 &h__[h_offset], ldh, &ipntr[1], &workd[1], info, (ftnlencxx . . $ `Modules/ThirdParty/VNL/src/vxl/v3p/netlib/v3p_f2c_mangle.h:60:9`!)1);
614
615 /* %---------------------------------------------------% */
616 /* | ido .ne. 99 implies use of reverse communication | */
617 /* | to compute operations involving OP and possibly B | */
618 /* %---------------------------------------------------% */
619
620 /*< if (ido .ne. 99) go to 9000 >*/
621 if (*ido != 99) {
622 goto L9000;
623 }
624
625 /*< if (info .gt. 0) then >*/
626 if (*info > 0) {
627
628 /* %-----------------------------------------------------% */
629 /* | dsaitr was unable to build an Lanczos factorization | */
630 /* | of length NEV0+NP0. INFO is returned with the size | */
631 /* | of the factorization built. Exit main loop. | */
632 /* %-----------------------------------------------------% */
633
634 /*< np = info >*/
635 *np = *info;
636 /*< mxiter = iter >*/
637 *mxiter = iter;
638 /*< info = -9999 >*/
639 *info = -9999;
640 /*< go to 1200 >*/
641 goto L1200;
642 /*< end if >*/
643 }
644 /*< update = .false. >*/
645 update = FALSE_cxx . . $ `Modules/ThirdParty/VNL/src/vxl/v3p/netlib/v3p_f2c_original.h:30:9`!;
646
647 /* if (msglvl .gt. 1) then */
648 /* call dvout (logfil, 1, rnorm, ndigit, */
649 /* & '_saup2: Current B-norm of residual for factorization') */
650 /* end if */
651
652 /* %--------------------------------------------------------% */
653 /* | Compute the eigenvalues and corresponding error bounds | */
654 /* | of the current symmetric tridiagonal matrix. | */
655 /* %--------------------------------------------------------% */
656
657 /*< call dseigt (rnorm, kplusp, h, ldh, ritz, bounds, workl, ierr) >*/
658 dseigt_cxx . . $ `Modules/ThirdParty/VNL/src/vxl/v3p/netlib/v3p_netlib_mangle.h:134:9`!(&rnorm, &kplusp, &h__[h_offset], ldh, &ritz[1], &bounds[1], &
659 workl[1], &ierr);
660
661 /*< if (ierr .ne. 0) then >*/
662 if (ierr != 0) {
663 /*< info = -8 >*/
664 *info = -8;
665 /*< go to 1200 >*/
666 goto L1200;
667 /*< end if >*/
668 }
669
670 /* %----------------------------------------------------% */
671 /* | Make a copy of eigenvalues and corresponding error | */
672 /* | bounds obtained from _seigt. | */
673 /* %----------------------------------------------------% */
674
675 /*< call dcopy(kplusp, ritz, 1, workl(kplusp+1), 1) >*/
676 dcopy_cxx . . $ `Modules/ThirdParty/VNL/src/vxl/v3p/netlib/v3p_netlib_mangle.h:40:9`!(&kplusp, &ritz[1], &c__1cxx . . $ c__1., &workl[kplusp + 1], &c__1cxx . . $ c__1.);
677 /*< call dcopy(kplusp, bounds, 1, workl(2*kplusp+1), 1) >*/
678 dcopy_cxx . . $ `Modules/ThirdParty/VNL/src/vxl/v3p/netlib/v3p_netlib_mangle.h:40:9`!(&kplusp, &bounds[1], &c__1cxx . . $ c__1., &workl[(kplusp << 1) + 1], &c__1cxx . . $ c__1.);
679
680 /* %---------------------------------------------------% */
681 /* | Select the wanted Ritz values and their bounds | */
682 /* | to be used in the convergence test. | */
683 /* | The selection is based on the requested number of | */
684 /* | eigenvalues instead of the current NEV and NP to | */
685 /* | prevent possible misconvergence. | */
686 /* | * Wanted Ritz values := RITZ(NP+1:NEV+NP) | */
687 /* | * Shifts := RITZ(1:NP) := WORKL(1:NP) | */
688 /* %---------------------------------------------------% */
689
690 /*< nev = nev0 >*/
691 *nev = nev0;
692 /*< np = np0 >*/
693 *np = np0;
694 /*< call dsgets (ishift, which, nev, np, ritz, bounds, workl) >*/
695 dsgets_cxx . . $ `Modules/ThirdParty/VNL/src/vxl/v3p/netlib/v3p_netlib_mangle.h:137:9`!(ishift, which, nev, np, &ritz[1], &bounds[1], &workl[1], (ftnlencxx . . $ `Modules/ThirdParty/VNL/src/vxl/v3p/netlib/v3p_f2c_mangle.h:60:9`!)
696 2);
697
698 /* %-------------------% */
699 /* | Convergence test. | */
700 /* %-------------------% */
701
702 /*< call dcopy (nev, bounds(np+1), 1, workl(np+1), 1) >*/
703 dcopy_cxx . . $ `Modules/ThirdParty/VNL/src/vxl/v3p/netlib/v3p_netlib_mangle.h:40:9`!(nev, &bounds[*np + 1], &c__1cxx . . $ c__1., &workl[*np + 1], &c__1cxx . . $ c__1.);
704 /*< call dsconv (nev, ritz(np+1), workl(np+1), tol, nconv) >*/
705 dsconv_cxx . . $ `Modules/ThirdParty/VNL/src/vxl/v3p/netlib/v3p_netlib_mangle.h:133:9`!(nev, &ritz[*np + 1], &workl[*np + 1], tol, &nconv);
706
707 /*< if (msglvl .gt. 2) then >*/
708 /* if (msglvl > 2) { */
709 /*< kp(1) = nev >*/
710 /* kp[0] = *nev; */
711 /*< kp(2) = np >*/
712 /* kp[1] = *np; */
713 /*< kp(3) = nconv >*/
714 /* kp[2] = nconv; */
715 /* call ivout (logfil, 3, kp, ndigit, */
716 /* & '_saup2: NEV, NP, NCONV are') */
717 /* call dvout (logfil, kplusp, ritz, ndigit, */
718 /* & '_saup2: The eigenvalues of H') */
719 /* call dvout (logfil, kplusp, bounds, ndigit, */
720 /* & '_saup2: Ritz estimates of the current NCV Ritz values') */
721 /*< end if >*/
722 /* } */
723
724 /* %---------------------------------------------------------% */
725 /* | Count the number of unwanted Ritz values that have zero | */
726 /* | Ritz estimates. If any Ritz estimates are equal to zero | */
727 /* | then a leading block of H of order equal to at least | */
728 /* | the number of Ritz values with zero Ritz estimates has | */
729 /* | split off. None of these Ritz values may be removed by | */
730 /* | shifting. Decrease NP the number of shifts to apply. If | */
731 /* | no shifts may be applied, then prepare to exit | */
732 /* %---------------------------------------------------------% */
733
734 /*< nptemp = np >*/
735 nptemp = *np;
736 /*< do 30 j=1, nptemp >*/
737 i__1 = nptemp;
738 for (j = 1; j <= i__1; ++j) {
739 /*< if (bounds(j) .eq. zero) then >*/
740 if (bounds[j] == 0.) {
741 /*< np = np - 1 >*/
742 --(*np);
743 /*< nev = nev + 1 >*/
744 ++(*nev);
745 /*< end if >*/
746 }
747 /*< 30 continue >*/
748 /* L30: */
749 }
750
751 /*< >*/
752 if (nconv >= nev0 || iter > *mxiter || *np == 0) {
753
754 /* %------------------------------------------------% */
755 /* | Prepare to exit. Put the converged Ritz values | */
756 /* | and corresponding bounds in RITZ(1:NCONV) and | */
757 /* | BOUNDS(1:NCONV) respectively. Then sort. Be | */
758 /* | careful when NCONV > NP since we don't want to | */
759 /* | swap overlapping locations. | */
760 /* %------------------------------------------------% */
761
762 /*< if (which .eq. 'BE') then >*/
763 if (s_cmpcxx . . $ `Modules/ThirdParty/VNL/src/vxl/v3p/netlib/v3p_f2c_mangle.h:25:9`!(which, "BE", (ftnlencxx . . $ `Modules/ThirdParty/VNL/src/vxl/v3p/netlib/v3p_f2c_mangle.h:60:9`!)2, (ftnlencxx . . $ `Modules/ThirdParty/VNL/src/vxl/v3p/netlib/v3p_f2c_mangle.h:60:9`!)2) == 0) {
764
765 /* %-----------------------------------------------------% */
766 /* | Both ends of the spectrum are requested. | */
767 /* | Sort the eigenvalues into algebraically decreasing | */
768 /* | order first then swap low end of the spectrum next | */
769 /* | to high end in appropriate locations. | */
770 /* | NOTE: when np < floor(nev/2) be careful not to swap | */
771 /* | overlapping locations. | */
772 /* %-----------------------------------------------------% */
773
774 /*< wprime = 'SA' >*/
775 s_copycxx . . $ `Modules/ThirdParty/VNL/src/vxl/v3p/netlib/v3p_f2c_mangle.h:26:9`!(wprime, "SA", (ftnlencxx . . $ `Modules/ThirdParty/VNL/src/vxl/v3p/netlib/v3p_f2c_mangle.h:60:9`!)2, (ftnlencxx . . $ `Modules/ThirdParty/VNL/src/vxl/v3p/netlib/v3p_f2c_mangle.h:60:9`!)2);
776 /*< call dsortr (wprime, .true., kplusp, ritz, bounds) >*/
777 dsortr_cxx . . $ `Modules/ThirdParty/VNL/src/vxl/v3p/netlib/v3p_netlib_mangle.h:138:9`!(wprime, &c_truecxx . . $ c_true., &kplusp, &ritz[1], &bounds[1], (ftnlencxx . . $ `Modules/ThirdParty/VNL/src/vxl/v3p/netlib/v3p_f2c_mangle.h:60:9`!)2)
778 ;
779 /*< nevd2 = nev / 2 >*/
780 nevd2 = *nev / 2;
781 /*< nevm2 = nev - nevd2 >*/
782 nevm2 = *nev - nevd2;
783 /*< if ( nev .gt. 1 ) then >*/
784 if (*nev > 1) {
785 /*< >*/
786 i__1 = mincxx . . $ `Modules/ThirdParty/VNL/src/vxl/v3p/netlib/v3p_f2c_original.h:159:9`!(nevd2,*np);
787 /* Computing MAX */
788 i__2 = kplusp - nevd2 + 1, i__3 = kplusp - *np + 1;
789 dswap_cxx . . $ `Modules/ThirdParty/VNL/src/vxl/v3p/netlib/v3p_netlib_mangle.h:146:9`!(&i__1, &ritz[nevm2 + 1], &c__1cxx . . $ c__1., &ritz[maxcxx . . $ `Modules/ThirdParty/VNL/src/vxl/v3p/netlib/v3p_f2c_original.h:160:9`!(i__2,i__3)],
790 &c__1cxx . . $ c__1.);
791 /*< >*/
792 i__1 = mincxx . . $ `Modules/ThirdParty/VNL/src/vxl/v3p/netlib/v3p_f2c_original.h:159:9`!(nevd2,*np);
793 /* Computing MAX */
794 i__2 = kplusp - nevd2 + 1, i__3 = kplusp - *np;
795 dswap_cxx . . $ `Modules/ThirdParty/VNL/src/vxl/v3p/netlib/v3p_netlib_mangle.h:146:9`!(&i__1, &bounds[nevm2 + 1], &c__1cxx . . $ c__1., &bounds[maxcxx . . $ `Modules/ThirdParty/VNL/src/vxl/v3p/netlib/v3p_f2c_original.h:160:9`!(i__2,
796 i__3) + 1], &c__1cxx . . $ c__1.);
797 /*< end if >*/
798 }
799
800 /*< else >*/
801 } else {
802
803 /* %--------------------------------------------------% */
804 /* | LM, SM, LA, SA case. | */
805 /* | Sort the eigenvalues of H into the an order that | */
806 /* | is opposite to WHICH, and apply the resulting | */
807 /* | order to BOUNDS. The eigenvalues are sorted so | */
808 /* | that the wanted part are always within the first | */
809 /* | NEV locations. | */
810 /* %--------------------------------------------------% */
811
812 /*< if (which .eq. 'LM') wprime = 'SM' >*/
813 if (s_cmpcxx . . $ `Modules/ThirdParty/VNL/src/vxl/v3p/netlib/v3p_f2c_mangle.h:25:9`!(which, "LM", (ftnlencxx . . $ `Modules/ThirdParty/VNL/src/vxl/v3p/netlib/v3p_f2c_mangle.h:60:9`!)2, (ftnlencxx . . $ `Modules/ThirdParty/VNL/src/vxl/v3p/netlib/v3p_f2c_mangle.h:60:9`!)2) == 0) {
814 s_copycxx . . $ `Modules/ThirdParty/VNL/src/vxl/v3p/netlib/v3p_f2c_mangle.h:26:9`!(wprime, "SM", (ftnlencxx . . $ `Modules/ThirdParty/VNL/src/vxl/v3p/netlib/v3p_f2c_mangle.h:60:9`!)2, (ftnlencxx . . $ `Modules/ThirdParty/VNL/src/vxl/v3p/netlib/v3p_f2c_mangle.h:60:9`!)2);
815 }
816 /*< if (which .eq. 'SM') wprime = 'LM' >*/
817 if (s_cmpcxx . . $ `Modules/ThirdParty/VNL/src/vxl/v3p/netlib/v3p_f2c_mangle.h:25:9`!(which, "SM", (ftnlencxx . . $ `Modules/ThirdParty/VNL/src/vxl/v3p/netlib/v3p_f2c_mangle.h:60:9`!)2, (ftnlencxx . . $ `Modules/ThirdParty/VNL/src/vxl/v3p/netlib/v3p_f2c_mangle.h:60:9`!)2) == 0) {
818 s_copycxx . . $ `Modules/ThirdParty/VNL/src/vxl/v3p/netlib/v3p_f2c_mangle.h:26:9`!(wprime, "LM", (ftnlencxx . . $ `Modules/ThirdParty/VNL/src/vxl/v3p/netlib/v3p_f2c_mangle.h:60:9`!)2, (ftnlencxx . . $ `Modules/ThirdParty/VNL/src/vxl/v3p/netlib/v3p_f2c_mangle.h:60:9`!)2);
819 }
820 /*< if (which .eq. 'LA') wprime = 'SA' >*/
821 if (s_cmpcxx . . $ `Modules/ThirdParty/VNL/src/vxl/v3p/netlib/v3p_f2c_mangle.h:25:9`!(which, "LA", (ftnlencxx . . $ `Modules/ThirdParty/VNL/src/vxl/v3p/netlib/v3p_f2c_mangle.h:60:9`!)2, (ftnlencxx . . $ `Modules/ThirdParty/VNL/src/vxl/v3p/netlib/v3p_f2c_mangle.h:60:9`!)2) == 0) {
822 s_copycxx . . $ `Modules/ThirdParty/VNL/src/vxl/v3p/netlib/v3p_f2c_mangle.h:26:9`!(wprime, "SA", (ftnlencxx . . $ `Modules/ThirdParty/VNL/src/vxl/v3p/netlib/v3p_f2c_mangle.h:60:9`!)2, (ftnlencxx . . $ `Modules/ThirdParty/VNL/src/vxl/v3p/netlib/v3p_f2c_mangle.h:60:9`!)2);
823 }
824 /*< if (which .eq. 'SA') wprime = 'LA' >*/
825 if (s_cmpcxx . . $ `Modules/ThirdParty/VNL/src/vxl/v3p/netlib/v3p_f2c_mangle.h:25:9`!(which, "SA", (ftnlencxx . . $ `Modules/ThirdParty/VNL/src/vxl/v3p/netlib/v3p_f2c_mangle.h:60:9`!)2, (ftnlencxx . . $ `Modules/ThirdParty/VNL/src/vxl/v3p/netlib/v3p_f2c_mangle.h:60:9`!)2) == 0) {
826 s_copycxx . . $ `Modules/ThirdParty/VNL/src/vxl/v3p/netlib/v3p_f2c_mangle.h:26:9`!(wprime, "LA", (ftnlencxx . . $ `Modules/ThirdParty/VNL/src/vxl/v3p/netlib/v3p_f2c_mangle.h:60:9`!)2, (ftnlencxx . . $ `Modules/ThirdParty/VNL/src/vxl/v3p/netlib/v3p_f2c_mangle.h:60:9`!)2);
827 }
828
829 /*< call dsortr (wprime, .true., kplusp, ritz, bounds) >*/
830 dsortr_cxx . . $ `Modules/ThirdParty/VNL/src/vxl/v3p/netlib/v3p_netlib_mangle.h:138:9`!(wprime, &c_truecxx . . $ c_true., &kplusp, &ritz[1], &bounds[1], (ftnlencxx . . $ `Modules/ThirdParty/VNL/src/vxl/v3p/netlib/v3p_f2c_mangle.h:60:9`!)2)
831 ;
832
833 /*< end if >*/
834 }
835
836 /* %--------------------------------------------------% */
837 /* | Scale the Ritz estimate of each Ritz value | */
838 /* | by 1 / max(eps23,magnitude of the Ritz value). | */
839 /* %--------------------------------------------------% */
840
841 /*< do 35 j = 1, nev0 >*/
842 i__1 = nev0;
843 for (j = 1; j <= i__1; ++j) {
844 /*< temp = max( eps23, abs(ritz(j)) ) >*/
845 /* Computing MAX */
846 d__2 = eps23, d__3 = (d__1 = ritz[j], abscxx . . $ `Modules/ThirdParty/VNL/src/vxl/v3p/netlib/v3p_f2c_original.h:157:9`!(d__1));
847 temp = maxcxx . . $ `Modules/ThirdParty/VNL/src/vxl/v3p/netlib/v3p_f2c_original.h:160:9`!(d__2,d__3);
848 /*< bounds(j) = bounds(j)/temp >*/
849 bounds[j] /= temp;
850 /*< 35 continue >*/
851 /* L35: */
852 }
853
854 /* %----------------------------------------------------% */
855 /* | Sort the Ritz values according to the scaled Ritz | */
856 /* | esitmates. This will push all the converged ones | */
857 /* | towards the front of ritzr, ritzi, bounds | */
858 /* | (in the case when NCONV < NEV.) | */
859 /* %----------------------------------------------------% */
860
861 /*< wprime = 'LA' >*/
862 s_copycxx . . $ `Modules/ThirdParty/VNL/src/vxl/v3p/netlib/v3p_f2c_mangle.h:26:9`!(wprime, "LA", (ftnlencxx . . $ `Modules/ThirdParty/VNL/src/vxl/v3p/netlib/v3p_f2c_mangle.h:60:9`!)2, (ftnlencxx . . $ `Modules/ThirdParty/VNL/src/vxl/v3p/netlib/v3p_f2c_mangle.h:60:9`!)2);
863 /*< call dsortr(wprime, .true., nev0, bounds, ritz) >*/
864 dsortr_cxx . . $ `Modules/ThirdParty/VNL/src/vxl/v3p/netlib/v3p_netlib_mangle.h:138:9`!(wprime, &c_truecxx . . $ c_true., &nev0, &bounds[1], &ritz[1], (ftnlencxx . . $ `Modules/ThirdParty/VNL/src/vxl/v3p/netlib/v3p_f2c_mangle.h:60:9`!)2);
865
866 /* %----------------------------------------------% */
867 /* | Scale the Ritz estimate back to its original | */
868 /* | value. | */
869 /* %----------------------------------------------% */
870
871 /*< do 40 j = 1, nev0 >*/
872 i__1 = nev0;
873 for (j = 1; j <= i__1; ++j) {
874 /*< temp = max( eps23, abs(ritz(j)) ) >*/
875 /* Computing MAX */
876 d__2 = eps23, d__3 = (d__1 = ritz[j], abscxx . . $ `Modules/ThirdParty/VNL/src/vxl/v3p/netlib/v3p_f2c_original.h:157:9`!(d__1));
877 temp = maxcxx . . $ `Modules/ThirdParty/VNL/src/vxl/v3p/netlib/v3p_f2c_original.h:160:9`!(d__2,d__3);
878 /*< bounds(j) = bounds(j)*temp >*/
879 bounds[j] *= temp;
880 /*< 40 continue >*/
881 /* L40: */
882 }
883
884 /* %--------------------------------------------------% */
885 /* | Sort the "converged" Ritz values again so that | */
886 /* | the "threshold" values and their associated Ritz | */
887 /* | estimates appear at the appropriate position in | */
888 /* | ritz and bound. | */
889 /* %--------------------------------------------------% */
890
891 /*< if (which .eq. 'BE') then >*/
892 if (s_cmpcxx . . $ `Modules/ThirdParty/VNL/src/vxl/v3p/netlib/v3p_f2c_mangle.h:25:9`!(which, "BE", (ftnlencxx . . $ `Modules/ThirdParty/VNL/src/vxl/v3p/netlib/v3p_f2c_mangle.h:60:9`!)2, (ftnlencxx . . $ `Modules/ThirdParty/VNL/src/vxl/v3p/netlib/v3p_f2c_mangle.h:60:9`!)2) == 0) {
893
894 /* %------------------------------------------------% */
895 /* | Sort the "converged" Ritz values in increasing | */
896 /* | order. The "threshold" values are in the | */
897 /* | middle. | */
898 /* %------------------------------------------------% */
899
900 /*< wprime = 'LA' >*/
901 s_copycxx . . $ `Modules/ThirdParty/VNL/src/vxl/v3p/netlib/v3p_f2c_mangle.h:26:9`!(wprime, "LA", (ftnlencxx . . $ `Modules/ThirdParty/VNL/src/vxl/v3p/netlib/v3p_f2c_mangle.h:60:9`!)2, (ftnlencxx . . $ `Modules/ThirdParty/VNL/src/vxl/v3p/netlib/v3p_f2c_mangle.h:60:9`!)2);
902 /*< call dsortr(wprime, .true., nconv, ritz, bounds) >*/
903 dsortr_cxx . . $ `Modules/ThirdParty/VNL/src/vxl/v3p/netlib/v3p_netlib_mangle.h:138:9`!(wprime, &c_truecxx . . $ c_true., &nconv, &ritz[1], &bounds[1], (ftnlencxx . . $ `Modules/ThirdParty/VNL/src/vxl/v3p/netlib/v3p_f2c_mangle.h:60:9`!)2);
904
905 /*< else >*/
906 } else {
907
908 /* %----------------------------------------------% */
909 /* | In LM, SM, LA, SA case, sort the "converged" | */
910 /* | Ritz values according to WHICH so that the | */
911 /* | "threshold" value appears at the front of | */
912 /* | ritz. | */
913 /* %----------------------------------------------% */
914 /*< call dsortr(which, .true., nconv, ritz, bounds) >*/
915 dsortr_cxx . . $ `Modules/ThirdParty/VNL/src/vxl/v3p/netlib/v3p_netlib_mangle.h:138:9`!(which, &c_truecxx . . $ c_true., &nconv, &ritz[1], &bounds[1], (ftnlencxx . . $ `Modules/ThirdParty/VNL/src/vxl/v3p/netlib/v3p_f2c_mangle.h:60:9`!)2);
916
917 /*< end if >*/
918 }
919
920 /* %------------------------------------------% */
921 /* | Use h( 1,1 ) as storage to communicate | */
922 /* | rnorm to _seupd if needed | */
923 /* %------------------------------------------% */
924
925 /*< h(1,1) = rnorm >*/
926 h__[h_dim1 + 1] = rnorm;
927
928 /* if (msglvl .gt. 1) then */
929 /* call dvout (logfil, kplusp, ritz, ndigit, */
930 /* & '_saup2: Sorted Ritz values.') */
931 /* call dvout (logfil, kplusp, bounds, ndigit, */
932 /* & '_saup2: Sorted ritz estimates.') */
933 /* end if */
934
935 /* %------------------------------------% */
936 /* | Max iterations have been exceeded. | */
937 /* %------------------------------------% */
938
939 /*< if (iter .gt. mxiter .and. nconv .lt. nev) info = 1 >*/
940 if (iter > *mxiter && nconv < *nev) {
941 *info = 1;
942 }
943
944 /* %---------------------% */
945 /* | No shifts to apply. | */
946 /* %---------------------% */
947
948 /*< if (np .eq. 0 .and. nconv .lt. nev0) info = 2 >*/
949 if (*np == 0 && nconv < nev0) {
950 *info = 2;
951 }
952
953 /*< np = nconv >*/
954 *np = nconv;
955 /*< go to 1100 >*/
956 goto L1100;
957
958 /*< else if (nconv .lt. nev .and. ishift .eq. 1) then >*/
959 } else if (nconv < *nev && *ishift == 1) {
960
961 /* %---------------------------------------------------% */
962 /* | Do not have all the requested eigenvalues yet. | */
963 /* | To prevent possible stagnation, adjust the number | */
964 /* | of Ritz values and the shifts. | */
965 /* %---------------------------------------------------% */
966
967 /*< nevbef = nev >*/
968 nevbef = *nev;
969 /*< nev = nev + min (nconv, np/2) >*/
970 /* Computing MIN */
971 i__1 = nconv, i__2 = *np / 2;
972 *nev += mincxx . . $ `Modules/ThirdParty/VNL/src/vxl/v3p/netlib/v3p_f2c_original.h:159:9`!(i__1,i__2);
973 /*< if (nev .eq. 1 .and. kplusp .ge. 6) then >*/
974 if (*nev == 1 && kplusp >= 6) {
975 /*< nev = kplusp / 2 >*/
976 *nev = kplusp / 2;
977 /*< else if (nev .eq. 1 .and. kplusp .gt. 2) then >*/
978 } else if (*nev == 1 && kplusp > 2) {
979 /*< nev = 2 >*/
980 *nev = 2;
981 /*< end if >*/
982 }
983 /*< np = kplusp - nev >*/
984 *np = kplusp - *nev;
985
986 /* %---------------------------------------% */
987 /* | If the size of NEV was just increased | */
988 /* | resort the eigenvalues. | */
989 /* %---------------------------------------% */
990
991 /*< >*/
992 if (nevbef < *nev) {
993 dsgets_cxx . . $ `Modules/ThirdParty/VNL/src/vxl/v3p/netlib/v3p_netlib_mangle.h:137:9`!(ishift, which, nev, np, &ritz[1], &bounds[1], &workl[1], (
994 ftnlencxx . . $ `Modules/ThirdParty/VNL/src/vxl/v3p/netlib/v3p_f2c_mangle.h:60:9`!)2);
995 }
996
997 /*< end if >*/
998 }
999
1000 /*< if (msglvl .gt. 0) then >*/
1001 /* if (msglvl > 0) { */
1002 /* call ivout (logfil, 1, nconv, ndigit, */
1003 /* & '_saup2: no. of "converged" Ritz values at this iter.') */
1004 /*< if (msglvl .gt. 1) then >*/
1005 /* if (msglvl > 1) { */
1006 /*< kp(1) = nev >*/
1007 /* kp[0] = *nev; */
1008 /*< kp(2) = np >*/
1009 /* kp[1] = *np; */
1010 /* call ivout (logfil, 2, kp, ndigit, */
1011 /* & '_saup2: NEV and NP are') */
1012 /* call dvout (logfil, nev, ritz(np+1), ndigit, */
1013 /* & '_saup2: "wanted" Ritz values.') */
1014 /* call dvout (logfil, nev, bounds(np+1), ndigit, */
1015 /* & '_saup2: Ritz estimates of the "wanted" values ') */
1016 /*< end if >*/
1017 /* } */
1018 /*< end if >*/
1019 /* } */
1020
1021 /*< if (ishift .eq. 0) then >*/
1022 if (*ishift == 0) {
1023
1024 /* %-----------------------------------------------------% */
1025 /* | User specified shifts: reverse communication to | */
1026 /* | compute the shifts. They are returned in the first | */
1027 /* | NP locations of WORKL. | */
1028 /* %-----------------------------------------------------% */
1029
1030 /*< ushift = .true. >*/
1031 ushift = TRUE_cxx . . $ `Modules/ThirdParty/VNL/src/vxl/v3p/netlib/v3p_f2c_original.h:29:9`!;
1032 /*< ido = 3 >*/
1033 *ido = 3;
1034 /*< go to 9000 >*/
1035 goto L9000;
1036 /*< end if >*/
1037 }
1038
1039 /*< 50 continue >*/
1040 L50:
1041
1042 /* %------------------------------------% */
1043 /* | Back from reverse communication; | */
1044 /* | User specified shifts are returned | */
1045 /* | in WORKL(1:*NP) | */
1046 /* %------------------------------------% */
1047
1048 /*< ushift = .false. >*/
1049 ushift = FALSE_cxx . . $ `Modules/ThirdParty/VNL/src/vxl/v3p/netlib/v3p_f2c_original.h:30:9`!;
1050
1051
1052 /* %---------------------------------------------------------% */
1053 /* | Move the NP shifts to the first NP locations of RITZ to | */
1054 /* | free up WORKL. This is for the non-exact shift case; | */
1055 /* | in the exact shift case, dsgets already handles this. | */
1056 /* %---------------------------------------------------------% */
1057
1058 /*< if (ishift .eq. 0) call dcopy (np, workl, 1, ritz, 1) >*/
1059 if (*ishift == 0) {
1060 dcopy_cxx . . $ `Modules/ThirdParty/VNL/src/vxl/v3p/netlib/v3p_netlib_mangle.h:40:9`!(np, &workl[1], &c__1cxx . . $ c__1., &ritz[1], &c__1cxx . . $ c__1.);
1061 }
1062
1063 /* if (msglvl .gt. 2) then */
1064 /* call ivout (logfil, 1, np, ndigit, */
1065 /* & '_saup2: The number of shifts to apply ') */
1066 /* call dvout (logfil, np, workl, ndigit, */
1067 /* & '_saup2: shifts selected') */
1068 /* if (ishift .eq. 1) then */
1069 /* call dvout (logfil, np, bounds, ndigit, */
1070 /* & '_saup2: corresponding Ritz estimates') */
1071 /* end if */
1072 /* end if */
1073
1074 /* %---------------------------------------------------------% */
1075 /* | Apply the NP0 implicit shifts by QR bulge chasing. | */
1076 /* | Each shift is applied to the entire tridiagonal matrix. | */
1077 /* | The first 2*N locations of WORKD are used as workspace. | */
1078 /* | After dsapps is done, we have a Lanczos | */
1079 /* | factorization of length NEV. | */
1080 /* %---------------------------------------------------------% */
1081
1082 /*< >*/
1083 dsapps_cxx . . $ `Modules/ThirdParty/VNL/src/vxl/v3p/netlib/v3p_netlib_mangle.h:129:9`!(n, nev, np, &ritz[1], &v[v_offset], ldv, &h__[h_offset], ldh, &
1084 resid[1], &q[q_offset], ldq, &workd[1]);
1085
1086 /* %---------------------------------------------% */
1087 /* | Compute the B-norm of the updated residual. | */
1088 /* | Keep B*RESID in WORKD(1:N) to be used in | */
1089 /* | the first step of the next call to dsaitr. | */
1090 /* %---------------------------------------------% */
1091
1092 /*< cnorm = .true. >*/
1093 cnorm = TRUE_cxx . . $ `Modules/ThirdParty/VNL/src/vxl/v3p/netlib/v3p_f2c_original.h:29:9`!;
1094 /*< call second (t2) >*/
1095 /* second_(&t2); */
1096 /*< if (bmat .eq. 'G') then >*/
1097 if (*(unsigned char *)bmat == 'G') {
1098 /*< nbx = nbx + 1 >*/
1099 /* ++timing_1.nbx; */
1100 /*< call dcopy (n, resid, 1, workd(n+1), 1) >*/
1101 dcopy_cxx . . $ `Modules/ThirdParty/VNL/src/vxl/v3p/netlib/v3p_netlib_mangle.h:40:9`!(n, &resid[1], &c__1cxx . . $ c__1., &workd[*n + 1], &c__1cxx . . $ c__1.);
1102 /*< ipntr(1) = n + 1 >*/
1103 ipntr[1] = *n + 1;
1104 /*< ipntr(2) = 1 >*/
1105 ipntr[2] = 1;
1106 /*< ido = 2 >*/
1107 *ido = 2;
1108
1109 /* %----------------------------------% */
1110 /* | Exit in order to compute B*RESID | */
1111 /* %----------------------------------% */
1112
1113 /*< go to 9000 >*/
1114 goto L9000;
1115 /*< else if (bmat .eq. 'I') then >*/
1116 } else if (*(unsigned char *)bmat == 'I') {
1117 /*< call dcopy (n, resid, 1, workd, 1) >*/
1118 dcopy_cxx . . $ `Modules/ThirdParty/VNL/src/vxl/v3p/netlib/v3p_netlib_mangle.h:40:9`!(n, &resid[1], &c__1cxx . . $ c__1., &workd[1], &c__1cxx . . $ c__1.);
1119 /*< end if >*/
1120 }
1121
1122 /*< 100 continue >*/
1123 L100:
1124
1125 /* %----------------------------------% */
1126 /* | Back from reverse communication; | */
1127 /* | WORKD(1:N) := B*RESID | */
1128 /* %----------------------------------% */
1129
1130 /*< if (bmat .eq. 'G') then >*/
1131 if (*(unsigned char *)bmat == 'G') {
1132 /*< call second (t3) >*/
1133 /* second_(&t3); */
1134 /*< tmvbx = tmvbx + (t3 - t2) >*/
1135 /* timing_1.tmvbx += t3 - t2; */
1136 /*< end if >*/
1137 }
1138
1139 /*< if (bmat .eq. 'G') then >*/
1140 if (*(unsigned char *)bmat == 'G') {
1141 /*< rnorm = ddot (n, resid, 1, workd, 1) >*/
1142 rnorm = ddot_cxx . . $ `Modules/ThirdParty/VNL/src/vxl/v3p/netlib/v3p_netlib_mangle.h:43:9`!(n, &resid[1], &c__1cxx . . $ c__1., &workd[1], &c__1cxx . . $ c__1.);
1143 /*< rnorm = sqrt(abs(rnorm)) >*/
1144 rnorm = sqrtcxx . . $ sqrt(447c67c6676f75c3).((abscxx . . $ `Modules/ThirdParty/VNL/src/vxl/v3p/netlib/v3p_f2c_original.h:157:9`!(rnorm)));
1145 /*< else if (bmat .eq. 'I') then >*/
1146 } else if (*(unsigned char *)bmat == 'I') {
1147 /*< rnorm = dnrm2(n, resid, 1) >*/
1148 rnorm = dnrm2_cxx . . $ `Modules/ThirdParty/VNL/src/vxl/v3p/netlib/v3p_netlib_mangle.h:108:9`!(n, &resid[1], &c__1cxx . . $ c__1.);
1149 /*< end if >*/
1150 }
1151 /*< cnorm = .false. >*/
1152 cnorm = FALSE_cxx . . $ `Modules/ThirdParty/VNL/src/vxl/v3p/netlib/v3p_f2c_original.h:30:9`!;
1153 /*< 130 continue >*/
1154 /* L130: */
1155
1156 /* if (msglvl .gt. 2) then */
1157 /* call dvout (logfil, 1, rnorm, ndigit, */
1158 /* & '_saup2: B-norm of residual for NEV factorization') */
1159 /* call dvout (logfil, nev, h(1,2), ndigit, */
1160 /* & '_saup2: main diagonal of compressed H matrix') */
1161 /* call dvout (logfil, nev-1, h(2,1), ndigit, */
1162 /* & '_saup2: subdiagonal of compressed H matrix') */
1163 /* end if */
1164
1165 /*< go to 1000 >*/
1166 goto L1000;
1167
1168 /* %---------------------------------------------------------------% */
1169 /* | | */
1170 /* | E N D O F M A I N I T E R A T I O N L O O P | */
1171 /* | | */
1172 /* %---------------------------------------------------------------% */
1173
1174 /*< 1100 continue >*/
1175 L1100:
1176
1177 /*< mxiter = iter >*/
1178 *mxiter = iter;
1179 /*< nev = nconv >*/
1180 *nev = nconv;
1181
1182 /*< 1200 continue >*/
1183 L1200:
1184 /*< ido = 99 >*/
1185 *ido = 99;
1186
1187 /* %------------% */
1188 /* | Error exit | */
1189 /* %------------% */
1190
1191 /*< call second (t1) >*/
1192 /* second_(&t1); */
1193 /*< tsaup2 = t1 - t0 >*/
1194 /* timing_1.tsaup2 = t1 - t0; */
1195
1196 /*< 9000 continue >*/
1197 L9000:
1198 /*< return >*/
1199 return 0;
1200
1201 /* %---------------% */
1202 /* | End of dsaup2 | */
1203 /* %---------------% */
1204
1205 /*< end >*/
1206 } /* dsaup2_ */
1207
1208 #ifdef __cplusplus
1209 }
1210 #endif