Google
 

Trailing-Edge - PDP-10 Archives - decuslib20-02 - decus/20-0026/rk1.doc
There are 2 other files named rk1.doc in the archive. Click here to see a list.
SUBROUTINE RK1

PURPOSE
   INTEGRATES A FIRST ORDER DIFFERENTIAL EQUATION
   DY/DX=FUN(X,Y) UP TO A SPECIFIED FINAL VALUE

USAGE
   CALL RK1(FUN,HI,XI,YI,XF,YF,ANSX,ANSY,IER)

DESCRIPTION OF PARAMETERS
   FUN -USER-SUPPLIED FUNCTION SUBPROGRAM WITH ARGUMENTS X,Y
	WHICH GIVES DY/DX
   HI  -THE STEP SIZE
   XI  -INITIAL VALUE OF X
   YI  -INITIAL VALUE OF Y WHERE YI=Y(XI)
   XF  -FINAL VALUE OF X
   YF  -FINAL VALUE OF Y
   ANSX-RESULTANT FINAL VALUE OF X
   ANSY-RESULTANT FINAL VALUE OF Y
	EITHER ANSX WILL EQUAL XF OR ANSY WILL EQUAL YF
	DEPENDING ON WHICH IS REACHED FIRST
   IER -ERROR CODE
	IER=0 NO ERROR
	IER=1 STEP SIZE IS ZERO

REMARKS
   IF XI IS GREATER THAN XF, ANSX=XI AND ANSY=YI
   IF H IS ZERO, IER IS SET TO ONE, ANSX IS SET TO XI, AND
   ANSY IS SET TO ZERO

SUBROUTINES AND FUNCTION SUBPROGRAMS REQUIRED
   FUN IS A TWO ARGUMENT FUNCTION SUBPROGRAM FURNISHED BY THE
   USER.  DY/DX=FUN (X,Y)
   CALLING PROGRAM MUST HAVE FORTRAN EXTERNAL STATEMENT
   CONTAINING NAMES OF FUNCTION SUBPROGRAMS LISTED IN CALL TO
   RK1

METHOD
   USES FOURTH ORDER RUNGE-KUTTA INTEGRATION PROCESS ON A
   RECURSIVE BASIS AS SHOWN IN F.B. HILDEBRAND, 'INTRODUCTION
   TO NUMERICAL ANALYSIS',MCGRAW-HILL,1956. PROCESS IS
   TERMINATED AND FINAL VALUE ADJUSTED WHEN EITHER XF OR YF
   IS REACHED.