home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Frostbyte's 1980s DOS Shareware Collection
/
floppyshareware.zip
/
floppyshareware
/
DOOG
/
PCSSP1.ZIP
/
NUMQUAD.ZIP
/
DQHSE.FOR
< prev
next >
Wrap
Text File
|
1985-11-29
|
2KB
|
60 lines
C
C ..................................................................
C
C SUBROUTINE DQHSE
C
C PURPOSE
C TO COMPUTE THE VECTOR OF INTEGRAL VALUES FOR A GIVEN
C EQUIDISTANT TABLE OF FUNCTION, FIRST DERIVATIVE,
C AND SECOND DERIVATIVE VALUES.
C
C USAGE
C CALL DQHSE (H,Y,FDY,SDY,Z,NDIM)
C
C DESCRIPTION OF PARAMETERS
C H - DOUBLE PRECISION INCREMENT OF ARGUMENT VALUES.
C Y - DOUBLE PRECISION INPUT VECTOR OF FUNCTION VALUES.
C FDY - DOUBLE PRECISION INPUT VECTOR OF FIRST DERIVATIVE.
C SDY - DOUBLE PRECISION INPUT VECTOR OF SECOND DERIVATIVE.
C Z - RESULTING DOUBLE PRECISION VECTOR OF INTEGRAL
C VALUES. Z MAY BE IDENTICAL WITH Y, FDY OR SDY.
C NDIM - THE DIMENSION OF VECTORS Y,FDY,SDY,Z.
C
C REMARKS
C NO ACTION IN CASE NDIM LESS THAN 1.
C
C SUBROUTINES AND FUNCTION SUBPROGRAMS REQUIRED
C NONE
C
C METHOD
C BEGINNING WITH Z(1)=0, EVALUATION OF VECTOR Z IS DONE BY
C MEANS OF HERMITEAN SIXTH ORDER INTEGRATION FORMULA.
C FOR REFERENCE, SEE
C R.ZURMUEHL, PRAKTISCHE MATHEMATIK FUER INGENIEURE UND
C PHYSIKER, SPRINGER, BERLIN/GOETTINGEN/HEIDELBERG, 1963,
C PP.227-230.
C
C ..................................................................
C
SUBROUTINE DQHSE(H,Y,FDY,SDY,Z,NDIM)
C
C
DIMENSION Y(1),FDY(1),SDY(1),Z(1)
DOUBLE PRECISION Y,FDY,SDY,Z,H,HH,HF,HT,SUM1,SUM2
C
SUM2=0.D0
IF(NDIM-1)4,3,1
1 HH=.5D0*H
HF=.2D0*H
HT=.08333333333333333D0*H
C
C INTEGRATION LOOP
DO 2 I=2,NDIM
SUM1=SUM2
0SUM2=SUM2+HH*((Y(I-1)+Y(I))+HF*((FDY(I-1)-FDY(I))+
1 HT*(SDY(I-1)+SDY(I))))
2 Z(I-1)=SUM1
3 Z(NDIM)=SUM2
4 RETURN
END