1
/* -- translated by f2c (version 20050501).
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
8
Source for libf2c is in /netlib/f2c/libf2c.zip, e.g.,
10
http://www.netlib.org/f2c/libf2c.zip
14
#include "arpack_internal.h"
17
/* Common Block Declarations */
20
/* integer logfil, ndigit, mgetv0, msaupd, msaup2, msaitr, mseigt, msapps, */
21
/* msgets, mseupd, mnaupd, mnaup2, mnaitr, mneigh, mnapps, mngets, */
22
/* mneupd, mcaupd, mcaup2, mcaitr, mceigh, mcapps, mcgets, mceupd; */
25
/* #define debug_1 debug_ */
28
integer nopx, nbx, nrorth, nitref, nrstrt;
29
real tsaupd, tsaup2, tsaitr, tseigt, tsgets, tsapps, tsconv, tnaupd,
30
tnaup2, tnaitr, tneigh, tngets, tnapps, tnconv, tcaupd, tcaup2,
31
tcaitr, tceigh, tcgets, tcapps, tcconv, tmvopx, tmvbx, tgetv0,
35
#define timing_1 timing_
37
/* Table of constant values */
39
static doublereal c_b3 = .66666666666666663;
41
/* ----------------------------------------------------------------------- */
47
/* Convergence testing for the symmetric Arnoldi eigenvalue routine. */
51
/* ( N, RITZ, BOUNDS, TOL, NCONV ) */
54
/* N Integer. (INPUT) */
55
/* Number of Ritz values to check for convergence. */
57
/* RITZ Double precision array of length N. (INPUT) */
58
/* The Ritz values to be checked for convergence. */
60
/* BOUNDS Double precision array of length N. (INPUT) */
61
/* Ritz estimates associated with the Ritz values in RITZ. */
63
/* TOL Double precision scalar. (INPUT) */
64
/* Desired relative accuracy for a Ritz value to be considered */
67
/* NCONV Integer scalar. (OUTPUT) */
68
/* Number of "converged" Ritz values. */
72
/* ----------------------------------------------------------------------- */
76
/* \Routines called: */
77
/* second ARPACK utility routine for timing. */
78
/* dlamch LAPACK routine that determines machine constants. */
81
/* Danny Sorensen Phuong Vu */
82
/* Richard Lehoucq CRPC / Rice University */
83
/* Dept. of Computational & Houston, Texas */
84
/* Applied Mathematics */
88
/* \SCCS Information: @(#) */
89
/* FILE: sconv.F SID: 2.4 DATE OF SID: 4/19/96 RELEASE: 2 */
92
/* 1. Starting with version 2.4, this routine no longer uses the */
93
/* Parlett strategy using the gap conditions. */
97
/* ----------------------------------------------------------------------- */
99
/* Subroutine */ int igraphdsconv_(integer *n, doublereal *ritz, doublereal *
100
bounds, doublereal *tol, integer *nconv)
102
/* System generated locals */
104
doublereal d__1, d__2, d__3;
106
/* Builtin functions */
107
double igraphpow_dd(doublereal *, doublereal *);
109
/* Local variables */
112
static doublereal eps23, temp;
113
extern doublereal igraphdlamch_(char *);
114
extern /* Subroutine */ int igraphsecond_(real *);
117
/* %----------------------------------------------------% */
118
/* | Include files for debugging and timing information | */
119
/* %----------------------------------------------------% */
122
/* \SCCS Information: @(#) */
123
/* FILE: debug.h SID: 2.3 DATE OF SID: 11/16/95 RELEASE: 2 */
125
/* %---------------------------------% */
126
/* | See debug.doc for documentation | */
127
/* %---------------------------------% */
129
/* %------------------% */
130
/* | Scalar Arguments | */
131
/* %------------------% */
133
/* %--------------------------------% */
134
/* | See stat.doc for documentation | */
135
/* %--------------------------------% */
137
/* \SCCS Information: @(#) */
138
/* FILE: stat.h SID: 2.2 DATE OF SID: 11/16/95 RELEASE: 2 */
142
/* %-----------------% */
143
/* | Array Arguments | */
144
/* %-----------------% */
147
/* %---------------% */
148
/* | Local Scalars | */
149
/* %---------------% */
152
/* %-------------------% */
153
/* | External routines | */
154
/* %-------------------% */
156
/* %---------------------% */
157
/* | Intrinsic Functions | */
158
/* %---------------------% */
161
/* %-----------------------% */
162
/* | Executable Statements | */
163
/* %-----------------------% */
165
/* Parameter adjustments */
172
eps23 = igraphdlamch_("Epsilon-Machine");
173
eps23 = igraphpow_dd(&eps23, &c_b3);
177
for (i__ = 1; i__ <= i__1; ++i__) {
179
/* %-----------------------------------------------------% */
180
/* | The i-th Ritz value is considered "converged" | */
181
/* | when: bounds(i) .le. TOL*max(eps23, abs(ritz(i))) | */
182
/* %-----------------------------------------------------% */
185
d__2 = eps23, d__3 = (d__1 = ritz[i__], abs(d__1));
186
temp = max(d__2,d__3);
187
if (bounds[i__] <= *tol * temp) {
195
timing_1.tsconv += t1 - t0;
199
/* %---------------% */
200
/* | End of dsconv | */
201
/* %---------------% */
203
} /* igraphdsconv_ */