DDASTP(3)

SYNOPSIS
SUBROUTINE DDASTP (X, Y, YPRIME, NEQ, RES, JAC, H, WT, JSTART, * IDID, RPAR, IPAR, PHI, DELTA, E, WM, IWM, ALPHA, BETA, GAMMA, * PSI, SIGMA, CJ, CJOLD, HOLD, S, HMIN, UROUND, IPHASE, JCALC, K, * KOLD, NS, NONNEG, NTEMP)

NAME
ddastp - Perform one step of the DDASSL integration.

LIBRARY
SLATEC (DASSL)

TYPE
DOUBLE PRECISION (SDASTP-S, DDASTP-D)

AUTHOR
Petzold, Linda R., (LLNL)

DESCRIPTION
C----------------------------------------------------------------------- DDASTP SOLVES A SYSTEM OF DIFFERENTIAL/ ALGEBRAIC EQUATIONS OF THE FORM G(X,Y,YPRIME) = 0, FOR ONE STEP (NORMALLY FROM X TO X+H). THE METHODS USED ARE MODIFIED DIVIDED DIFFERENCE,FIXED LEADING COEFFICIENT FORMS OF BACKWARD DIFFERENTIATION FORMULAS. THE CODE ADJUSTS THE STEPSIZE AND ORDER TO CONTROL THE LOCAL ERROR PER STEP. THE PARAMETERS REPRESENT X -- INDEPENDENT VARIABLE Y -- SOLUTION VECTOR AT X YPRIME -- DERIVATIVE OF SOLUTION VECTOR AFTER SUCCESSFUL STEP NEQ -- NUMBER OF EQUATIONS TO BE INTEGRATED RES -- EXTERNAL USER-SUPPLIED SUBROUTINE TO EVALUATE THE RESIDUAL. THE CALL IS CALL RES(X,Y,YPRIME,DELTA,IRES,RPAR,IPAR) X,Y,YPRIME ARE INPUT. DELTA IS OUTPUT. ON INPUT, IRES=0. RES SHOULD ALTER IRES ONLY IF IT ENCOUNTERS AN ILLEGAL VALUE OF Y OR A STOP CONDITION. SET IRES=-1 IF AN INPUT VALUE OF Y IS ILLEGAL, AND DDASTP WILL TRY TO SOLVE THE PROBLEM WITHOUT GETTING IRES = -1. IF IRES=-2, DDASTP RETURNS CONTROL TO THE CALLING PROGRAM WITH IDID = -11. JAC -- EXTERNAL USER-SUPPLIED ROUTINE TO EVALUATE THE ITERATION MATRIX (THIS IS OPTIONAL) THE CALL IS OF THE FORM CALL JAC(X,Y,YPRIME,PD,CJ,RPAR,IPAR) PD IS THE MATRIX OF PARTIAL DERIVATIVES, PD=DG/DY+CJ*DG/DYPRIME H -- APPROPRIATE STEP SIZE FOR NEXT STEP. NORMALLY DETERMINED BY THE CODE WT -- VECTOR OF WEIGHTS FOR ERROR CRITERION. JSTART -- INTEGER VARIABLE SET 0 FOR FIRST STEP, 1 OTHERWISE. IDID -- COMPLETION CODE WITH THE FOLLOWING MEANINGS: IDID= 1 -- THE STEP WAS COMPLETED SUCCESSFULLY IDID=-6 -- THE ERROR TEST FAILED REPEATEDLY IDID=-7 -- THE CORRECTOR COULD NOT CONVERGE IDID=-8 -- THE ITERATION MATRIX IS SINGULAR IDID=-9 -- THE CORRECTOR COULD NOT CONVERGE. THERE WERE REPEATED ERROR TEST FAILURES ON THIS STEP. IDID=-10-- THE CORRECTOR COULD NOT CONVERGE BECAUSE IRES WAS EQUAL TO MINUS ONE IDID=-11-- IRES EQUAL TO -2 WAS ENCOUNTERED, AND CONTROL IS BEING RETURNED TO THE CALLING PROGRAM RPAR,IPAR -- REAL AND INTEGER PARAMETER ARRAYS THAT ARE USED FOR COMMUNICATION BETWEEN THE CALLING PROGRAM AND EXTERNAL USER ROUTINES THEY ARE NOT ALTERED BY DDASTP PHI -- ARRAY OF DIVIDED DIFFERENCES USED BY DDASTP. THE LENGTH IS NEQ*(K+1),WHERE K IS THE MAXIMUM ORDER DELTA,E -- WORK VECTORS FOR DDASTP OF LENGTH NEQ WM,IWM -- REAL AND INTEGER ARRAYS STORING MATRIX INFORMATION SUCH AS THE MATRIX OF PARTIAL DERIVATIVES,PERMUTATION VECTOR, AND VARIOUS OTHER INFORMATION. THE OTHER PARAMETERS ARE INFORMATION WHICH IS NEEDED INTERNALLY BY DDASTP TO CONTINUE FROM STEP TO STEP. C-----------------------------------------------------------------------

ROUTINES CALLED
DDAJAC, DDANRM, DDASLV, DDATRP

REVISION HISTORY (YYMMDD)
830315 DATE WRITTEN
901009 Finished conversion to SLATEC 4.0 format (F.N.Fritsch)
901019 Merged changes made by C. Ulrich with SLATEC 4.0 format.
901026 Added explicit declarations for all variables and minor cosmetic changes to prologue. (FNF)