3911
|
1 C Work performed under the auspices of the U.S. Department of Energy |
|
2 C by Lawrence Livermore National Laboratory under contract number |
|
3 C W-7405-Eng-48. |
|
4 C |
|
5 SUBROUTINE DYYPNW (NEQ, Y, YPRIME, CJ, RL, P, ICOPT, ID, |
|
6 * YNEW, YPNEW) |
|
7 C |
|
8 C***BEGIN PROLOGUE DYYPNW |
|
9 C***REFER TO DLINSK |
|
10 C***DATE WRITTEN 940830 (YYMMDD) |
|
11 C |
|
12 C |
|
13 C----------------------------------------------------------------------- |
|
14 C***DESCRIPTION |
|
15 C |
|
16 C DYYPNW calculates the new (Y,YPRIME) pair needed in the |
|
17 C linesearch algorithm based on the current lambda value. It is |
|
18 C called by DLINSK and DLINSD. Based on the ICOPT and ID values, |
|
19 C the corresponding entry in Y or YPRIME is updated. |
|
20 C |
|
21 C In addition to the parameters described in the calling programs, |
|
22 C the parameters represent |
|
23 C |
|
24 C P -- Array of length NEQ that contains the current |
|
25 C approximate Newton step. |
|
26 C RL -- Scalar containing the current lambda value. |
|
27 C YNEW -- Array of length NEQ containing the updated Y vector. |
|
28 C YPNEW -- Array of length NEQ containing the updated YPRIME |
|
29 C vector. |
|
30 C----------------------------------------------------------------------- |
|
31 C |
|
32 C***ROUTINES CALLED (NONE) |
|
33 C |
|
34 C***END PROLOGUE DYYPNW |
|
35 C |
|
36 C |
|
37 IMPLICIT DOUBLE PRECISION (A-H,O-Z) |
|
38 DIMENSION Y(*), YPRIME(*), YNEW(*), YPNEW(*), ID(*), P(*) |
|
39 C |
|
40 IF (ICOPT .EQ. 1) THEN |
|
41 DO 10 I=1,NEQ |
|
42 IF(ID(I) .LT. 0) THEN |
|
43 YNEW(I) = Y(I) - RL*P(I) |
|
44 YPNEW(I) = YPRIME(I) |
|
45 ELSE |
|
46 YNEW(I) = Y(I) |
|
47 YPNEW(I) = YPRIME(I) - RL*CJ*P(I) |
|
48 ENDIF |
|
49 10 CONTINUE |
|
50 ELSE |
|
51 DO 20 I = 1,NEQ |
|
52 YNEW(I) = Y(I) - RL*P(I) |
|
53 YPNEW(I) = YPRIME(I) |
|
54 20 CONTINUE |
|
55 ENDIF |
|
56 RETURN |
|
57 C----------------------- END OF SUBROUTINE DYYPNW ---------------------- |
|
58 END |