Trailing-Edge
-
PDP-10 Archives
-
decuslib20-02
-
decus/20-0026/dlbvp.doc
There are 2 other files named dlbvp.doc in the archive. Click here to see a list.
SUBROUTINE DLBVP
PURPOSE
TO SOLVE A LINEAR BOUNDARY VALUE PROBLEM, WHICH CONSISTS OF
A SYSTEM OF NDIM LINEAR FIRST ORDER DIFFERENTIAL EQUATIONS
DY/DX=A(X)*Y(X)+F(X)
AND NDIM LINEAR BOUNDARY CONDITIONS
B*Y(XL)+C*Y(XU)=R.
USAGE
CALL DLBVP (PRMT,B,C,R,Y,DERY,NDIM,IHLF,AFCT,FCT,DFCT,OUTP,
AUX,A)
PARAMETERS AFCT,FCT,DFCT,OUTP REQUIRE AN EXTERNAL STATEMENT.
DESCRIPTION OF PARAMETERS
PRMT - DOUBLE PRECISION INPUT AND OUTPUT VECTOR WITH
DIMENSION GREATER THAN OR EQUAL TO 5, WHICH
SPECIFIES THE PARAMETERS OF THE INTERVAL AND OF
ACCURACY AND WHICH SERVES FOR COMMUNICATION BETWEEN
OUTPUT SUBROUTINE (FURNISHED BY THE USER) AND
SUBROUTINE DLBVP. EXCEPT PRMT(5) THE COMPONENTS
ARE NOT DESTROYED BY SUBROUTINE DLBVP AND THEY ARE
PRMT(1)- LOWER BOUND XL OF THE INTERVAL (INPUT),
PRMT(1)- UPPER BOUND XU OF THE INTERVAL (INPUT),
PRMT(3)- INITIAL INCREMENT OF THE INDEPENDENT VARIABLE
(INPUT),
PRMT(4)- UPPER ERROR BOUND (INPUT). IF RELATIVE ERROR IS
GREATER THAN PRMT(4), INCREMENT GETS HALVED.
IF INCREMENT IS LESS THAN PRMT(3) AND RELATIVE
ERROR LESS THAN PRMT(4)/50, INCREMENT GETS DOUBLED.
THE USER MAY CHANGE PRMT(4) BY MEANS OF HIS
OUTPUT SUBROUTINE.
PRMT(5)- NO INPUT PARAMETER. SUBROUTINE DLBVP INITIALIZES
PRMT(5)=0. IF THE USER WANTS TO TERMINATE
SUBROUTINE DLBVP AT ANY OUTPUT POINT, HE HAS TO
CHANGE PRMT(5) TO NON-ZERO BY MEANS OF SUBROUTINE
OUTP. FURTHER COMPONENTS OF VECTOR PRMT ARE
FEASIBLE IF ITS DIMENSION IS DEFINED GREATER
THAN 5. HOWEVER SUBROUTINE DLBVP DOES NOT REQUIRE
AND CHANGE THEM. NEVERTHELESS THEY MAY BE USEFUL
FOR HANDING RESULT VALUES TO THE MAIN PROGRAM
(CALLING DLBVP) WHICH ARE OBTAINED BY SPECIAL
MANIPULATIONS WITH OUTPUT DATA IN SUBROUTINE OUTP.
B - DOUBLE PRECISION NDIM BY NDIM INPUT MATRIX
(DESTROYED). IT IS THE COEFFICIENT MATRIX OF Y(XL)
IN THE BOUNDARY CONDITIONS.
C - DOUBLE PRECISION NDIM BY NDIM INPUT MATRIX
(POSSIBLY DESTROYED). IT IS THE COEFFICIENT MATRIX
OF Y(XU) IN THE BOUNDARY CONDITIONS.
R - DOUBLE PRECISION INPUT VECTOR WITH DIMENSION NDIM
(DESTROYED). IT SPECIFIES THE RIGHT HAND SIDE OF
THE BOUNDARY CONDITIONS.
Y - DOUBLE PRECISION AUXILIARY VECTOR WITH
DIMENSION NDIM. IT IS USED AS STORAGE LOCATION
FOR THE RESULTING VALUES OF DEPENDENT VARIABLES
COMPUTED AT INTERMEDIATE POINTS X.
DERY - DOUBLE PRECISION INPUT VECTOR OF ERROR WEIGHTS
(DESTROYED). ITS MAXIMAL COMPONENT SHOULD BE
EQUAL TO 1. LATERON DERY IS THE VECTOR OF
DERIVATIVES, WHICH BELONG TO FUNCTION VALUES Y AT
INTERMEDIATE POINTS X.
NDIM - AN INPUT VALUE, WHICH SPECIFIES THE NUMBER OF
DIFFERENTIAL EQUATIONS IN THE SYSTEM.
IHLF - AN OUTPUT VALUE, WHICH SPECIFIES THE NUMBER OF
BISECTIONS OF THE INITIAL INCREMENT. IF IHLF GETS
GREATER THAN 10, SUBROUTINE DLBVP RETURNS WITH
ERROR MESSAGE IHLF=11 INTO MAIN PROGRAM.
ERROR MESSAGE IHLF=12 OR IHLF=13 APPEARS IN CASE
PRMT(3)=0 OR IN CASE SIGN(PRMT(3)).NE.SIGN(PRMT(2)-
PRMT(1)) RESPECTIVELY. FINALLY ERROR MESSAGE
IHLF=14 INDICATES, THAT THERE IS NO SOLUTION OR
THAT THERE ARE MORE THAN ONE SOLUTION OF THE
PROBLEM.
A NEGATIVE VALUE OF IHLF HANDED TO SUBROUTINE OUTP
TOGETHER WITH INITIAL VALUES OF FINALLY GENERATED
INITIAL VALUE PROBLEM INDICATES, THAT THERE WAS
POSSIBLE LOSS OF SIGNIFICANCE IN THE SOLUTION OF
THE SYSTEM OF SIMULTANEOUS LINEAR EQUATIONS FOR
THESE INITIAL VALUES. THE ABSOLUTE VALUE OF IHLF
SHOWS, AFTER WHICH ELIMINATION STEP OF GAUSS
ALGORITHM POSSIBLE LOSS OF SIGNIFICANCE WAS
DETECTED.
AFCT - THE NAME OF AN EXTERNAL SUBROUTINE USED. IT
COMPUTES THE COEFFICIENT MATRIX A OF VECTOR Y ON
THE RIGHT HAND SIDE OF THE SYSTEM OF DIFFERENTIAL
EQUATIONS FOR A GIVEN X-VALUE. ITS PARAMETER LIST
MUST BE X,A. SUBROUTINE AFCT SHOULD NOT DESTROY X.
FCT - THE NAME OF AN EXTERNAL SUBROUTINE USED. IT
COMPUTES VECTOR F (INHOMOGENEOUS PART OF THE
RIGHT HAND SIDE OF THE SYSTEM OF DIFFERENTIAL
EQUATIONS) FOR A GIVEN X-VALUE. ITS PARAMETER LIST
MUST BE X,F. SUBROUTINE FCT SHOULD NOT DESTROY X.
DFCT - THE NAME OF AN EXTERNAL SUBROUTINE USED. IT
COMPUTES VECTOR DF (DERIVATIVE OF THE INHOMOGENEOUS
PART ON THE RIGHT HAND SIDE OF THE SYSTEM OF
DIFFERENTIAL EQUATIONS) FOR A GIVEN X-VALUE. ITS
PARAMETER LIST MUST BE X,DF. SUBROUTINE DFCT
SHOULD NOT DESTROY X.
OUTP - THE NAME OF AN EXTERNAL OUTPUT SUBROUTINE USED.
ITS PARAMETER LIST MUST BE X,Y,DERY,IHLF,NDIM,PRMT.
NONE OF THESE PARAMETERS (EXCEPT, IF NECESSARY,
PRMT(4),PRMT(5),...) SHOULD BE CHANGED BY
SUBROUTINE OUTP. IF PRMT(5) IS CHANGED TO NON-ZERO,
SUBROUTINE DLBVP IS TERMINATED.
AUX - DOUBLE PRECISION AUXILIARY STORAGE ARRAY WITH 20
ROWS AND NDIM COLUMNS.
A - DOUBLE PRECISION NDIM BY NDIM MATRIX, WHICH IS USED
AS AUXILIARY STORAGE ARRAY.
REMARKS
THE PROCEDURE TERMINATES AND RETURNS TO CALLING PROGRAM, IF
(1) MORE THAN 10 BISECTIONS OF THE INITIAL INCREMENT ARE
NECESSARY TO GET SATISFACTORY ACCURACY (ERROR MESSAGE
IHLF=11),
(2) INITIAL INCREMENT IS EQUAL TO 0 OR IF IT HAS WRONG SIGN
(ERROR MESSAGES IHLF=12 OR IHLF=13),
(3) THERE IS NO OR MORE THAN ONE SOLUTION OF THE PROBLEM
(ERROR MESSAGE IHLF=14),
(4) THE WHOLE INTEGRATION INTERVAL IS WORKED THROUGH,
(5) SUBROUTINE OUTP HAS CHANGED PRMT(5) TO NON-ZERO.
SUBROUTINES AND FUNCTION SUBPROGRAMS REQUIRED
SUBROUTINE DGELG SYSTEM OF LINEAR EQUATIONS.
THE EXTERNAL SUBROUTINES AFCT(X,A), FCT(X,F), DFCT(X,DF),
AND OUTP(X,Y,DERY,IHLF,NDIM,PRMT) MUST BE FURNISHED
BY THE USER.
METHOD
EVALUATION IS DONE USING THE METHOD OF ADJOINT EQUATIONS.
HAMMINGS FOURTH ORDER MODIFIED PREDICTOR-CORRECTOR METHOD
IS USED TO SOLVE THE ADJOINT INITIAL VALUE PROBLEMS AND FI-
NALLY TO SOLVE THE GENERATED INITIAL VALUE PROBLEM FOR Y(X).
THE INITIAL INCREMENT PRMT(3) IS AUTOMATICALLY ADJUSTED.
FOR COMPUTATION OF INTEGRAL SUM, A FOURTH ORDER HERMITEAN
INTEGRATION FORMULA IS USED.
FOR REFERENCE, SEE
(1) LANCE, NUMERICAL METHODS FOR HIGH SPEED COMPUTERS,
ILIFFE, LONDON, 1960, PP.64-67.
(2) RALSTON/WILF, MATHEMATICAL METHODS FOR DIGITAL
COMPUTERS, WILEY, NEW YORK/LONDON, 1960, PP.95-109.
(3) RALSTON, RUNGE-KUTTA METHODS WITH MINIMUM ERROR BOUNDS,
MTAC, VOL.16, ISS.80 (1962), PP.431-437.
(4) ZURMUEHL, PRAKTISCHE MATHEMATIK FUER INGENIEURE UND
PHYSIKER, SPRINGER, BERLIN/GOETTINGEN/HEIDELBERG, 1963,
PP.227-232.