ddatrp.f

Go to the documentation of this file.
00001       SUBROUTINE DDATRP (X, XOUT, YOUT, YPOUT, NEQ, KOLD, PHI, PSI)
00002 C***BEGIN PROLOGUE  DDATRP
00003 C***SUBSIDIARY
00004 C***PURPOSE  Interpolation routine for DDASSL.
00005 C***LIBRARY   SLATEC (DASSL)
00006 C***TYPE      DOUBLE PRECISION (SDATRP-S, DDATRP-D)
00007 C***AUTHOR  PETZOLD, LINDA R., (LLNL)
00008 C***DESCRIPTION
00009 C-----------------------------------------------------------------------
00010 C     THE METHODS IN SUBROUTINE DDASTP USE POLYNOMIALS
00011 C     TO APPROXIMATE THE SOLUTION. DDATRP APPROXIMATES THE
00012 C     SOLUTION AND ITS DERIVATIVE AT TIME XOUT BY EVALUATING
00013 C     ONE OF THESE POLYNOMIALS,AND ITS DERIVATIVE,THERE.
00014 C     INFORMATION DEFINING THIS POLYNOMIAL IS PASSED FROM
00015 C     DDASTP, SO DDATRP CANNOT BE USED ALONE.
00016 C
00017 C     THE PARAMETERS ARE:
00018 C     X     THE CURRENT TIME IN THE INTEGRATION.
00019 C     XOUT  THE TIME AT WHICH THE SOLUTION IS DESIRED
00020 C     YOUT  THE INTERPOLATED APPROXIMATION TO Y AT XOUT
00021 C           (THIS IS OUTPUT)
00022 C     YPOUT THE INTERPOLATED APPROXIMATION TO YPRIME AT XOUT
00023 C           (THIS IS OUTPUT)
00024 C     NEQ   NUMBER OF EQUATIONS
00025 C     KOLD  ORDER USED ON LAST SUCCESSFUL STEP
00026 C     PHI   ARRAY OF SCALED DIVIDED DIFFERENCES OF Y
00027 C     PSI   ARRAY OF PAST STEPSIZE HISTORY
00028 C-----------------------------------------------------------------------
00029 C***ROUTINES CALLED  (NONE)
00030 C***REVISION HISTORY  (YYMMDD)
00031 C   830315  DATE WRITTEN
00032 C   901009  Finished conversion to SLATEC 4.0 format (F.N.Fritsch)
00033 C   901019  Merged changes made by C. Ulrich with SLATEC 4.0 format.
00034 C   901026  Added explicit declarations for all variables and minor
00035 C           cosmetic changes to prologue.  (FNF)
00036 C***END PROLOGUE  DDATRP
00037 C
00038       INTEGER  NEQ, KOLD
00039       DOUBLE PRECISION  X, XOUT, YOUT(*), YPOUT(*), PHI(NEQ,*), PSI(*)
00040 C
00041       INTEGER  I, J, KOLDP1
00042       DOUBLE PRECISION  C, D, GAMMA, TEMP1
00043 C
00044 C***FIRST EXECUTABLE STATEMENT  DDATRP
00045       KOLDP1=KOLD+1
00046       TEMP1=XOUT-X
00047       DO 10 I=1,NEQ
00048          YOUT(I)=PHI(I,1)
00049 10       YPOUT(I)=0.0D0
00050       C=1.0D0
00051       D=0.0D0
00052       GAMMA=TEMP1/PSI(1)
00053       DO 30 J=2,KOLDP1
00054          D=D*GAMMA+C/PSI(J-1)
00055          C=C*GAMMA
00056          GAMMA=(TEMP1+PSI(J-1))/PSI(J)
00057          DO 20 I=1,NEQ
00058             YOUT(I)=YOUT(I)+C*PHI(I,J)
00059 20          YPOUT(I)=YPOUT(I)+D*PHI(I,J)
00060 30       CONTINUE
00061       RETURN
00062 C
00063 C------END OF SUBROUTINE DDATRP------
00064       END
 All Classes Files Functions Variables Typedefs Enumerations Enumerator Friends Defines