colloc Subroutine

subroutine colloc(aleft, aright, lbegin, iorder, ntimes, addbrk, relerr)

************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).

Arguments

Type IntentOptional 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

Calls

proc~~colloc~2~~CallsGraph proc~colloc~2 colloc bsplpp bsplpp proc~colloc~2->bsplpp colpnt colpnt proc~colloc~2->colpnt difequ difequ proc~colloc~2->difequ eqblok eqblok proc~colloc~2->eqblok knots knots proc~colloc~2->knots newnot newnot proc~colloc~2->newnot slvblk slvblk proc~colloc~2->slvblk

Common Blocks

colloc (subroutine)
difequ (subroutine)
l2err (subroutine)
difequ (subroutine)
l2err (subroutine)
"> common /approx/

Type Attributes Name Initial
real :: break(npiece)
real :: coef(ncoef)
integer(kind=4) :: l
integer(kind=4) :: kpm

colloc (subroutine)
difequ (subroutine)
eqblok (subroutine)
putit (subroutine)
difequ (subroutine)
eqblok (subroutine)
putit (subroutine)
"> common /other/

Type Attributes Name Initial
integer(kind=4) :: itermx
integer(kind=4) :: k
real :: rho(19)

colloc (subroutine)
difequ (subroutine)
eqblok (subroutine)
putit (subroutine)
difequ (subroutine)
eqblok (subroutine)
putit (subroutine)
"> common /side/

Type Attributes Name Initial
integer(kind=4) :: m
integer(kind=4) :: iside
real :: xside(10)