d02gaf

d02gaf © Numerical Algorithms Group, 2002.

Purpose

D02GAF ODEs, boundary value problem, finite difference technique with deferred correction, simple nonlinear problem

Synopsis

[y,np,x,ifail] = d02gaf(u,v,a,b,tol,fcn<,np,mnp,x,ifail>)

Description

 
 D02GAF solves a two-point boundary-value problem for a system of 
 n differential equations in the interval [a,b]. The system is 
 written in the form
 
             y' =f (x,y ,y ,...,y ) , i=1,2,...,n              (1)
               i  i    1  2      n                           
 
 and the derivatives are evaluated by a subroutine FCN supplied by
 the user. Initially, n boundary values of the variables y  must 
                                                          i     
 be specified (assigned), some at a and some at b. The user also 
 supplies estimates of the remaining n boundary values and all the
 boundary values are used in constructing an initial approximation
 to the solution. This approximate solution is corrected by a 
 finite-difference technique with deferred correction allied with 
 a Newton iteration to solve the finite-difference equations. 
 
 The user supplies an absolute error tolerance and may also supply
 an initial mesh for the construction of the finite-difference 
 equations (alternatively a default mesh is used). The algorithm 
 constructs a solution on a mesh defined by adding points to the 
 initial mesh. This solution is chosen so that the error is 
 everywhere less than the user's tolerance and so that the error 
 is approximately equidistributed on the final mesh. The solution 
 is returned on this final mesh.
 
 If the solution is required at a few specific points then these 
 should be included in the initial mesh. If on the other hand the 
 solution is required at several specific points then the user 
 should use the interpolation routines provided in Chapter E01 if 
 these points do not themselves form a convenient mesh.
 

Parameters

d02gaf

Required Input Arguments:

u (:,2)                               real
v (:,2)                               real
a                                     real
b                                     real
tol                                   real
fcn                                   function (User-Supplied)

Optional Input Arguments:                       <Default>

np                                    integer  0
mnp                                   integer  max(2*np,64)
x (mnp)                               real     zeros(mnp,1)
ifail                                 integer  -1

Output Arguments:

y (:,mnp)                             real
np                                    integer
x (mnp)                               real
ifail                                 integer