DHSTRT(3)

SYNOPSIS
SUBROUTINE DHSTRT (DF, NEQ, A, B, Y, YPRIME, ETOL, MORDER, SMALL, + BIG, SPY, PV, YP, SF, RPAR, IPAR, H)

NAME
dhstrt - Subsidiary to DDEABM, DDEBDF and DDERKF

LIBRARY
SLATEC

TYPE
DOUBLE PRECISION (HSTART-S, DHSTRT-D)

AUTHOR
Watts, H. A., (SNLA)

DESCRIPTION
DHSTRT computes a starting step size to be used in solving initial value problems in ordinary differential equations. ********************************************************************** ABSTRACT Subroutine DHSTRT computes a starting step size to be used by an initial value method in solving ordinary differential equations. It is based on an estimate of the local Lipschitz constant for the differential equation (lower bound on a norm of the Jacobian) , a bound on the differential equation (first derivative) , and a bound on the partial derivative of the equation with respect to the independent variable. (all approximated near the initial point A) Subroutine DHSTRT uses a function subprogram DHVNRM for computing a vector norm. The maximum norm is presently utilized though it can easily be replaced by any other vector norm. It is presumed that any replacement norm routine would be carefully coded to prevent unnecessary underflows or overflows from occurring, and also, would not alter the vector or number of components. ********************************************************************** On input you must provide the following DF -- This is a subroutine of the form DF(X,U,UPRIME,RPAR,IPAR) which defines the system of first order differential equations to be solved. For the given values of X and the vector U(*)=(U(1),U(2),...,U(NEQ)) , the subroutine must evaluate the NEQ components of the system of differential equations DU/DX=DF(X,U) and store the derivatives in the array UPRIME(*), that is, UPRIME(I) = * DU(I)/DX * for equations I=1,...,NEQ. Subroutine DF must not alter X or U(*). You must declare the name DF in an external statement in your program that calls DHSTRT. You must dimension U and UPRIME in DF. RPAR and IPAR are DOUBLE PRECISION and INTEGER parameter arrays which you can use for communication between your program and subroutine DF. They are not used or altered by DHSTRT. If you do not need RPAR or IPAR, ignore these parameters by treating them as dummy arguments. If you do choose to use them, dimension them in your program and in DF as arrays of appropriate length. NEQ -- This is the number of (first order) differential equations to be integrated. A -- This is the initial point of integration. B -- This is a value of the independent variable used to define the direction of integration. A reasonable choice is to set B to the first point at which a solution is desired. You can also use B, if necessary, to restrict the length of the first integration step because the algorithm will not compute a starting step length which is bigger than ABS(B-A), unless B has been chosen too close to A. (it is presumed that DHSTRT has been called with B different from A on the machine being used. Also see the discussion about the parameter SMALL.) Y(*) -- This is the vector of initial values of the NEQ solution components at the initial point A. YPRIME(*) -- This is the vector of derivatives of the NEQ solution components at the initial point A. (defined by the differential equations in subroutine DF) ETOL -- This is the vector of error tolerances corresponding to the NEQ solution components. It is assumed that all elements are positive. Following the first integration step, the tolerances are expected to be used by the integrator in an error test which roughly requires that ABS(LOCAL ERROR) .LE. ETOL for each vector component. MORDER -- This is the order of the formula which will be used by the initial value method for taking the first integration step. SMALL -- This is a small positive machine dependent constant which is used for protecting against computations with numbers which are too small relative to the precision of floating point arithmetic. SMALL should be set to (approximately) the smallest positive DOUBLE PRECISION number such that (1.+SMALL) .GT. 1. on the machine being used. The quantity SMALL**(3/8) is used in computing increments of variables for approximating derivatives by differences. Also the algorithm will not compute a starting step length which is smaller than 100*SMALL*ABS(A). BIG -- This is a large positive machine dependent constant which is used for preventing machine overflows. A reasonable choice is to set big to (approximately) the square root of the largest DOUBLE PRECISION number which can be held in the machine. SPY(*),PV(*),YP(*),SF(*) -- These are DOUBLE PRECISION work arrays of length NEQ which provide the routine with needed storage space. RPAR,IPAR -- These are parameter arrays, of DOUBLE PRECISION and INTEGER type, respectively, which can be used for communication between your program and the DF subroutine. They are not used or altered by DHSTRT. ********************************************************************** On Output (after the return from DHSTRT), H -- is an appropriate starting step size to be attempted by the differential equation method. All parameters in the call list remain unchanged except for the working arrays SPY(*),PV(*),YP(*), and SF(*). **********************************************************************

SEE ALSO
DDEABM, DDEBDF, DDERKF

ROUTINES CALLED
DHVNRM

REVISION HISTORY (YYMMDD)
820301 DATE WRITTEN
890531 Changed all specific intrinsics to generic. (WRB)
890831 Modified array declarations. (WRB)
890911 Removed unnecessary intrinsics. (WRB)
891024 Changed references from DVNORM to DHVNRM. (WRB)
891214 Prologue converted to Version 4.0 format. (BAB)
900328 Added TYPE section. (WRB)
910722 Updated AUTHOR section. (ALS)