d02cjf

d02cjf © Numerical Algorithms Group, 2002.

Purpose

D02CJF ODEs, IVP, Adams method, until function of solution is zero, intermediate output (simple driver)

Synopsis

[x,y,ifail] = d02cjf(x,xend,y,fcn,tol,output,g<,relabs,ifail>)

Description

 
 The routine advances the solution of a system of ordinary 
 differential equations
 
               y' =f (x,y ,y ,...,y ),  i=1,2,...,n,
                 i  i    1  2      n
 
 from x = X to x = XEND using a variable-order, variable-step 
 Adams method. The system is defined by a subroutine FCN supplied 
 by the user, which evaluates f  in terms of x and y ,y ,...,y . 
                               i                    1  2      n 
 The initial values of y ,y ,...,y  must be given at x = X.
                        1  2      n                      
 
 The solution is returned via the user-supplied routine OUTPUT at 
 points specified by the user, if desired: this solution is 
              1                                                 
 obtained by C  interpolation on solution values produced by the 
 method. As the integration proceeds a check can be made on the 
 user-specified function g(x,y) to determine an interval where it 
 changes sign. The position of this sign change is then determined
                1                                             
 accurately by C  interpolation to the solution. It is assumed 
 that g(x,y) is a continuous function of the variables, so that a 
 solution of g(x,y)=0.0 can be determined by searching for a 
 change in sign in g(x,y). The accuracy of the integration, the 
 interpolation and, indirectly, of the determination of the 
 position where g(x,y)=0.0, is controlled by the parameters TOL 
 and RELABS.
 

Parameters

d02cjf

Required Input Arguments:

x                                     real
xend                                  real
y (:)                                 real
fcn                                   function (User-Supplied)
tol                                   real
output                                function (User-Supplied)
g                                     function (User-Supplied)

Optional Input Arguments:                       <Default>

relabs (1)                            string   'm'
ifail                                 integer  -1

Output Arguments:

x                                     real
y (:)                                 real
ifail                                 integer