hide long namesshow long names
hide short namesshow short names
Integer type:  int32  int64  nag_int  show int32  show int32  show int64  show int64  show nag_int  show nag_int

PDF version (NAG web site, 64-bit version, 64-bit version)
Chapter Contents
Chapter Introduction
NAG Toolbox

NAG Toolbox: nag_pde_2d_ellip_fd_iter (d03ua)

Purpose

nag_pde_2d_ellip_fd_iter (d03ua) performs at each call one iteration of the Strongly Implicit Procedure. It is used to calculate on successive calls a sequence of approximate corrections to the current estimate of the solution when solving a system of simultaneous algebraic equations for which the iterative update matrix is of five-point molecule form on a two-dimensional topologically-rectangular mesh. (‘Topological’ means that a polar grid (r,θ)(r,θ), for example, can be used as it is equivalent to a rectangular box.)

Syntax

[r, ifail] = d03ua(n1, a, b, c, d, e, aparam, it, r, 'n2', n2)
[r, ifail] = nag_pde_2d_ellip_fd_iter(n1, a, b, c, d, e, aparam, it, r, 'n2', n2)

Description

Given a set of simultaneous equations
Mt = q
Mt=q
(1)
(which could be nonlinear) derived, for example, from a finite difference representation of a two-dimensional elliptic partial differential equation and its boundary conditions, the solution tt may be obtained iteratively from a starting approximation t(1)t (1)  by the formulae
r(n) = qMt(n)
Ms(n) = r(n)
t(n + 1) = t(n) + s(n).
r(n) = q-Mt(n) Ms(n) = r (n) t (n+1) = t (n) +s (n) .
Thus r(n)r (n)  is the residual of the nnth approximate solution t(n)t (n) , and s(n)s (n)  is the update change vector.
nag_pde_2d_ellip_fd_iter (d03ua) determines the approximate change vector ss corresponding to a given residual rr, i.e., it determines an approximate solution to a set of equations
Ms = r
Ms=r
(2)
where MM is a square (n1 × n2)(n1×n2) by (n1 × n2)(n1×n2) matrix and rr is a known vector of length n1 × n2n1×n2. The set of equations (2) must be of five-diagonal form
aij si,j1 + bij si1,j + cij sij + dij si + 1,j + eij si,j + 1 = rij ,
aij si,j-1 + bij si-1,j + cij sij + dij si+1,j + eij si,j+1 = rij ,
for i = 1,2,,n1i=1,2,,n1 and j = 1,2,,n2j=1,2,,n2, provided that cij0.0cij0.0. Indeed, if cij = 0.0cij=0.0, then the equation is assumed to be
sij = rij.
sij=rij.
For example, if n1 = 3n1=3 and n2 = 2n2=2, the equations take the form
[ c11 d11 e11 b21 c21 d21 e21 b31 c31 e31 a12 c12 d12 a22 b22 c22 d22 a32 b32 c32 ]
[ s11 s21 s31 s12 s22 s32 ]
=
[ r11 r21 r31 r12 r22 r32 ]
.
[ c11 d11 e11 b21 c21 d21 e21 b31 c31 e31 a12 c12 d12 a22 b22 c22 d22 a32 b32 c32 ] [ s11 s21 s31 s12 s22 s32 ]=[ r11 r21 r31 r12 r22 r32 ] .
The calling program supplies the current residual rr at each iteration and the coefficients of the five-point molecule system of equations on which the update procedure is based. The function performs one iteration, using the approximate LULU factorization of the Strongly Implicit Procedure with the necessary acceleration parameter adjustment, to calculate the approximate solution ss of the set of equations (2). The change ss overwrites the residual array for return to the calling program. The calling program must combine this change stored in rr with the old approximation to obtain the new approximate solution for tt. It must then recalculate the residuals and, if the accuracy requirements have not been satisfied, commence the next iterative cycle.
Clearly there is no requirement that the iterative update matrix passed in the form of the five-diagonal element arrays a, b, c, d and e is the same as that used to calculate the residuals, and therefore the one governing the problem. However, the convergence may be impaired if they are not equal. Indeed, if the system of equations (1) is not precisely of the five-diagonal form illustrated above but has a few additional terms, then the methods of deferred or defect correction can be employed. The residual is calculated by the calling program using the full system of equations, but the update formula is based on a five-diagonal system (2) of the form given above. For example, the solution of a system of nine-diagonal equations each involving the combination of terms with ti ± 1,j ± 1,ti ± 1,j,ti,j ± 1ti±1,j±1,ti±1,j,ti,j±1 and tijtij could use the five-diagonal coefficients on which to base the update, provided these incorporate the major features of the equations.
Problems in topologically non-rectangular regions can be solved using the function by surrounding the region with a circumscribing topological rectangle. The equations for the nodal values external to the region of interest are set to zero (i.e., cij = rij = 0cij=rij=0) and the boundary conditions are incorporated into the equations for the appropriate nodes.
If there is no better initial approximation when starting the iterative cycle, one can use an array of all zeros as the initial approximation from which the first set of residuals are determined.
The function can be used to solve linear elliptic equations in which case the arrays a, b, c, d, e and the quantities qq will be unchanged during the iterative cycles, or for solving nonlinear elliptic equations in which case some or all of these arrays may require updating as each new approximate solution is derived. Depending on the nonlinearity, some under-relaxation of the coefficients and/or source terms may be needed during their recalculation using the new estimates of the solution (see Jacobs (1972)).
The function can also be used to solve each step of a time-dependent parabolic equation in two space dimensions. The solution at each time step can be expressed in terms of an elliptic equation if the Crank–Nicolson or other form of implicit time integration is used.
Neither diagonal dominance, nor positive-definiteness, of the matrix MM or of the update matrix formed from the arrays a, b, c, d and e is necessary to ensure convergence.
For problems in which the solution is not unique, in the sense that an arbitrary constant can be added to the solution (for example Laplace's equation with all Neumann boundary conditions), the calling program should subtract a typical nodal value from the whole solution tt at every iteration to keep rounding errors to a minimum.

References

Ames W F (1977) Nonlinear Partial Differential Equations in Engineering (2nd Edition) Academic Press
Jacobs D A H (1972) The strongly implicit procedure for the numerical solution of parabolic and elliptic partial differential equations Note RD/L/N66/72 Central Electricity Research Laboratory
Stone H L (1968) Iterative solution of implicit approximations of multi-dimensional partial differential equations SIAM J. Numer. Anal. 5 530–558

Parameters

Compulsory Input Parameters

1:     n1 – int64int32nag_int scalar
The number of nodes in the first coordinate direction, n1n1.
Constraint: n1 > 1n1>1.
2:     a(lda,n2) – double array
lda, the first dimension of the array, must satisfy the constraint ldan1ldan1.
a(i,j)aij must contain the coefficient of the ‘southerly’ term involving si,j1si,j-1 in the (i,j)(i,j)th equation of the system (2), for i = 1,2,,n1i=1,2,,n1 and j = 1,2,,n2j=1,2,,n2. The elements of a, for j = 1j=1, must be zero after incorporating the boundary conditions, since they involve nodal values from outside the rectangle.
3:     b(lda,n2) – double array
lda, the first dimension of the array, must satisfy the constraint ldan1ldan1.
b(i,j)bij must contain the coefficient of the ‘westerly’ term involving si1,jsi-1,j in the (i,j)(i,j)th equation of the system (2), for i = 1,2,,n1i=1,2,,n1 and j = 1,2,,n2j=1,2,,n2. The elements of b, for i = 1i=1, must be zero after incorporating the boundary conditions, since they involve nodal values from outside the rectangle.
4:     c(lda,n2) – double array
lda, the first dimension of the array, must satisfy the constraint ldan1ldan1.
c(i,j)cij must contain the coefficient of the ‘central’ term involving sijsij in the (i,j)(i,j)th equation of the system (2), for i = 1,2,,n1i=1,2,,n1 and j = 1,2,,n2j=1,2,,n2. The elements of c are checked to ensure that they are nonzero. If any element is found to be zero, the corresponding algebraic equation is assumed to be sij = rijsij=rij. This feature can be used to define the equations for nodes at which, for example, Dirichlet boundary conditions are applied, or for nodes external to the problem of interest, by setting c(i,j) = 0.0cij=0.0 at appropriate points. The corresponding value of r(i,j)rij is set equal to the appropriate value, namely the difference between the prescribed value of tijtij and the current value of tijtij in the Dirichlet case, or zero at an external point.
5:     d(lda,n2) – double array
lda, the first dimension of the array, must satisfy the constraint ldan1ldan1.
d(i,j)dij must contain the coefficient of the ‘easterly’ term involving si + 1,jsi+1,j in the (i,j)(i,j)th equation of the system (2), for i = 1,2,,n1i=1,2,,n1 and j = 1,2,,n2j=1,2,,n2. The elements of d, for i = n1i=n1, must be zero after incorporating the boundary conditions, since they involve nodal values from outside the rectangle.
6:     e(lda,n2) – double array
lda, the first dimension of the array, must satisfy the constraint ldan1ldan1.
e(i,j)eij must contain the coefficient of the ‘northerly’ term involving si,j + 1si,j+1 in the (i,j)(i,j)th equation of the system (2), for i = 1,2,,n1i=1,2,,n1 and j = 1,2,,n2j=1,2,,n2. The elements of e, for j = n2j=n2, must be zero after incorporating the boundary conditions, since they involve nodal values from outside the rectangle.
7:     aparam – double scalar
The iteration acceleration factor. A value of 1.01.0 is adequate for most typical problems. However, if convergence is slow, the value can be reduced, typically to 0.20.2 or 0.10.1. If divergence is obtained, the value can be increased, typically to 2.02.0, 5.05.0 or 10.010.0.
Constraint: 0.0 < aparam((n11)2 + (n21)2) / 2.00.0<aparam( (n1-1) 2+ (n2-1) 2)/2.0.
8:     it – int64int32nag_int scalar
The iteration number. It must be initialized, but not necessarily to 11, before the first call, and must be incremented by one in the calling program for each subsequent call. nag_pde_2d_ellip_fd_iter (d03ua) uses the counter to select the appropriate acceleration parameter from a sequence of nine, each one being used twice in succession. (Note that the acceleration parameter depends on the value of aparam.)
9:     r(lda,n2) – double array
lda, the first dimension of the array, must satisfy the constraint ldan1ldan1.
r(i,j)rij must contain the current residual rijrij on the right-hand side of the (i,j)(i,j)th equation of the system (2), for i = 1,2,,n1i=1,2,,n1 and j = 1,2,,n2j=1,2,,n2.

Optional Input Parameters

1:     n2 – int64int32nag_int scalar
Default: The second dimension of the arrays a, b, c, d, e, r. (An error is raised if these dimensions are not equal.)
The number of nodes in the second coordinate direction, n2n2.
Constraint: n2 > 1n2>1.

Input Parameters Omitted from the MATLAB Interface

lda wrksp1 wrksp2

Output Parameters

1:     r(lda,n2) – double array
ldan1ldan1.
These residuals store the corresponding components of solution ss to the system (2), i.e., the changes to be made to the vector tt to reduce the residuals supplied.
2:     ifail – int64int32nag_int scalar
ifail = 0ifail=0 unless the function detects an error (see [Error Indicators and Warnings]).

Error Indicators and Warnings

Errors or warnings detected by the function:
  ifail = 1ifail=1
On entry,n1 < 2n1<2,
orn2 < 2n2<2.
  ifail = 2ifail=2
On entry,lda < n1lda<n1.
  ifail = 3ifail=3
On entry,aparam0.0aparam0.0.
  ifail = 4ifail=4
On entry,aparam > ((n11)2 + (n21)2) / 2.0aparam>( (n1-1) 2+ (n2-1) 2)/2.0.

Accuracy

The improvement in accuracy for each iteration, i.e., on each call, depends on the size of the system and on the condition of the update matrix characterised by the five-diagonal coefficient arrays. The ultimate accuracy obtainable depends on the above factors and on the machine precision. However, since nag_pde_2d_ellip_fd_iter (d03ua) works with residuals and the update vector, the calling program can, in most cases where at each iteration all the residuals are usually of about the same size, calculate the residuals from extended precision values of the function, source term and equation coefficients if greater accuracy is required. The rate of convergence obtained with the Strongly Implicit Procedure is not always smooth because of the cyclic use of nine acceleration parameters. The convergence may become slow with very large problems. The final accuracy obtained can be judged approximately from the rate of convergence determined from the changes to the dependent variable tt and in particular the change on the last iteration.

Further Comments

The time taken is approximately proportional to n1 × n2n1×n2 for each call.
When used with deferred or defect correction, the residual is calculated in the calling program from a different system of equations to those represented by the five-point molecule coefficients used by nag_pde_2d_ellip_fd_iter (d03ua) as the basis of the iterative update procedure. When using deferred correction the overall rate of convergence depends not only on the items detailed in Section [Accuracy] but also on the difference between the two coefficient matrices used.
Convergence may not always be obtained when the problem is very large and/or the coefficients of the equations have widely disparate values. The latter case may be associated with an ill-conditioned matrix.

Example

function nag_pde_2d_ellip_fd_iter_example
n1 = int64(6);
a = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0;
     0, 0.6666666666666666, 0.2, 0.09523809523809523, 0.05555555555555555, ...
    0.03636363636363636, 0.02564102564102564, 0.01904761904761905, ...
    0.01470588235294118, 0;
     0, 0.6666666666666666, 0.2, 0.09523809523809523, 0.05555555555555555, ...
    0.03636363636363636, 0.02564102564102564, 0.01904761904761905, ...
    0.01470588235294118, 0;
     0, 0.6666666666666666, 0.2, 0.09523809523809523, 0.05555555555555555, ...
    0.03636363636363636, 0.02564102564102564, 0.01904761904761905, ...
    0.01470588235294118, 0;
     0, 0.6666666666666666, 0.2, 0.09523809523809523, 0.05555555555555555, ...
    0.03636363636363636, 0.02564102564102564, 0.01904761904761905, ...
    0.01470588235294118, 0;
     0, 0, 0, 0, 0, 0, 0, 0, 0, 0];
b = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0;
     0, 0.6666666666666666, 0.6666666666666666, 0.6666666666666666, ...
    0.6666666666666666, 0.6666666666666666, 0.6666666666666666, ...
    0.6666666666666666, 0.6666666666666666, 0;
     0, 0.2, 0.2, 0.2, 0.2, 0.2, 0.2, 0.2, 0.2, 0;
     0, 0.09523809523809523, 0.09523809523809523, 0.09523809523809523, ...
    0.09523809523809523, 0.09523809523809523, 0.09523809523809523, ...
    0.09523809523809523, 0.09523809523809523, 0;
     0, 0.05555555555555555, 0.05555555555555555, 0.05555555555555555, ...
    0.05555555555555555, 0.05555555555555555, 0.05555555555555555, ...
    0.05555555555555555, 0.05555555555555555, 0;
     0, 0, 0, 0, 0, 0, 0, 0, 0, 0];
c = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0;
     0, -2, -1.333333333333333, -1.166666666666667, -1.1, -1.066666666666667, ...
    -1.047619047619048, -1.035714285714286, -1.027777777777778, 0;
     0, -1.333333333333333, -0.6666666666666667, -0.5, -0.4333333333333333, ...
    -0.4, -0.380952380952381, -0.3690476190476191, -0.3611111111111111, 0;
     0, -1.166666666666667, -0.5, -0.3333333333333333, -0.2666666666666667, ...
    -0.2333333333333333, -0.2142857142857143, -0.2023809523809524, ...
    -0.1944444444444444, 0;
     0, -1.1, -0.4333333333333333, -0.2666666666666667, -0.2, ...
    -0.1666666666666667, -0.1476190476190476, -0.1357142857142857, ...
    -0.1277777777777778, 0;
     0, 0, 0, 0, 0, 0, 0, 0, 0, 0];
d = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0;
     0, 0.3333333333333333, 0.3333333333333333, 0.3333333333333333, ...
    0.3333333333333333, 0.3333333333333333, 0.3333333333333333, ...
    0.3333333333333333, 0.3333333333333333, 0;
     0, 0.1333333333333333, 0.1333333333333333, 0.1333333333333333, ...
    0.1333333333333333, 0.1333333333333333, 0.1333333333333333, ...
    0.1333333333333333, 0.1333333333333333, 0;
     0, 0.07142857142857142, 0.07142857142857142, 0.07142857142857142, ...
    0.07142857142857142, 0.07142857142857142, 0.07142857142857142, ...
    0.07142857142857142, 0.07142857142857142, 0;
     0, 0.04444444444444445, 0.04444444444444445, 0.04444444444444445, ...
    0.04444444444444445, 0.04444444444444445, 0.04444444444444445, ...
    0.04444444444444445, 0.04444444444444445, 0;
     0, 0, 0, 0, 0, 0, 0, 0, 0, 0];
e = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0;
     0, 0.3333333333333333, 0.1333333333333333, 0.07142857142857142, ...
    0.04444444444444445, 0.0303030303030303, 0.02197802197802198, ...
    0.01666666666666667, 0.0130718954248366, 0;
     0, 0.3333333333333333, 0.1333333333333333, 0.07142857142857142, ...
    0.04444444444444445, 0.0303030303030303, 0.02197802197802198, ...
    0.01666666666666667, 0.0130718954248366, 0;
     0, 0.3333333333333333, 0.1333333333333333, 0.07142857142857142, ...
    0.04444444444444445, 0.0303030303030303, 0.02197802197802198, ...
    0.01666666666666667, 0.0130718954248366, 0;
     0, 0.3333333333333333, 0.1333333333333333, 0.07142857142857142, ...
    0.04444444444444445, 0.0303030303030303, 0.02197802197802198, ...
    0.01666666666666667, 0.0130718954248366, 0;
     0, 0, 0, 0, 0, 0, 0, 0, 0, 0];
aparam = 1;
it = int64(1);
r = [1.022470974998333, 1.022218523418408, 1.020199658691349, ...
    1.013395800771301, 0.9973285010313558, 0.9661910502298774, ...
    0.9131411732014387, 0.8308448419408389, 0.7123623883940765, ...
    0.5524434254748445;
     1.045446894714042, 0, 0, 0, 0, 0, 0, 0, 0, 0.5648573678766832;
     1.092959209667233, 0, 0, 0, 0, 0, 0, 0, 0, 0.5905283812030258;
     1.168306840199909, 0, 0, 0, 0, 0, 0, 0, 0, 0.6312388797215314;
     1.276911720713716, 0, 0, 0, 0, 0, 0, 0, 0, 0.6899183470916745;
     1.426973196997562, 1.426620872435886, 1.423803319738234, ...
    1.414307771086494, 1.391884047931845, 1.348428234707795, ...
    1.274391167177617, 1.159537384731323, 0.9941818004067758, ...
    0.770996908749814];
[rOut, ifail] = nag_pde_2d_ellip_fd_iter(n1, a, b, c, d, e, aparam, it, r)
 

rOut =

  Columns 1 through 9

    1.0225    1.0222    1.0202    1.0134    0.9973    0.9662    0.9131    0.8308    0.7124
    1.0454    1.0440    1.0396    1.0312    1.0144    0.9829    0.9292    0.8457    0.7256
    1.0930    1.0892    1.0820    1.0705    1.0517    1.0188    0.9634    0.8773    0.7536
    1.1683    1.1634    1.1537    1.1397    1.1179    1.0818    1.0226    0.9312    0.8004
    1.2769    1.2728    1.2637    1.2493    1.2257    1.1856    1.1198    1.0189    0.8750
    1.4270    1.4266    1.4238    1.4143    1.3919    1.3484    1.2744    1.1595    0.9942

  Column 10

    0.5524
    0.5649
    0.5905
    0.6312
    0.6899
    0.7710


ifail =

                    0


function d03ua_example
n1 = int64(6);
a = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0;
     0, 0.6666666666666666, 0.2, 0.09523809523809523, 0.05555555555555555, ...
    0.03636363636363636, 0.02564102564102564, 0.01904761904761905, ...
    0.01470588235294118, 0;
     0, 0.6666666666666666, 0.2, 0.09523809523809523, 0.05555555555555555, ...
    0.03636363636363636, 0.02564102564102564, 0.01904761904761905, ...
    0.01470588235294118, 0;
     0, 0.6666666666666666, 0.2, 0.09523809523809523, 0.05555555555555555, ...
    0.03636363636363636, 0.02564102564102564, 0.01904761904761905, ...
    0.01470588235294118, 0;
     0, 0.6666666666666666, 0.2, 0.09523809523809523, 0.05555555555555555, ...
    0.03636363636363636, 0.02564102564102564, 0.01904761904761905, ...
    0.01470588235294118, 0;
     0, 0, 0, 0, 0, 0, 0, 0, 0, 0];
b = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0;
     0, 0.6666666666666666, 0.6666666666666666, 0.6666666666666666, ...
    0.6666666666666666, 0.6666666666666666, 0.6666666666666666, ...
    0.6666666666666666, 0.6666666666666666, 0;
     0, 0.2, 0.2, 0.2, 0.2, 0.2, 0.2, 0.2, 0.2, 0;
     0, 0.09523809523809523, 0.09523809523809523, 0.09523809523809523, ...
    0.09523809523809523, 0.09523809523809523, 0.09523809523809523, ...
    0.09523809523809523, 0.09523809523809523, 0;
     0, 0.05555555555555555, 0.05555555555555555, 0.05555555555555555, ...
    0.05555555555555555, 0.05555555555555555, 0.05555555555555555, ...
    0.05555555555555555, 0.05555555555555555, 0;
     0, 0, 0, 0, 0, 0, 0, 0, 0, 0];
c = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0;
     0, -2, -1.333333333333333, -1.166666666666667, -1.1, -1.066666666666667, ...
    -1.047619047619048, -1.035714285714286, -1.027777777777778, 0;
     0, -1.333333333333333, -0.6666666666666667, -0.5, -0.4333333333333333, ...
    -0.4, -0.380952380952381, -0.3690476190476191, -0.3611111111111111, 0;
     0, -1.166666666666667, -0.5, -0.3333333333333333, -0.2666666666666667, ...
    -0.2333333333333333, -0.2142857142857143, -0.2023809523809524, ...
    -0.1944444444444444, 0;
     0, -1.1, -0.4333333333333333, -0.2666666666666667, -0.2, ...
    -0.1666666666666667, -0.1476190476190476, -0.1357142857142857, ...
    -0.1277777777777778, 0;
     0, 0, 0, 0, 0, 0, 0, 0, 0, 0];
d = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0;
     0, 0.3333333333333333, 0.3333333333333333, 0.3333333333333333, ...
    0.3333333333333333, 0.3333333333333333, 0.3333333333333333, ...
    0.3333333333333333, 0.3333333333333333, 0;
     0, 0.1333333333333333, 0.1333333333333333, 0.1333333333333333, ...
    0.1333333333333333, 0.1333333333333333, 0.1333333333333333, ...
    0.1333333333333333, 0.1333333333333333, 0;
     0, 0.07142857142857142, 0.07142857142857142, 0.07142857142857142, ...
    0.07142857142857142, 0.07142857142857142, 0.07142857142857142, ...
    0.07142857142857142, 0.07142857142857142, 0;
     0, 0.04444444444444445, 0.04444444444444445, 0.04444444444444445, ...
    0.04444444444444445, 0.04444444444444445, 0.04444444444444445, ...
    0.04444444444444445, 0.04444444444444445, 0;
     0, 0, 0, 0, 0, 0, 0, 0, 0, 0];
e = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0;
     0, 0.3333333333333333, 0.1333333333333333, 0.07142857142857142, ...
    0.04444444444444445, 0.0303030303030303, 0.02197802197802198, ...
    0.01666666666666667, 0.0130718954248366, 0;
     0, 0.3333333333333333, 0.1333333333333333, 0.07142857142857142, ...
    0.04444444444444445, 0.0303030303030303, 0.02197802197802198, ...
    0.01666666666666667, 0.0130718954248366, 0;
     0, 0.3333333333333333, 0.1333333333333333, 0.07142857142857142, ...
    0.04444444444444445, 0.0303030303030303, 0.02197802197802198, ...
    0.01666666666666667, 0.0130718954248366, 0;
     0, 0.3333333333333333, 0.1333333333333333, 0.07142857142857142, ...
    0.04444444444444445, 0.0303030303030303, 0.02197802197802198, ...
    0.01666666666666667, 0.0130718954248366, 0;
     0, 0, 0, 0, 0, 0, 0, 0, 0, 0];
aparam = 1;
it = int64(1);
r = [1.022470974998333, 1.022218523418408, 1.020199658691349, ...
    1.013395800771301, 0.9973285010313558, 0.9661910502298774, ...
    0.9131411732014387, 0.8308448419408389, 0.7123623883940765, ...
    0.5524434254748445;
     1.045446894714042, 0, 0, 0, 0, 0, 0, 0, 0, 0.5648573678766832;
     1.092959209667233, 0, 0, 0, 0, 0, 0, 0, 0, 0.5905283812030258;
     1.168306840199909, 0, 0, 0, 0, 0, 0, 0, 0, 0.6312388797215314;
     1.276911720713716, 0, 0, 0, 0, 0, 0, 0, 0, 0.6899183470916745;
     1.426973196997562, 1.426620872435886, 1.423803319738234, ...
    1.414307771086494, 1.391884047931845, 1.348428234707795, ...
    1.274391167177617, 1.159537384731323, 0.9941818004067758, ...
    0.770996908749814];
[rOut, ifail] = d03ua(n1, a, b, c, d, e, aparam, it, r)
 

rOut =

  Columns 1 through 9

    1.0225    1.0222    1.0202    1.0134    0.9973    0.9662    0.9131    0.8308    0.7124
    1.0454    1.0440    1.0396    1.0312    1.0144    0.9829    0.9292    0.8457    0.7256
    1.0930    1.0892    1.0820    1.0705    1.0517    1.0188    0.9634    0.8773    0.7536
    1.1683    1.1634    1.1537    1.1397    1.1179    1.0818    1.0226    0.9312    0.8004
    1.2769    1.2728    1.2637    1.2493    1.2257    1.1856    1.1198    1.0189    0.8750
    1.4270    1.4266    1.4238    1.4143    1.3919    1.3484    1.2744    1.1595    0.9942

  Column 10

    0.5524
    0.5649
    0.5905
    0.6312
    0.6899
    0.7710


ifail =

                    0



PDF version (NAG web site, 64-bit version, 64-bit version)
Chapter Contents
Chapter Introduction
NAG Toolbox

© The Numerical Algorithms Group Ltd, Oxford, UK. 2009–2013