************80
! COLLOC solves an ordinary differential equation by collocation.
Method:
The M-th order ordinary differential equation with M side
conditions, to be specified in subroutine DIFEQU, is solved
approximately by collocation.
The approximation F to the solution G is piecewise polynomial of order
K+M with L pieces and M-1 continuous derivatives. F is determined by
the requirement that it satisfy the differential equation at K points
per interval (to be specified in COLPNT ) and the M side conditions.
This usually nonlinear system of equations for F is solved by
Newton's method. the resulting linear system for the B-coefficients of an
iterate is constructed appropriately in EQBLOK and then solved
in SLVBLK, a program designed to solve almost block
diagonal linear systems efficiently.
There is an opportunity to attempt improvement of the breakpoint
sequence, both in number and location, through the use of NEWNOT.
Printed output consists of the piecewise polynomial representation
of the approximate solution, and of the error at selected points.
Modified:
14 February 2007
Author:
Carl DeBoor
Reference:
Carl DeBoor,
A Practical Guide to Splines,
Springer, 2001,
ISBN: 0387953663,
LC: QA1.A647.v27.
Parameters:
Input, real ( kind = 8 ) ALEFT, ARIGHT, the endpoints of the interval.
Input, integer ( kind = 4 ) LBEGIN, the initial number of polynomial
pieces in the approximation. A uniform breakpoint sequence will be chosen.
Input, integer ( kind = 4 ) IORDER, the order of the polynomial pieces
to be used in the approximation
Input, integer ( kind = 4 ) NTIMES, the number of passes to be made
through NEWNOT.
Input, real ( kind = 8 ) ADDBRK, the number, possibly fractional, of
breaks to be added per pass through NEWNOT. For instance, if
ADDBRK = 0.33334, then a breakpoint will be added at every third pass
through NEWNOT.
Input, real ( kind = 8 ) RELERR, a tolerance. Newton iteration is
stopped if the difference between the B-coefficients of two successive
iterates is no more than RELERR*(absolute largest B-coefficient).
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
real(kind=8) | :: | aleft | ||||
real(kind=8) | :: | aright | ||||
integer(kind=4) | :: | lbegin | ||||
integer(kind=4) | :: | iorder | ||||
integer(kind=4) | :: | ntimes | ||||
real(kind=8) | :: | addbrk | ||||
real(kind=8) | :: | relerr |
Type | Attributes | Name | Initial | |||
---|---|---|---|---|---|---|
real | :: | break(npiece) | ||||
real | :: | coef(ncoef) | ||||
integer(kind=4) | :: | l | ||||
integer(kind=4) | :: | kpm |