GNU Octave 10.1.0
A high-level interpreted language, primarily intended for numerical computations, mostly compatible with Matlab
 
Loading...
Searching...
No Matches
dyypnw.f
Go to the documentation of this file.
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
subroutine dyypnw(neq, y, yprime, cj, rl, p, icopt, id, ynew, ypnew)
Definition dyypnw.f:7