GNU Octave
3.8.0
A high-level interpreted language, primarily intended for numerical computations, mostly compatible with Matlab
Main Page
Namespaces
Classes
Files
File List
File Members
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Properties
Friends
Macros
Pages
liboctave
cruft
dassl
ddatrp.f
Go to the documentation of this file.
1
SUBROUTINE
ddatrp
(X, XOUT, YOUT, YPOUT, NEQ, KOLD, PHI, PSI)
2
C***BEGIN PROLOGUE DDATRP
3
C***SUBSIDIARY
4
C***PURPOSE Interpolation routine for DDASSL.
5
C***LIBRARY SLATEC (DASSL)
6
C***TYPE DOUBLE PRECISION (SDATRP-S, DDATRP-D)
7
C***AUTHOR PETZOLD, LINDA R., (LLNL)
8
C***DESCRIPTION
9
C-----------------------------------------------------------------------
10
C THE METHODS IN SUBROUTINE DDASTP USE POLYNOMIALS
11
C TO APPROXIMATE THE SOLUTION. DDATRP APPROXIMATES THE
12
C SOLUTION AND ITS DERIVATIVE AT TIME XOUT BY EVALUATING
13
C ONE OF THESE POLYNOMIALS,AND ITS DERIVATIVE,THERE.
14
C INFORMATION DEFINING THIS POLYNOMIAL IS PASSED FROM
15
C DDASTP, SO DDATRP CANNOT BE USED ALONE.
16
C
17
C THE PARAMETERS ARE:
18
C X THE CURRENT TIME IN THE INTEGRATION.
19
C XOUT THE TIME AT WHICH THE SOLUTION IS DESIRED
20
C YOUT THE INTERPOLATED APPROXIMATION TO Y AT XOUT
21
C (THIS IS OUTPUT)
22
C YPOUT THE INTERPOLATED APPROXIMATION TO YPRIME AT XOUT
23
C (THIS IS OUTPUT)
24
C NEQ NUMBER OF EQUATIONS
25
C KOLD ORDER USED ON LAST SUCCESSFUL STEP
26
C PHI ARRAY OF SCALED DIVIDED DIFFERENCES OF Y
27
C PSI ARRAY OF PAST STEPSIZE HISTORY
28
C-----------------------------------------------------------------------
29
C***ROUTINES CALLED (NONE)
30
C***REVISION HISTORY (YYMMDD)
31
C 830315 DATE WRITTEN
32
C 901009 Finished conversion to SLATEC 4.0 format (F.N.Fritsch)
33
C 901019 Merged changes made by C. Ulrich with SLATEC 4.0 format.
34
C 901026 Added explicit declarations for all variables and minor
35
C cosmetic changes to prologue. (FNF)
36
C***END PROLOGUE DDATRP
37
C
38
INTEGER
neq, kold
39
DOUBLE PRECISION
x
, xout, yout(*), ypout(*), phi(neq,*), psi(*)
40
C
41
INTEGER
i, j, koldp1
42
DOUBLE PRECISION
c,
d
,
gamma
, temp1
43
C
44
C***FIRST EXECUTABLE STATEMENT DDATRP
45
koldp1=kold+1
46
temp1=xout-
x
47
DO
10 i=1,neq
48
yout(i)=phi(i,1)
49
10 ypout(i)=0.0d0
50
c=1.0d0
51
d
=0.0d0
52
gamma
=temp1/psi(1)
53
DO
30 j=2,koldp1
54
d
=
d
*
gamma
+c/psi(j-1)
55
c=c*
gamma
56
gamma
=(temp1+psi(j-1))/psi(j)
57
DO
20 i=1,neq
58
yout(i)=yout(i)+c*phi(i,j)
59
20 ypout(i)=ypout(i)+
d
*phi(i,j)
60
30
CONTINUE
61
RETURN
62
C
63
C------END OF SUBROUTINE DDATRP------
64
END
Generated on Mon Dec 30 2013 03:04:46 for GNU Octave by
1.8.1.2