dyypnw.f

Go to the documentation of this file.
00001 C Work performed under the auspices of the U.S. Department of Energy
00002 C by Lawrence Livermore National Laboratory under contract number 
00003 C W-7405-Eng-48.
00004 C
00005       SUBROUTINE DYYPNW (NEQ, Y, YPRIME, CJ, RL, P, ICOPT, ID, 
00006      *                   YNEW, YPNEW)
00007 C
00008 C***BEGIN PROLOGUE  DYYPNW
00009 C***REFER TO  DLINSK
00010 C***DATE WRITTEN   940830   (YYMMDD)
00011 C
00012 C
00013 C-----------------------------------------------------------------------
00014 C***DESCRIPTION
00015 C
00016 C     DYYPNW calculates the new (Y,YPRIME) pair needed in the
00017 C     linesearch algorithm based on the current lambda value.  It is
00018 C     called by DLINSK and DLINSD.  Based on the ICOPT and ID values,
00019 C     the corresponding entry in Y or YPRIME is updated.
00020 C
00021 C     In addition to the parameters described in the calling programs,
00022 C     the parameters represent
00023 C
00024 C     P      -- Array of length NEQ that contains the current
00025 C               approximate Newton step.
00026 C     RL     -- Scalar containing the current lambda value.
00027 C     YNEW   -- Array of length NEQ containing the updated Y vector.
00028 C     YPNEW  -- Array of length NEQ containing the updated YPRIME
00029 C               vector.
00030 C-----------------------------------------------------------------------
00031 C
00032 C***ROUTINES CALLED (NONE)
00033 C
00034 C***END PROLOGUE  DYYPNW
00035 C
00036 C
00037       IMPLICIT DOUBLE PRECISION (A-H,O-Z)
00038       DIMENSION Y(*), YPRIME(*), YNEW(*), YPNEW(*), ID(*), P(*)
00039 C
00040       IF (ICOPT .EQ. 1) THEN
00041          DO 10 I=1,NEQ
00042             IF(ID(I) .LT. 0) THEN
00043                YNEW(I) = Y(I) - RL*P(I)
00044                YPNEW(I) = YPRIME(I)
00045             ELSE
00046                YNEW(I) = Y(I)
00047                YPNEW(I) = YPRIME(I) - RL*CJ*P(I)
00048             ENDIF
00049  10      CONTINUE
00050       ELSE
00051          DO 20 I = 1,NEQ
00052             YNEW(I) = Y(I) - RL*P(I)
00053             YPNEW(I) = YPRIME(I)
00054  20      CONTINUE
00055       ENDIF
00056       RETURN
00057 C----------------------- END OF SUBROUTINE DYYPNW ----------------------
00058       END
 All Classes Files Functions Variables Typedefs Enumerations Enumerator Friends Defines