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