Debian Codegraph @

debian/external_deps/fetk/punc/src/cgcode/dcgchk.c

raw
1 /* ./src_f77/dcgchk.f -- translated by f2c (version 20030320).
2 You must link the resulting object file with the libraries:
3 -lf2c -lm (in that order)
4 */
5
6 #include <punc/vf2c.h>
7
8 /* Table of constant values */
9
10 static integer c__1 = 1;
11 static integer c__4 = 4;
12
13 /* Subroutine */ int dcgchk_(integer *ipar, doublereal *rpar, integer *n)
14 {
15 /* Format strings */
16 static char fmt_5[] = "(\002 THE ITERATION PARAMETERS ARE \002,/,4x,\002"
17 "N = \002,i5,/,4x,\002ITMAX = \002,i5,/,4x,\002ICYCLE = "
18 "\002,i5,/,4x,\002NCE = \002,i5,/,4x,\002ERRTOL = \002,d12.5)";
19 static char fmt_11[] = "(\002 ERROR IN DCGCHK: N .LE. 0\002,/)";
20 static char fmt_12[] = "(/,\002 WARNING IN DCGCHK: ITMAX .LE. 0\002,/)";
21 static char fmt_13[] = "(/,\002 WARNING IN DCGCHK: ICYCLE < 0 .OR. ICYCL"
22 "E > ITMAX\002,/)";
23 static char fmt_14[] = "(/,\002 WARNING IN DCGCHK: NCE .LT. 0; SET TO "
24 "0\002,/)";
25 static char fmt_15[] = "(/,\002 WARNING IN DCGCHK: ERRTOL .LE. MACHINE E"
26 "PSILON\002,/)";
27
28 /* Builtin functions */
29 integer s_wsfe(cilist *), do_fio(integer *, char *, ftnlen), e_wsfe(void);
30 /* Subroutine */ int s_stop(char *, ftnlen);
31
32 /* Local variables */
33 extern doublereal d1mach_(integer *);
34 static integer iounit;
35
36 /* Fortran I/O blocks */
37 static cilist io___2 = { 0, 0, 0, fmt_5, 0 };
38 static cilist io___3 = { 0, 0, 0, fmt_11, 0 };
39 static cilist io___4 = { 0, 0, 0, fmt_12, 0 };
40 static cilist io___5 = { 0, 0, 0, fmt_13, 0 };
41 static cilist io___6 = { 0, 0, 0, fmt_14, 0 };
42 static cilist io___7 = { 0, 0, 0, fmt_15, 0 };
43
44
45 /* ***BEGIN PROLOGUE DCGCHK */
46 /* ***REFER TO DCG,DCR,DPCG,DCGNR,DCGNE,DPCGNR,DPCGNE,DPPCG,DPCGCA */
47 /* ***ROUTINES CALLED D1MACH */
48 /* ***REVISION DATE 860901 (YYMMDD) */
49 /* ***END PROLOGUE DCGCHK */
50
51 /* THIS ROUTINE OUTPUTS THE INPUT PARAMETERS, AND THEN CHECKS THEIR */
52 /* VALIDITY. IF AN INVALID PARAMETER IS FOUND, AN ERROR MESSAGE IS */
53 /* PRINTED AND THE CODE STOPPED. IF AN UNUSUAL PARAMETER ASSIGNMENT */
54 /* IS FOUND, A WARNING MESSAGE IS PRINTED, BUT THE CODE CONTINUES. */
55
56 /* *** DECLARATIONS *** */
57
58 /* ***FIRST EXECUTABLE STATEMENT DCGCHK */
59 /* Parameter adjustments */
60 --rpar;
61 --ipar;
62
63 /* Function Body */
64 /* L1: */
65
66 /* *** OUTPUT THE PARAMETERS *** */
67 iounit = ipar[5];
68 if (iounit <= 0) {
69 goto L10;
70 }
71 io___2.ciunit = iounit;
72 s_wsfe(&io___2);
73 do_fio(&c__1, (char *)&(*n), (ftnlen)sizeof(integer));
74 do_fio(&c__1, (char *)&ipar[9], (ftnlen)sizeof(integer));
75 do_fio(&c__1, (char *)&ipar[31], (ftnlen)sizeof(integer));
76 do_fio(&c__1, (char *)&ipar[32], (ftnlen)sizeof(integer));
77 do_fio(&c__1, (char *)&rpar[1], (ftnlen)sizeof(doublereal));
78 e_wsfe();
79
80 /* *** CHECK THE PARAMETERS *** */
81 L10:
82 if (*n <= 0) {
83 io___3.ciunit = iounit;
84 s_wsfe(&io___3);
85 e_wsfe();
86 s_stop("", (ftnlen)0);
87 }
88
89 if (ipar[9] <= 0) {
90 io___4.ciunit = iounit;
91 s_wsfe(&io___4);
92 e_wsfe();
93 }
94
95 if (ipar[31] < 0 || ipar[31] > ipar[9]) {
96 io___5.ciunit = iounit;
97 s_wsfe(&io___5);
98 e_wsfe();
99 }
100
101 if (ipar[32] < 0) {
102 io___6.ciunit = iounit;
103 s_wsfe(&io___6);
104 e_wsfe();
105 ipar[32] = 0;
106 }
107
108 if (rpar[1] <= d1mach_(&c__4)) {
109 io___7.ciunit = iounit;
110 s_wsfe(&io___7);
111 e_wsfe();
112 }
113
114 return 0;
115 } /* dcgchk_ */
116