d02ejf

d02ejf © Numerical Algorithms Group, 2002.

Purpose

D02EJF ODEs, stiff IVP, BDF method, until function of solution is zero, intermediate output (simple driver)

Synopsis

[x,y,tol,ifail] = d02ejf(x,xend,y,fcn,pederv,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 
 method implementing the BDF. The system is defined by a 
 subroutine FCN supplied by the user, which evaluates f  in terms 
                                                       i         
 of x and y ,y ,...,y . The initial values of y ,y ,...,y  must 
           1  2      n                         1  2      n
 be given at x = X.
 
 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. The Jacobian of the system y'=f(x,y) may be supplied 
 in routine PEDERV, if it is available.
 

Parameters

d02ejf

Required Input Arguments:

x                                     real
xend                                  real
y (:)                                 real
fcn                                   function (User-Supplied)
pederv                                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
tol                                   real
ifail                                 integer