home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Frostbyte's 1980s DOS Shareware Collection
/
floppyshareware.zip
/
floppyshareware
/
DOOG
/
PCSSP1.ZIP
/
NUMQUAD.ZIP
/
QHFG.FOR
< prev
next >
Wrap
Text File
|
1985-11-29
|
2KB
|
56 lines
C
C ..................................................................
C
C SUBROUTINE QHFG
C
C PURPOSE
C TO COMPUTE THE VECTOR OF INTEGRAL VALUES FOR A GIVEN
C GENERAL TABLE OF ARGUMENT, FUNCTION, AND DERIVATIVE VALUES.
C
C USAGE
C CALL QHFG (X,Y,DERY,Z,NDIM)
C
C DESCRIPTION OF PARAMETERS
C X - THE INPUT VECTOR OF ARGUMENT VALUES.
C Y - THE INPUT VECTOR OF FUNCTION VALUES.
C DERY - THE INPUT VECTOR OF DERIVATIVE VALUES.
C Z - THE RESULTING VECTOR OF INTEGRAL VALUES. Z MAY BE
C IDENTICAL WITH X,Y OR DERY.
C NDIM - THE DIMENSION OF VECTORS X,Y,DERY,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 FOURTH ORDER INTEGRATION FORMULA.
C FOR REFERENCE, SEE
C (1) F.B.HILDEBRAND, INTRODUCTION TO NUMERICAL ANALYSIS,
C MCGRAW-HILL, NEW YORK/TORONTO/LONDON, 1956, PP.314-319.
C (2) R.ZURMUEHL, PRAKTISCHE MATHEMATIK FUER INGENIEURE UND
C PHYSIKER, SPRINGER, BERLIN/GOETTINGEN/HEIDELBERG, 1963,
C PP.227-230.
C
C ..................................................................
C
SUBROUTINE QHFG(X,Y,DERY,Z,NDIM)
C
C
DIMENSION X(1),Y(1),DERY(1),Z(1)
C
SUM2=0.
IF(NDIM-1)4,3,1
C
C INTEGRATION LOOP
1 DO 2 I=2,NDIM
SUM1=SUM2
SUM2=.5*(X(I)-X(I-1))
SUM2=SUM1+SUM2*((Y(I)+Y(I-1))+.3333333*SUM2*(DERY(I-1)-DERY(I)))
2 Z(I-1)=SUM1
3 Z(NDIM)=SUM2
4 RETURN
END