Debian Codegraph @

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

raw symbols SCIP
1 /* arpack/dseigt.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 integercxx . . $ `Modules/ThirdParty/VNL/src/vxl/v3p/netlib/v3p_f2c_mangle.h:63:9`! c__1cxx . . $ c__1. = 1;
41
42 /* ----------------------------------------------------------------------- */
43 /* \BeginDoc */
44
45 /* \Name: dseigt */
46
47 /* \Description: */
48 /* Compute the eigenvalues of the current symmetric tridiagonal matrix */
49 /* and the corresponding error bounds given the current residual norm. */
50
51 /* \Usage: */
52 /* call dseigt */
53 /* ( RNORM, N, H, LDH, EIG, BOUNDS, WORKL, IERR ) */
54
55 /* \Arguments */
56 /* RNORM Double precision scalar. (INPUT) */
57 /* RNORM contains the residual norm corresponding to the current */
58 /* symmetric tridiagonal matrix H. */
59
60 /* N Integer. (INPUT) */
61 /* Size of the symmetric tridiagonal matrix H. */
62
63 /* H Double precision N by 2 array. (INPUT) */
64 /* H contains the symmetric tridiagonal matrix with the */
65 /* subdiagonal in the first column starting at H(2,1) and the */
66 /* main diagonal in second column. */
67
68 /* LDH Integer. (INPUT) */
69 /* Leading dimension of H exactly as declared in the calling */
70 /* program. */
71
72 /* EIG Double precision array of length N. (OUTPUT) */
73 /* On output, EIG contains the N eigenvalues of H possibly */
74 /* unsorted. The BOUNDS arrays are returned in the */
75 /* same sorted order as EIG. */
76
77 /* BOUNDS Double precision array of length N. (OUTPUT) */
78 /* On output, BOUNDS contains the error estimates corresponding */
79 /* to the eigenvalues EIG. This is equal to RNORM times the */
80 /* last components of the eigenvectors corresponding to the */
81 /* eigenvalues in EIG. */
82
83 /* WORKL Double precision work array of length 3*N. (WORKSPACE) */
84 /* Private (replicated) array on each PE or array allocated on */
85 /* the front end. */
86
87 /* IERR Integer. (OUTPUT) */
88 /* Error exit flag from dstqrb. */
89
90 /* \EndDoc */
91
92 /* ----------------------------------------------------------------------- */
93
94 /* \BeginLib */
95
96 /* \Local variables: */
97 /* xxxxxx real */
98
99 /* \Routines called: */
100 /* dstqrb ARPACK routine that computes the eigenvalues and the */
101 /* last components of the eigenvectors of a symmetric */
102 /* and tridiagonal matrix. */
103 /* second ARPACK utility routine for timing. */
104 /* dcopy Level 1 BLAS that copies one vector to another. */
105
106 /* \Author */
107 /* Danny Sorensen Phuong Vu */
108 /* Richard Lehoucq CRPC / Rice University */
109 /* Dept. of Computational & Houston, Texas */
110 /* Applied Mathematics */
111 /* Rice University */
112 /* Houston, Texas */
113
114 /* \Revision history: */
115 /* xx/xx/92: Version ' 2.4' */
116
117 /* \SCCS Information: @(#) */
118 /* FILE: seigt.F SID: 2.4 DATE OF SID: 8/27/96 RELEASE: 2 */
119
120 /* \Remarks */
121 /* None */
122
123 /* \EndLib */
124
125 /* ----------------------------------------------------------------------- */
126
127 /*< >*/
128 /* Subroutine */ int 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`! *rnorm, integercxx . . $ `Modules/ThirdParty/VNL/src/vxl/v3p/netlib/v3p_f2c_mangle.h:63:9`! *n, doublerealcxx . . $ `Modules/ThirdParty/VNL/src/vxl/v3p/netlib/v3p_f2c_mangle.h:57:9`! *h__,
129 integercxx . . $ `Modules/ThirdParty/VNL/src/vxl/v3p/netlib/v3p_f2c_mangle.h:63:9`! *ldh, doublerealcxx . . $ `Modules/ThirdParty/VNL/src/vxl/v3p/netlib/v3p_f2c_mangle.h:57:9`! *eig, 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`! *workl,
130 integercxx . . $ `Modules/ThirdParty/VNL/src/vxl/v3p/netlib/v3p_f2c_mangle.h:63:9`! *ierr)
131 {
132 /* System generated locals */
133 integercxx . . $ `Modules/ThirdParty/VNL/src/vxl/v3p/netlib/v3p_f2c_mangle.h:63:9`! h_dim1, h_offset, i__1;
134 doublerealcxx . . $ `Modules/ThirdParty/VNL/src/vxl/v3p/netlib/v3p_f2c_mangle.h:57:9`! d__1;
135
136 /* Local variables */
137 integercxx . . $ `Modules/ThirdParty/VNL/src/vxl/v3p/netlib/v3p_f2c_mangle.h:63:9`! k;
138 /* static real t0, t1; */
139 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`! *,
140 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`! *), 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`! *);
141 /* integer msglvl; */
142 extern /* Subroutine */ int dstqrb_cxx . . $ `Modules/ThirdParty/VNL/src/vxl/v3p/netlib/v3p_netlib_mangle.h:144: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`! *,
143 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`! *, integercxx . . $ `Modules/ThirdParty/VNL/src/vxl/v3p/netlib/v3p_f2c_mangle.h:63:9`! *);
144
145
146 /* %----------------------------------------------------% */
147 /* | Include files for debugging and timing information | */
148 /* %----------------------------------------------------% */
149
150 /*< include 'debug.h' >*/
151 /*< include 'stat.h' >*/
152
153 /* \SCCS Information: @(#) */
154 /* FILE: debug.h SID: 2.3 DATE OF SID: 11/16/95 RELEASE: 2 */
155
156 /* %---------------------------------% */
157 /* | See debug.doc for documentation | */
158 /* %---------------------------------% */
159 /*< >*/
160 /*< integer ierr, ldh, n >*/
161
162 /* %------------------% */
163 /* | Scalar Arguments | */
164 /* %------------------% */
165
166 /* %--------------------------------% */
167 /* | See stat.doc for documentation | */
168 /* %--------------------------------% */
169
170 /* \SCCS Information: @(#) */
171 /* FILE: stat.h SID: 2.2 DATE OF SID: 11/16/95 RELEASE: 2 */
172
173 /*< save t0, t1, t2, t3, t4, t5 >*/
174
175 /*< integer nopx, nbx, nrorth, nitref, nrstrt >*/
176 /*< >*/
177 /*< >*/
178 /*< >*/
179
180 /* %-----------------% */
181 /* | Array Arguments | */
182 /* %-----------------% */
183
184 /*< >*/
185
186 /* %------------% */
187 /* | Parameters | */
188 /* %------------% */
189
190 /*< >*/
191 /*< parameter (zero = 0.0D+0) >*/
192
193 /* %---------------% */
194 /* | Local Scalars | */
195 /* %---------------% */
196
197 /*< integer i, k, msglvl >*/
198
199 /* %----------------------% */
200 /* | External Subroutines | */
201 /* %----------------------% */
202
203 /*< external dcopy, dstqrb, second >*/
204
205 /* %-----------------------% */
206 /* | Executable Statements | */
207 /* %-----------------------% */
208
209 /* %-------------------------------% */
210 /* | Initialize timing statistics | */
211 /* | & message level for debugging | */
212 /* %-------------------------------% */
213
214 /*< call second (t0) >*/
215 /* Parameter adjustments */
216 --workl;
217 --bounds;
218 --eig;
219 h_dim1 = *ldh;
220 h_offset = 1 + h_dim1;
221 h__ -= h_offset;
222
223 /* Function Body */
224 /* second_(&t0); */
225 /*< msglvl = mseigt >*/
226 /* msglvl = debug_1.mseigt; */
227
228 /* if (msglvl .gt. 0) then */
229 /* call dvout (logfil, n, h(1,2), ndigit, */
230 /* & '_seigt: main diagonal of matrix H') */
231 /* if (n .gt. 1) then */
232 /* call dvout (logfil, n-1, h(2,1), ndigit, */
233 /* & '_seigt: sub diagonal of matrix H') */
234 /* end if */
235 /* end if */
236
237 /*< call dcopy (n, h(1,2), 1, eig, 1) >*/
238 dcopy_cxx . . $ `Modules/ThirdParty/VNL/src/vxl/v3p/netlib/v3p_netlib_mangle.h:40:9`!(n, &h__[(h_dim1 << 1) + 1], &c__1cxx . . $ c__1., &eig[1], &c__1cxx . . $ c__1.);
239 /*< call dcopy (n-1, h(2,1), 1, workl, 1) >*/
240 i__1 = *n - 1;
241 dcopy_cxx . . $ `Modules/ThirdParty/VNL/src/vxl/v3p/netlib/v3p_netlib_mangle.h:40:9`!(&i__1, &h__[h_dim1 + 2], &c__1cxx . . $ c__1., &workl[1], &c__1cxx . . $ c__1.);
242 /*< call dstqrb (n, eig, workl, bounds, workl(n+1), ierr) >*/
243 dstqrb_cxx . . $ `Modules/ThirdParty/VNL/src/vxl/v3p/netlib/v3p_netlib_mangle.h:144:9`!(n, &eig[1], &workl[1], &bounds[1], &workl[*n + 1], ierr);
244 /*< if (ierr .ne. 0) go to 9000 >*/
245 if (*ierr != 0) {
246 goto L9000;
247 }
248 /* if (msglvl .gt. 1) then */
249 /* call dvout (logfil, n, bounds, ndigit, */
250 /* & '_seigt: last row of the eigenvector matrix for H') */
251 /* end if */
252
253 /* %-----------------------------------------------% */
254 /* | Finally determine the error bounds associated | */
255 /* | with the n Ritz values of H. | */
256 /* %-----------------------------------------------% */
257
258 /*< do 30 k = 1, n >*/
259 i__1 = *n;
260 for (k = 1; k <= i__1; ++k) {
261 /*< bounds(k) = rnorm*abs(bounds(k)) >*/
262 bounds[k] = *rnorm * (d__1 = bounds[k], abscxx . . $ `Modules/ThirdParty/VNL/src/vxl/v3p/netlib/v3p_f2c_original.h:157:9`!(d__1));
263 /*< 30 continue >*/
264 /* L30: */
265 }
266
267 /*< call second (t1) >*/
268 /* second_(&t1); */
269 /*< tseigt = tseigt + (t1 - t0) >*/
270 /* timing_1.tseigt += t1 - t0; */
271
272 /*< 9000 continue >*/
273 L9000:
274 /*< return >*/
275 return 0;
276
277 /* %---------------% */
278 /* | End of dseigt | */
279 /* %---------------% */
280
281 /*< end >*/
282 } /* dseigt_ */
283
284 #ifdef __cplusplus
285 }
286 #endif