GNU Octave  4.4.1
A high-level interpreted language, primarily intended for numerical computations, mostly compatible with Matlab
dyypnw.f
Go to the documentation of this file.
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
OCTAVE_EXPORT octave_value_list etc The functions then dimension(columns)