| 1 |
/* ./src_f77/scgchk.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 scgchk_(integer *ipar, real *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,e12.5)"; |
| 19 |
static char fmt_11[] = "(\002 ERROR IN SCGCHK: N .LE. 0\002,/)"; |
| 20 |
static char fmt_12[] = "(/,\002 WARNING IN SCGCHK: ITMAX .LE. 0\002,/)"; |
| 21 |
static char fmt_13[] = "(/,\002 WARNING IN SCGCHK: ICYCLE < 0 .OR. ICYCL" |
| 22 |
"E > ITMAX\002,/)"; |
| 23 |
static char fmt_14[] = "(/,\002 WARNING IN SCGCHK: NCE .LT. 0; SET TO " |
| 24 |
"0\002,/)"; |
| 25 |
static char fmt_15[] = "(/,\002 WARNING IN SCGCHK: 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 r1mach_(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 SCGCHK */ |
| 46 |
/* ***REFER TO SCG,SCR,SPCG,SCGNR,SCGNE,SPCGNR,SPCGNE,SPPCG,SPCGCA */ |
| 47 |
/* ***ROUTINES CALLED R1MACH */ |
| 48 |
/* ***REVISION DATE 860901 (YYMMDD) */ |
| 49 |
/* ***END PROLOGUE SCGCHK */ |
| 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 |
/* CCCCCIMPLICIT DOUBLE PRECISION(A-H,O-Z) */ |
| 58 |
|
| 59 |
/* ***FIRST EXECUTABLE STATEMENT SCGCHK */ |
| 60 |
/* Parameter adjustments */ |
| 61 |
--rpar; |
| 62 |
--ipar; |
| 63 |
|
| 64 |
/* Function Body */ |
| 65 |
/* L1: */ |
| 66 |
|
| 67 |
/* *** OUTPUT THE PARAMETERS *** */ |
| 68 |
iounit = ipar[5]; |
| 69 |
if (iounit <= 0) { |
| 70 |
goto L10; |
| 71 |
} |
| 72 |
io___2.ciunit = iounit; |
| 73 |
s_wsfe(&io___2); |
| 74 |
do_fio(&c__1, (char *)&(*n), (ftnlen)sizeof(integer)); |
| 75 |
do_fio(&c__1, (char *)&ipar[9], (ftnlen)sizeof(integer)); |
| 76 |
do_fio(&c__1, (char *)&ipar[31], (ftnlen)sizeof(integer)); |
| 77 |
do_fio(&c__1, (char *)&ipar[32], (ftnlen)sizeof(integer)); |
| 78 |
do_fio(&c__1, (char *)&rpar[1], (ftnlen)sizeof(real)); |
| 79 |
e_wsfe(); |
| 80 |
|
| 81 |
/* *** CHECK THE PARAMETERS *** */ |
| 82 |
L10: |
| 83 |
if (*n <= 0) { |
| 84 |
io___3.ciunit = iounit; |
| 85 |
s_wsfe(&io___3); |
| 86 |
e_wsfe(); |
| 87 |
s_stop("", (ftnlen)0); |
| 88 |
} |
| 89 |
|
| 90 |
if (ipar[9] <= 0) { |
| 91 |
io___4.ciunit = iounit; |
| 92 |
s_wsfe(&io___4); |
| 93 |
e_wsfe(); |
| 94 |
} |
| 95 |
|
| 96 |
if (ipar[31] < 0 || ipar[31] > ipar[9]) { |
| 97 |
io___5.ciunit = iounit; |
| 98 |
s_wsfe(&io___5); |
| 99 |
e_wsfe(); |
| 100 |
} |
| 101 |
|
| 102 |
if (ipar[32] < 0) { |
| 103 |
io___6.ciunit = iounit; |
| 104 |
s_wsfe(&io___6); |
| 105 |
e_wsfe(); |
| 106 |
ipar[32] = 0; |
| 107 |
} |
| 108 |
|
| 109 |
if (rpar[1] <= r1mach_(&c__4)) { |
| 110 |
io___7.ciunit = iounit; |
| 111 |
s_wsfe(&io___7); |
| 112 |
e_wsfe(); |
| 113 |
} |
| 114 |
|
| 115 |
return 0; |
| 116 |
} /* scgchk_ */ |
| 117 |
|