1 C MAIN PROGRAM TO TEST FIXPNF, FIXPQF, AND FIXPDF
2 C BROWN'S FUNCTION, ZERO FINDING.
4 C THIS PROGRAM TESTS THE HOMPACK ROUTINES FIXPNF, FIXPQF, AND
5 C FIXPDF. THE USER MAY INSERT CALLS TO A SYSTEM TIMER AT THE
6 C DESIGNATED LOCATIONS IN ORDER TO GET EXECUTION TIME FOR THESE
9 C THE MODIFICATIONS TO BE MADE FOR THE SYSTEM TIMER ARE INDICATED
10 C BY A LINE OF M'S, E.G.
11 CMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMM
14 C THE OUTPUT FROM THIS ROUTINE SHOULD BE AS FOLLOWS, WITH THE
15 C EXECUTION TIMES CORRESPONDING TO A VAX 11/785.
19 C LAMBDA = 1.00000000 FLAG = 1 6 JACOBIAN EVALUATIONS
20 C EXECUTION TIME(SECS) = 0.44 ARCLEN = 2.693
21 C 1.00000000E+00 1.00000000E+00 1.00000000E+00
22 C 1.00000000E+00 1.00000000E+00
26 C LAMBDA = 1.00000000 FLAG = 1 22 JACOBIAN EVALUATIONS
27 C EXECUTION TIME(SECS) = 0.19 ARCLEN = 2.682
28 C 1.00000000E+00 1.00000000E+00 1.00000000E+00
29 C 1.00000000E+00 1.00000000E+00
33 C LAMBDA = 1.00000000 FLAG = 1 71 JACOBIAN EVALUATIONS
34 C EXECUTION TIME(SECS) = 0.57 ARCLEN = 2.712
35 C 1.00000000E+00 1.00000000E+00 1.00000000E+00
36 C 1.00000000E+00 1.00000000E+00
41 IMPLICIT DOUBLE PRECISION (A
-H
,O
-Z
)
42 DOUBLE PRECISION WT
(101),PHI
(101,16),P
(101)
43 DOUBLE PRECISION ARCLEN
,QT
(101,101),R
(101*52),F0
(101)
44 DOUBLE PRECISION F1
(101),DZ
(101),T
(101)
45 DOUBLE PRECISION Y
(101),W
(101),WP
(101),Z0
(101),Z1
(101),
46 + YP
(101),YOLD
(101),YPOLD
(101),A
(100),QR
(101,102),
47 + ALPHA
(100),TZ
(101),SSPAR
(8),YSAV
(101),PAR
(1)
48 INTEGER PIVOT
(101),CODE
,TIME
,IPAR
(1),N
,NDIMA
,NFE
,TRACE
,
54 C TEST EACH OF THE THREE ALGORITHMS.
58 C INITIALIZE TIMER VARIABLES.
64 C DEFINE ARGUMENTS FOR CALL TO HOMPACK PROCEDURE.
79 CMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMM
81 C INSERT CALL TO INITIALIZE SYSTEM TIMER HERE. FOR EXAMPLE, FOR
82 C THE VAX, THE FOLLOWING STATEMENT IS USED.
86 CMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMM
88 C CALL TO HOMPACK ROUTINE.
92 CALL FIXPQF
(N
,Y
,IFLAG
,ARCRE
,ARCAE
,ANSRE
,ANSAE
,TRACE
,A
,NFE
,
93 + ARCLEN
,YP
,YOLD
,YPOLD
,QT
,R
,F0
,F1
,Z0
,DZ
,W
,T
,YSAV
,
95 ELSE IF (II
.EQ
. 2) THEN
97 CALL FIXPNF
(N
,Y
,IFLAG
,ARCRE
,ARCAE
,ANSRE
,ANSAE
,TRACE
,A
,NFE
,
98 + ARCLEN
,YP
,YOLD
,YPOLD
,QR
,ALPHA
,TZ
,PIVOT
,W
,WP
,Z0
,Z1
,
102 CALL FIXPDF
(N
,Y
,IFLAG
,ARCRE
,ANSRE
,TRACE
,A
,NDIMA
,NFE
,
103 + ARCLEN
,YP
,YPOLD
,QR
,ALPHA
,TZ
,PIVOT
,WT
,PHI
,P
,PAR
,IPAR
)
106 CMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMM
108 C INSERT CALL TO RETURN EXECUTION TIME IN SECONDS IN DTIME.
109 C FOR EXAMPLE, THE VAX STATEMENTS ARE AS FOLLOWS.
110 C CALL LIB$STAT_TIMER(CODE,TIME)
113 CMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMM
116 45 FORMAT (//,8X
,'TESTING',1X
,6A
)
117 WRITE (6,50) Y
(1),IFLAG
,NFE
,DTIME
,ARCLEN
,(Y
(J
),J
=2,NP1
)
118 50 FORMAT(//' LAMBDA =',F11
.8
,' FLAG =',I2
,I8
,' JACOBIAN ',
119 + 'EVALUATIONS',/,1X
,'EXECUTION TIME(SECS) =',F10
.2
,4X
,
120 + 'ARCLEN =',F10
.3
/(1X
,1P
,3E16
.8
))
125 C********************************************************************
127 C SUBROUTINE F(X,V) -- EVALUATES BROWN'S FUNCTION AT THE POINT
128 C X, AND RETURNS THE VALUE IN V.
130 C********************************************************************
132 DOUBLE PRECISION X
(1),V
(1),PROD
,SUM
147 SUBROUTINE FJAC
(X
,V
,K
)
148 C********************************************************************
150 C SUBROUTINE FJAC(X,V,K) -- EVALUATES THE K-TH COLUMN OF
151 C THE JACOBIAN MATRIX FOR BROWN'S FUNCTION EVALUATED AT
152 C THE POINT X, RETURNING THE VALUE IN V.
154 C********************************************************************
156 DOUBLE PRECISION X
(1),V
(1),PROD
167 IF (K
.GT
. 1) V
(K
)=V
(K
)+1.0D0