on direct methods for solving poisson's equations b. l...

31
On Direct Methods for Solving Poisson's Equations B. L. Buzbee; G. H. Golub; C. W. Nielson SIAM Journal on Numerical Analysis, Vol. 7, No. 4. (Dec., 1970), pp. 627-656. Stable URL: http://links.jstor.org/sici?sici=0036-1429%28197012%297%3A4%3C627%3AODMFSP%3E2.0.CO%3B2-6 SIAM Journal on Numerical Analysis is currently published by Society for Industrial and Applied Mathematics. Your use of the JSTOR archive indicates your acceptance of JSTOR's Terms and Conditions of Use, available at http://www.jstor.org/about/terms.html. JSTOR's Terms and Conditions of Use provides, in part, that unless you have obtained prior permission, you may not download an entire issue of a journal or multiple copies of articles, and you may use content in the JSTOR archive only for your personal, non-commercial use. Please contact the publisher regarding any further use of this work. Publisher contact information may be obtained at http://www.jstor.org/journals/siam.html. Each copy of any part of a JSTOR transmission must contain the same copyright notice that appears on the screen or printed page of such transmission. JSTOR is an independent not-for-profit organization dedicated to and preserving a digital archive of scholarly journals. For more information regarding JSTOR, please contact [email protected]. http://www.jstor.org Wed May 30 08:27:50 2007

Upload: others

Post on 22-Aug-2020

4 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: On Direct Methods for Solving Poisson's Equations B. L ...scgroup.hpclab.ceid.upatras.gr/class/SCII/Various/... · In # 11 we apply the Buneman algorithm to Poisson's equation with

On Direct Methods for Solving Poisson's Equations

B. L. Buzbee; G. H. Golub; C. W. Nielson

SIAM Journal on Numerical Analysis, Vol. 7, No. 4. (Dec., 1970), pp. 627-656.

Stable URL:

http://links.jstor.org/sici?sici=0036-1429%28197012%297%3A4%3C627%3AODMFSP%3E2.0.CO%3B2-6

SIAM Journal on Numerical Analysis is currently published by Society for Industrial and Applied Mathematics.

Your use of the JSTOR archive indicates your acceptance of JSTOR's Terms and Conditions of Use, available athttp://www.jstor.org/about/terms.html. JSTOR's Terms and Conditions of Use provides, in part, that unless you have obtainedprior permission, you may not download an entire issue of a journal or multiple copies of articles, and you may use content inthe JSTOR archive only for your personal, non-commercial use.

Please contact the publisher regarding any further use of this work. Publisher contact information may be obtained athttp://www.jstor.org/journals/siam.html.

Each copy of any part of a JSTOR transmission must contain the same copyright notice that appears on the screen or printedpage of such transmission.

JSTOR is an independent not-for-profit organization dedicated to and preserving a digital archive of scholarly journals. Formore information regarding JSTOR, please contact [email protected].

http://www.jstor.orgWed May 30 08:27:50 2007

Page 2: On Direct Methods for Solving Poisson's Equations B. L ...scgroup.hpclab.ceid.upatras.gr/class/SCII/Various/... · In # 11 we apply the Buneman algorithm to Poisson's equation with

S l A M J Y U M ~ R .Aha1

Vol 7 , No. 4, December 1970

ON DIRECT METHODS FOR SOLVING POISSON'S EQUATIONS*

B. L. BUZBEE,t G . H . GOLUBI AND C. W . NIELSON+

Abstract. Some efficient and accurate direct methods are developed for solving certain elliptic partial difference equations over a rectangle with Dirlchlet. Neumann or periodic boundary con-ditions. Generalizations to higher dimensions and to L-shaped regions are included.

1. Introduction. In many physical applications, one must solve an N x N system of linear algebraic equations,

where M arises from a finite difference approximation to an elliptic partial differen- tial equation. For this reason, the matrix M is sparse and the nonzero elements occur very regularly. As an example, let

and partition x and y to conform with M. If one can interchange both the rows and the columns of a matrix so that it has the form (M - I) , the matrix is said to be two-cyclic [12]. Expanding ( l . l ) , we have

Multiplying the first equation by -F T and adding, we have

By this simple device, we have reduced the number of equations. If (I - F T F ) is also two-cyclic, we can again eliminate a number of the variables and con- tinue until the resulting matrix is no longer two-cyclic. In fact, F has block struc- ture in many applications, and one has the freedom to specify the number of blocks in it. In these cases, a proper choice of the number of blocks may enable the reduction process to continue until the final (I - F T F ) has block dimension one; the reduction methods to be developed impose such a condition.

Direct methods for solving (1.1) are attractive since in theory they yield the exact solution to the difference equation, whereas commonly used methods seek to approximate the solution by iterative procedures [12]. Based on a sugges- tion of one of the authors, Hockney [8] has devised an efficient direct method which uses the reduction process. Also Buneman [2] recently developed an efficient direct method for solving the reduced system of equations. Since these methods offer considerable economy over older techniques [5], the purpose of

* Received by the editors June 2, 1969. and in revised form May 20, 1970. This work was supported by the U.S. Atomic Energy Commission.

t University of California. Los Alamos Scientific Laboratory. Los Alamos. New Mexico 87544. 1Department of Computer Science, Stanford University, Stanford. California 94305.

Page 3: On Direct Methods for Solving Poisson's Equations B. L ...scgroup.hpclab.ceid.upatras.gr/class/SCII/Various/... · In # 11 we apply the Buneman algorithm to Poisson's equation with

628 B . L . HUZHEE, G . H . GOLUB A N D C. W . NIELSON

this paper is to present a unified mathematical development and generalization of them. Additional generalizations are given by George [6].

In $ 2 we develop the method of matrix decomposition or discrete separ* '1 t.ion of variables. In $ 3 we develop the block-cyclic reduction process and techniques for solving the reduced systems. In $$4, 5 and 6 we apply the results of $3 2 and 3 to Poisson's equation on a rectangle with Dirichlet, Neumann and periodic boundary conditions, respectively. Section 7 extends the results of $4 4, 5 and 6 to higher dimensions; $ 8 extends $$2 and 3 to other applications; 4 9 extends $5 9 and 3 to "L-shaped" regions. In 3 10, we show that straightforward applications of the results of $ 3 can result in severe roundoff error in many applications of interest. In 8 11 we develop the Buneman algorithms, which are mathematically equivalent to the reduction process of 4 3, but are not sub-ject to severe roundoff. In # 11 we apply the Buneman algorithm to Poisson's equation with Dirichlet, Neumann and periodic boundaries. Finally, in # 12 we show the stability of the Buneman algorithms.

2. Matrix decomposition. Consider the system of equations

(2.1) Mx = y,

where M is an N x N real symmetric matrix of block tridiagonal form.

The matrices A and T a r e p x p symmetric matrices, and we assume that

AT = TA.

Such a situation arises for those problems that can be handled by the classical separation-of-variables technique. Indeed, the methods we discuss amount to an efficient computer implementation of the idea of separation of variables carried out on a discretized model of the elliptic differential equation. Since A and Tcommute and are symmetric, it is well known [I] that there exists an ortho- gonal matrix Q such that

(2.3) QTAQ = A , QTTQ = Q ,

and A and R arc real diagonal matrices. The matrix Q is the set of cigenvectorc of A and 7: and A and CZ are the diagonal matrices of eigenvalues of A and 7: respectively.

To conform with the matrix M, we write the vectors x and y in partitioned form.

Page 4: On Direct Methods for Solving Poisson's Equations B. L ...scgroup.hpclab.ceid.upatras.gr/class/SCII/Various/... · In # 11 we apply the Buneman algorithm to Poisson's equation with

Furthermore. it is quite natural to write

System (2.2) may be written

(2.5a) Ax, + Tx, = y , ,

(2.5b) T x , - , + Ax, + T x , + , = y , , j = 2,3, . . . , q - 1 ,

( 2 . 5 ~ ) T x , - , + Ax, = p,.

Using (2.3). this becomes

A%, + RE, = y l , -

(2.6) REj- + AXJ + RX,,,, = y j , j = 2,3, . . . , q - 1 ,

RE,_, + AK, = 7,.

where

The components of X i and y j are labeled as in (2.4). Then (2.6) may be rewritten for i = 1.2. . . . . p.

Now let us write

Page 5: On Direct Methods for Solving Poisson's Equations B. L ...scgroup.hpclab.ceid.upatras.gr/class/SCII/Various/... · In # 11 we apply the Buneman algorithm to Poisson's equation with

630 B. L. BUZBEE, G. H. GOLUB AND C. W. NIELSON

so that (2.7) is equivalent to the system of equations

Thus, the vector 9, satisfies a symmetric tridiagonal system of equations that has a constant diagonal element and a constant super- and subdiagonal element. After (2.8) has been solved, it is possible to solve for x, = QS,. Thus the algorithm proceeds as follows :

(i) Compute or determine the eigenvectors of A and the eigenvalues of A and T

(ii) Compute y, = QTp,,j = 1,2, . . . , q . (iii) Solve T,S, = Q,, i = 1, 2, . . . , p . (iv) Compute x, = QIZ,, j = 1,2, . . . , q . Hockney [8] has carefully analyzed this algorithm for solving Poisson's

equation in a square. He has taken advantage of the fact that, in this case, the matrix Q is known and that one can use the fast Fourier transform [4] to perform steps (ii) and (iv). Shintani [I 11 has given methods for solving for the eigenvalues and eigenvectors in a number of special cases.

A and Tneed not commute. Assume that T is positive definite and symmetric. It is well known [I] that there is a matrix P such that

where A is the diagonal matrix of eigenvalues of T p l A and P p T is the matrix of eigenvectors of T-'A. Thus, using (2.9), we modify the algorithm as follows:

(i) Compute or determine the eigenvalues and eigenvectors of T- 'A. (ii) Compute 7, = P plp].

(iii) Solve T,S, = Q, , where

(iv) Compute xi = P-=xj . Of course, one should avoid computing T-'A, because this would destroy the sparseness of the matrices. Golub et a1 [7] has proposed an algorithm for solving Au = 6Tu when A and Ta re sparse.

3. Block-cyclic reduction. In 4 2 we gave a method for which one had to know the eigenvalues and eigenvectors of some matrix. We now give a more direct method for solving the system of (2.1).

We assume again that A and T are symmetric and that A and T commute. Furthermore, we assume that q = m - 1 and m = 2k+', where k is some positive

Page 6: On Direct Methods for Solving Poisson's Equations B. L ...scgroup.hpclab.ceid.upatras.gr/class/SCII/Various/... · In # 11 we apply the Buneman algorithm to Poisson's equation with

integer. Let us rewrite (2%) as follows

Multiplying the first and third equation by T the second equation by - A and adding, we have

Thus, if j is even, the new system of equations involves xj's with even indices. Similar equations hold for x, and x , , . The process of reducing the equations in this fashion is known as cyclic redtrction. Then (2.1) may be written as the following equivalent system :

and

Since m = 2 k + 1and the new system of (3.1) involves x,'s with even indices, the block dimension of the new system of equations is 2k - 1. Note that once (3.1) is solved, it is easy to solve for the x,'s with odd indices, as evidenced by (3.2). We shall refer to the system of (3.2)as the eliminated equations.

Also, note that the algorithm of fi 2 may be applied to system (3.1). Since A and T commute, the matrix ( 2 T 2 - A 2 ) has the same set of eigenvectors as A and 7: Also, if

i ( A )= il, A ( T ) = w l ,

i , (2T2 - A ~ )= 2wf - 2,: for i = 1,2. . . . . m - 1 .

Hockney [8] has advocated this procedure.

Page 7: On Direct Methods for Solving Poisson's Equations B. L ...scgroup.hpclab.ceid.upatras.gr/class/SCII/Various/... · In # 11 we apply the Buneman algorithm to Poisson's equation with

632 B. L . BUZBEE, G . H . GOLUB AND C. W . NIELSON

Since system (3.1)is block tridiagonal and of the form of (2.2),we can apply the reduction repeatedly until we have one block. However, as noted above, we can stop the process after any step and use the methods of fi 2 to solve the resulting equations.

To define the procedure recursively, let

A''' = A , T'O' = T; $" = Y , ~ , j = 1,2, . . . , - .

Then for r = 0,1, . . . , k ,

At each stage, we have a new system of equations

to solve. where

The eliminated equations are the solution of the block diagonal system

where

Page 8: On Direct Methods for Solving Poisson's Equations B. L ...scgroup.hpclab.ceid.upatras.gr/class/SCII/Various/... · In # 11 we apply the Buneman algorithm to Poisson's equation with

ON DIRECT METHODS FOR SOLVING POISSON'S EQUATIONS 633

1 1 We can use the methods of 4 2 to solve the system ~ ( " z " ) = fir), or we can proceed to compute M"") and eliminate half of the unknowns. After k steps, we must solve the system of equations

In either case, we must solve (3.5) to find the eliminated unknowns, just as in (3.2). This can be done by

(i) direct solution, (ii) eigenvalue-eigenvector factorization, or

(iii) polynomial factorization. The direct solution is attractive when k is small. One can form the powers

of A and T quite easily and solve the resulting equations by Gaussian elimination. Thus, if k = 1,and A and Tare tridiagonal matrices, A") is a five diagonal matrix, and for such band matrices it is easy to solve the resulting system of equations.

It is possible to compute the eigenvalueeeigenvector decomposition of A'" and T'". Since A(') = QAQT and T'') = QQQT, we may write

From (3.3), it follows that A('+ 1) = 2(Q('))2 - (A('))2,

Thus the eigenvalues of A") and T") can be generated by the simple rule

Hence, the methods of 4 2 can easily be applied to solving the system M")z(" = fir) and N")w")= g"). Hockney [9] has described this algorithm as the FACR(1) algorithm where 1 refers to the number of cyclic reductions performed.

Page 9: On Direct Methods for Solving Poisson's Equations B. L ...scgroup.hpclab.ceid.upatras.gr/class/SCII/Various/... · In # 11 we apply the Buneman algorithm to Poisson's equation with

634 B. L. BUZBEE. G. H . GOLUB AND C. W. NIELSON

From (3.1), we note that A"' is a polynomial of degree 2 in A and T By induction, it is easy to show that A(" is a polynomial of degree 2' in the matrices A and T SO that

2P- 1

A(') = C ( r ) ~ 2 j ~ 2 r - 2 j1 = 2 j - P2,(A, T ) .

j = O

We shall proceed to determine the linear factors of P2,(A, T ) . Let

For t # 0, we make the substitution

From (3.3),we note that

It is then easy to verify, using (3.7)and (3.8),that

p2,(a, t ) = -2t2"cos 2'0,

and, consequently,

p,,(a, t ) = 0 when al(2t)= -cos 2 r 1 1 ) n--- for j = I , 2, - - , T .

Thus, we may write

and hence

2'

A@"= - n ( A + 2 cos BYIT), j = 1

where 0'," = (2j - 1)n/2'+'. Let us write

G y )= A + 2 cos 0y)T

Then, to solve (3.6),we set z , = -yikI?and repeatedly solve

(3.9) Gy)z i+,= z j for j = 1,2, . . . , 2k

Thus,

Z 2 k f l = X 2 k .

Page 10: On Direct Methods for Solving Poisson's Equations B. L ...scgroup.hpclab.ceid.upatras.gr/class/SCII/Various/... · In # 11 we apply the Buneman algorithm to Poisson's equation with

635 ON DIRECT METHODS FOR SOLVING POISSON'S EQUATIONS

If A and T are of band structure, it is simple to solve (3.9). To determine the solution to the eliminated (3.9, a similar algorithm may be used with

The factorization for A"' may also be used to compute y?"' in (3.3). It is possible, however, to take advantage of the recursive nature of the polynomials p2.(a, t). Let

where. again, for t # 0, alt = -2 cos 0. Then a short manipulation shows that

Therefore, to compute A"'yY' as in (3.3), we compute the following sequence:

2 "' 'Io -- Y, 9 'I1 = A Y ~ ' ,

'Is= -A'Is-l - T2'Is-2 f o r s = 2 , 3 , . . . , 2'.

Thus,

We call this method the cjclic odd-even reduction and,factorization (CORF) algorithm. In 9 10 we will show that the numerical calculation of y:') in (3.3) is subject to severe rounding errors in many cases of interest. Consequently, numerical application of the results of this section must be accompanied by close attention to the results of 9 10. In fact, from a computational viewpoint, the CORF algo-rithm, as developed here, is virtually useless; however, the theoretical results of this section are necessary for the development of the stable, Buneman variants of CORF.

4. Poisson's equation with Dirichlet boundary conditions. It is instructive to apply the results of 5 3 to the solution of the finite difference approximation to Poisson's equation on a rectangle, R, with specified boundary values. Consider the equation

u,, + u,, = f (x,J) for (x, y) E R ,

U(.X,J) = g(x, J) for (ru , J)E ?R

(Here 2R indicates the boundary of R.) We assume that the reader is familiar with the general technique of imposing a mesh of discrete points onto R and approximating (4.1).The equation u,, + u,, = f (w, J.) is approximated at ( w , , J,)

by

i n - lsjslv-1,

Page 11: On Direct Methods for Solving Poisson's Equations B. L ...scgroup.hpclab.ceid.upatras.gr/class/SCII/Various/... · In # 11 we apply the Buneman algorithm to Poisson's equation with

636 B. L . BUZBEE, G. H. GOLUB AND C. W. NIELSON

with

and

Then 2 ,, is an approximati011 to u(x,.j,,), and J,,, = f ( x , , j,,), g,,, = g(x,,I;). Hereafter, we assume that m = 2k+l.

When u(w,y) is specified on the boundary, we have the Dirichlet boundary condition. For simplicity. we shall assume hereafter that Ax = AJ. This leads to the system of equations

where ,V, is of the form of (2.1)with

and

T = In-,.

The matrix In-, indicates the identity matrix of order (n - 1).A and Ta re sym- metric, and commute, and thus, the results of $5 2 and 3 are applicable. In addition, since A is tridiagonal, the use of the factorization (3.10)is greatly simplified.

5. Neumann boundary conditions. When the normal derivative, ?ul?n, is specified on the boundary, we have the Neumann boundary condition. Assume that

when

We make the approximation

This approximation leads to the matrix equation

where M , is of the form

Page 12: On Direct Methods for Solving Poisson's Equations B. L ...scgroup.hpclab.ceid.upatras.gr/class/SCII/Various/... · In # 11 we apply the Buneman algorithm to Poisson's equation with

ON DIRECT METHODS FOR SOLVING POISSON'S EQUATIONS

Here,

Again A and T commute, but M , no longer has the structure given by (2.2). Therefore it is necessary to modify the algorithm of 9 3.

From (5.1),we see that

Tv, - , + Av,+ Tv,+, = y,, j = 1 , 2 , . . . , m - 1 ,

2 T v m _ , + Av, -- Ym.

Performing the cyclic reduction as in 9 3, we have

+ ( 2 T 2 - A2)vm = 2 T y m - , - Ay,.

The similarity of (5.2) to (3.1) should now be evident. Since (5.2) is of block di-mension 2k + 1, after k steps we have the system

and a final reduction yields

Equation (5.4) is equivalent to writing

where Pi?)+> ( A ,T ) is again a polynomial of degree 2 k + 1in A and T. Note that from (3.8) ,

p : ' , ! I ( t r , t )=2t2 '+ ' - [p : \ , ) (o , t ) ]2 , r = 0 , 1 ;... k - 1 .

and from (5.4) ,

p p +I ( u , t ) = 4 f + - [p$)(u,t ) ] .

Therefore, since p2,(u. t ) = -2t2' cos 2kQ,

pY>+,(u. t ) = (2t2' sin 2k8)2.

Page 13: On Direct Methods for Solving Poisson's Equations B. L ...scgroup.hpclab.ceid.upatras.gr/class/SCII/Various/... · In # 11 we apply the Buneman algorithm to Poisson's equation with

- -

638 B . L. BUZBEE, G. H. GOLUB AND C. W. NIELSON

and, thus,

p$)+ , ( ( I . t ) = 0 when o/2t = -cos - for j = 1 - 2 . . . . . 2k+ 1

2

Consequently. we may rewrite (5 .5 )as

= -Y2k( k + 1 ) .n [ A + 2 cos @ j k + ' ) ~ ] v Z k i = 1

where O:k+ = j n 1 2 ~ .Again. v , ~is determined by solving 2k+' tridiagonal systems. The other components of v are solved in the manner indicated in 3 3.

Note that the application of matrix decomposition to this problem only requires the modification of the tridiagonal matrices r, in ( 2 . 8 ) ;i.e.. the first superdiagonal and the last subdiagonal elements must be 2 0 , .

It is well known that the solution to Poisson's equation is not unique in this case. Therefore. we would expect the finite difference approximation to be singular. This is easy to verify by noting that

where e1 = (1. 1, . . . . 1 ) . In addition. one of the systems of the tridiagonal matrices in (5 .6 ) is also singular. On a uniform mesh, the eigenvalues of ( A + 2 cos 0,T)satisfy the equation

;.,(A + 2 cos f t iT)= 4 - 2 cos -[:) + 2 cos '3 .(F)

Then j., = 0 when j = 2k.Similarly. one can show that Toof matrix decomposition is singular. Normally, the physics of the problem determines the coefficient of the homogeneous solution for the singular case.

6. Periodic boundary conditions. In this section, we shall consider the problem of solving the finite difference approximation to Poisson's equation over a rectangle when

The periodic boundary conditions (6 .1 ) lead to the matrix equation

Page 14: On Direct Methods for Solving Poisson's Equations B. L ...scgroup.hpclab.ceid.upatras.gr/class/SCII/Various/... · In # 11 we apply the Buneman algorithm to Poisson's equation with

ON DIRECT METHODS FOR SOLVING POISSON'S EQUATIONS 639

where

- A T O . . O T -

M , =

T A T .

0 . . .

. .. 0 .

.

.

.

. O

0

0

0 ,. T A T

and

- T O . . O T A ,

Note that M , is "almost" an MI block tridiagonal system and. similarly. A is "almost" an 11 x n tridiagonal matrix. The cyclic reduction can again be performed on (6.2) ,and this leads to the reduced system

The similarity with the previous cases is again evident. Equation (6.3)has block dimension 2k. After (k - 1) reductions. we have

r A ( k p l ) ~ ( k - 1 ) 0 ~ ( k - l ) ]

and finally. after k reductions,

Page 15: On Direct Methods for Solving Poisson's Equations B. L ...scgroup.hpclab.ceid.upatras.gr/class/SCII/Various/... · In # 11 we apply the Buneman algorithm to Poisson's equation with

640 B. L. BUZBEE,G. H. GOLUB AND C. W. NIELSON

From (6.4),the final equation becomes

[ 4 ~ ( k ) 2- ]v2k I ) ,~ ( k ) 2 = y$kk+

which is equivalent to

PK'+, ( A , T)v2k = yik2') .

The analysis of the factorization of P$'+,(A, T) is identical to that of the Neu- mann case, including the fact that one of the factors of the polynomial must be singular.

Again, the application of matrix decomposition to (6.2) is straightforward; however. the resulting T i matrices are no longer tridiagonal, since co, appears in the ( ~ , I I )and (n. 1 ) elements. Standard algorithms for solving tridiagonal systems can be modified to solve these systems such that storage of the full n x n matrix is avoided. As above, one of the T,will be singular.

7. Higher-dimensional problems. It is not difficult to extend the applications given in $5 4, 5 and 6 to higher-dimensional problems. We show this by a simple example. Consider Poisson's equation in three dimensions over the rectangle R :

Again, we assume that the mesh is uniform in each direction, so that

y J + ~= yJ + A J , j = 0, I , . . . , m ,

z ,+ , = Z , + A z , 1 = 0,1, . . . ,p .

At the point ( x i , yJ , z ,) , we approximate u(.xi,J,, z,) by v ~ , ~ , , .Let

where

Assume that the usual finite difference approximation is made to u,, for fixed ( w ,J ,z ) ,namely,

u ( s , y , z - Az) - 2 u ( s , j , z )+ u ( w , ~ , z+ Az)1iZL(x,J ) z) =

(W2 It is then easy to verify that for 1 = 1,2, . . . , p - 1,

where w, and w, are prescribed by the initial conditions and f, is a function of the given data. Thus, again, we have a block tridiagonal matrix, and can use the previously developed methods. Note, also, that H is a block tridiagonal matrix so that one can solve any of the eliminated systems of equations by applying

Page 16: On Direct Methods for Solving Poisson's Equations B. L ...scgroup.hpclab.ceid.upatras.gr/class/SCII/Various/... · In # 11 we apply the Buneman algorithm to Poisson's equation with

the CORF algorithm repeatedly. Other boundary conditions can be handled in the manner prescribed in $5 5 and 6.

8. Further applications. Consider the elliptic equation in self-adjoint form

Many equations can be transformed to this form. The usual five-point difference equation, when Ax = Ay, leads to the following equation:

where

If the equations are ordered with

the linear system of equations Mv = d will have the block form _:I f:]--

Tm-2

Am- 1 Vm- 1 dm- 1

Here

Aj = [Pj+112 + Pj- 112 - (Axl21I

Now suppose we have the decomposition

Q ~ C Q= @,

Page 17: On Direct Methods for Solving Poisson's Equations B. L ...scgroup.hpclab.ceid.upatras.gr/class/SCII/Various/... · In # 11 we apply the Buneman algorithm to Poisson's equation with

642 B. L. BUZBEE. G. H. GOLUB AND C. W. NIELSON

where QTQ = I and diag(@) = (cp, , cp,, . . . , cp,- ,). Thus,

&(Aj)= y, + cp, ( i = 1.2 ; . . , n - 1)

-= ).;, j.

As in 9 2, we define -

5 . = Q ~ V . d . = ~ ~ d .J ' J '

and after a suitable permutation we are led to the equations

where

Thus, the vector O i satisfies a symmetric tridiagonal system of equations. Again, once tiis computed for all i, it is possible to compute 9.

Lynch et al. [lo] have considered similar methods, but their algorithm re- quires more operations. Unfortunately, it does not seem possible to use the methods of 5 3 on (8.2)in this situation.

Now we may write the equivalent to Poisson's equation in two dimensions in cylindrical coordinates as follows :

and

(ru,), + ru,, = t(r,z ) .

The matrix A will still be tridiagonal, and Twill be a diagonal matrix with positive diagonal elements. We may make the transformation f j = Tli2qj, and are thus led to the equations

9j-1 + T - ~ I ~ A T - ~ I ~ ~ ~ j.+ 9j+l = ~ - ~ / ~ d

Thus, by ordering the equations correctly and by making a simple transformation, one can apply the cyclic reduction and the CORF algorithm to solve the finite difference approximation to Poisson's equation in cylindrical coordinates.

Page 18: On Direct Methods for Solving Poisson's Equations B. L ...scgroup.hpclab.ceid.upatras.gr/class/SCII/Various/... · In # 11 we apply the Buneman algorithm to Poisson's equation with

Another situation in which the methods of $9 2 and 3 are applicable is in using the nine-point formula to solve the finite difference approximation to Poisson's equation in the rectangle. In this case, when Ax = Ay,

It is easy to verify that AT = TA and that the eigenvalues of A and Tare

2i(A)= -20 + 8 cos -, in

i = 1,-,7 . . . , n - 1, I1

ik i (T)= 4 + 2 cos -, in

i = l , 2 , . . . , n - 1 . n

Because of the structure of A and 7: the fast Fourier transform may be employed when using the methods of 5 2.

9. Nonrectangular regions. In many situations, one wishes to solve an elliptic equation over the region in Fig. 1.

We shall assume that Dirichlet boundary conditions are given. When Ax is the same throughout the region, one has a matrix equation of the form

Page 19: On Direct Methods for Solving Poisson's Equations B. L ...scgroup.hpclab.ceid.upatras.gr/class/SCII/Various/... · In # 11 we apply the Buneman algorithm to Poisson's equation with

644 B. L. BUZBEE. G. H. GOLUB AND C. W. NIELSON

where

Also. we write

We assume again that AT = T A and BS = SB. From (9.1), we see that

(9.4)

and

Now let us write

(9.6)

Page 20: On Direct Methods for Solving Poisson's Equations B. L ...scgroup.hpclab.ceid.upatras.gr/class/SCII/Various/... · In # 11 we apply the Buneman algorithm to Poisson's equation with

Then as we partition the vectors z"), z ' ~ ' and the matrices W") and W'2) as in (9.3). (9.4) and (9.5) become

For (9.8). we have

This system of equations is two-cyclic, so we may reduce the system to

This system of equations can most easily be solved using Gaussian elimination. Once the two-cyclic system of (9.9) has been solved, all other components may be computed using (9.8) or by solving the system

If system (9.1) is to be solved for a number of different right-hand sides, it is best to save the LU decomposition of

(9.10) (I - Wj1'W'i2').

Thus. the algorithm proceeds as follows: (i) Solve for zbl) and z'i2' using the methods of $ 2 or 3.

(ii) Solve for W!') and W\2' using the methods of 3 2 or 3. (iii) Solve (9.9) using Gaussian elimination. Save the LU decomposition of

(9.10). (iv) Solve for the unknown components of x(" and xt2).

Page 21: On Direct Methods for Solving Poisson's Equations B. L ...scgroup.hpclab.ceid.upatras.gr/class/SCII/Various/... · In # 11 we apply the Buneman algorithm to Poisson's equation with

646 B. L. BUZBEE, G. H. GOLUB AND C. W. NIELSON

10. Accuracy of the CORF algorithm. As will be shown in $ 11, the CORF algorithm and the Buneman algorithms are mathematically identical. The difference between the methods lies in the way the right-hand side is calculated at each stage of the reduction. To the authors' knowledge, this is the only direct method for solving linear equations in which the right-hand side of the equations plays an important role in the numerical solution of the equations. In this section. we show the difficulties encountered in using the CORF algorithm. In $13, we will prove the stability of the Buneman algorithms.

Recall from $ 3 that it is possible to compute A"'yy' by the following algo- rithm :

for s = 2,3, . . . , 2', so that

Because of roundoff error, one actually computes the sequence

where 6, is the perturbation induced by the roundoff error. Again, as in $2 , we write

where Q is the set of orthonormalized eigenvectors of A and IT; and A and R are the diagonal matrices of eigenvalues of A and 7: respectively. Thus, substituting (10.3) into (10.2), we have

where

Page 22: On Direct Methods for Solving Poisson's Equations B. L ...scgroup.hpclab.ceid.upatras.gr/class/SCII/Various/... · In # 11 we apply the Buneman algorithm to Poisson's equation with

Because A and R are diagonal, we may write an equation for each component of g s ; namely,

(10.5) S j , s + I + i - j S j , s + 0;S j , s - 1 -- T j , s , j = 1,2, . . . , p .

The solution of (10.5)can be given explicitly. Consider the characteristic equation

cpj(r)-= a2 + ijcx+ 05 = 0 ,

which has roots P j and y j ; then

s - 1 p ; - k - ?;-k when P j # yj,+

k = l 1 f l j - " ? ? j

T ~ , ~

s - 1

(10.6b) = - ( S - + C (s - k)pj ?j ,k~ / 3 : . - ' { ~ , ~ l ) f l j < j , ~ s - k - 1

k = 1

when pj = y j .

Let

- i j / (2wj ) = cos Q j when Iij/(2wj)l5 1 ,

= cosh z j when /i.j/(2wj)l2 1 .

Then using the initial conditions of (10.4a),we may write (10.6a)as

6 . J J

= -2 0:cos (sBj)yj+ s -

1 1

wj S - sin (s - k)Bj

(10.7a) k = o sin 9, " g k

when Iij/(2wj)l2 1, s - 1

= -2w3 cosh ( sz j ) j j+ 1w j S - k - l sinh (s - k)zj

k = o sinh z j(10.7b)

when Iij/(2wj)i2 1 .

Note that

cos sej-205 x

cosh szi

given in 8 3. Thus

Page 23: On Direct Methods for Solving Poisson's Equations B. L ...scgroup.hpclab.ceid.upatras.gr/class/SCII/Various/... · In # 11 we apply the Buneman algorithm to Poisson's equation with

648 B. L. BUZBEE. G. H. GOLUB AND C. W. NIELSON

where

= 0 for i # j .

Therefore, if li.,/(2wj)l > 1, each tj,, has good relative accuracy. However, if z, > z,, then (,,,may become very large relative to t,,,; and since 4, = Qk,, t,,, will be lost in rounding.

We now apply the above results to Poisson's equation with Dirichlet boun- dary conditions. For the five-point difference operator with mesh width Ax in the x-direction and Ay in the y-direction, we have

and

depending on how one orders the equations. By inspection

for all j, and hence, as s increases, (10.1) leads to a numerically unstable algorithm. A similar result holds for the nine-point difference approximation to Poisson's equation.

Although the above results were obtained under the assumption of (10.1), similar results will be obtained regardless of how A"'y:' is computed. The problem is that A"' becomes very ill-conditioned as r increases. For the five-point approxi- mation, the ratio of the largest eigenvalue of A'" to its smallest eigenvalue is

~ ? " ' o s ~(2"zn) - e 2 r ( z , , -z , )

w:' cosh (Tz,) =

Give t digits of base b arithmetic, it will generally be impossible to represent q2,.in t digits whenever

2'(zn - z,) 2 t In P. As noted in # 3, Hockney [2], [9] has combined one or more steps of odd-

even reduction with the fast Fourier transform to produce a Poisson solver. The above analysis allows one to determine the number of reductions that can be safely performed, and careful attention must be given to it.

11. The Buneman algorithm and variants. In this section, we shall describe in detail the Buneman algorithm [2] and a variation of it. The difference between the Buneman algorithm and the CORF algorithm lies in the way the right-hand side is calculated at each stage of the reduction. Henceforth, we shall assume that, in the system of (2.5), T = I,, the identity matrix of order p.

Page 24: On Direct Methods for Solving Poisson's Equations B. L ...scgroup.hpclab.ceid.upatras.gr/class/SCII/Various/... · In # 11 we apply the Buneman algorithm to Poisson's equation with

Again consider the system of equations as given by (2.5) with q = 2k+1- 1 . After one stage of cyclic reduction. we have

( 1 1.1) x j P 2+ (21, - A2)xi+ = + - Ay;

for j = 2,4, . . . , q - 1, with x, = x,+, = 0, the null vector. Note that the right-hand side of ( 1 l . l ) may be written as

(11.2) yj l ' = + yj+ - = A ( I J A - yj + y j l + ? ; . + I- 2 A 1 y j ,

where A( ' ' = (21, - A2). Let us define

pjlJ = A - I y;. q j( 1 ) -- yj- 1 + y;+1 - 2pj1'.

Then

(1 1.3) V;(1) = A ( I J ~ : ~ J+ q;l'.

After I. reductions. we have. by (3.3).

y(,r+ 1J = "('J(11.4) - I (vJ-2 ' .+ yZ2') - A("yJT'

Let us write in a fashion similar to ( 1 1.3),

Substituting (11.5)into (11.41and making use of the identity (A"'12 = 21, - A('+ from (3.3). we have the following relationships:

for j = i2'+'. i = 1.2. . . . .2k-r - 1. with

To compute (A(")-'(pjr!,, + pyi2, - qyJ)in (11.6a). we solve the system of equa-tions

where A"' is given by the factorization (3.10). namely,

After k reductions. one has the equation

A ( k J ~ , k A(k'p(2>+ qfd,=

and hence

x , ~= ~ $ 2+ (A(k))-lq(22.

Page 25: On Direct Methods for Solving Poisson's Equations B. L ...scgroup.hpclab.ceid.upatras.gr/class/SCII/Various/... · In # 11 we apply the Buneman algorithm to Poisson's equation with

650 B. L. BUZBEE, G. H. GOLUB AND C. W. NIELSON

Again one uses the factorization of A(k' for computing (A(k')1q$k2. TO back-solve. we use the relationship

f o r j = i 2 ' . i = 1 . 2 . . . . , 2 k + 1 - r - 1. with X, = xZk- = 0 . For j = 2'. 3.2'. . . . . z k + ' - 2'. we solve the system of equations

using the factorization of A'"'; hence

Thus the Buneman algorithm (variant I ) proceeds as follows: (i) Compute the sequence jp:', q:') by (1 1.6) for I. = 1, . . . , k, with p:'' = 0

for j = 0, . . . , A 7 k + 1 , and qy' = yJ for j = 1,2. . . . , 2k+1- I . (ii) Back-solve for xJ using (1 1.7) and (1 1.8). I t is possible to eliminate the sequence {p:)) . From (1 l.6b) we note that

where

Using (1 1.9) in (1 l.6a) and modifying the subscripts and superscripts appropriately, we have

q(l+l! = qy12h- q(r-l! + qy) - q ( r - U I J - h J + h + qyJ2h

(11.10) + (A(r')- l[qy--y - qy? 2 h + qY--,' - 2qy'

+ q(r - l ! - qyi2h+ q ( r - U J + h J + 3 h l

for j = 2',2'+' . . . . , -7 k + 1- 2'. with

q'"o = qi'l A , = 0 for all r ,

qjO'= yj f o r j = 1,2;.., 2k+1- 1,

qil' = yjPl + yj+l - 2AP1yj

for j = - 72,4, . . . , 2k+1 -.

To solve for x i ,we use the relationships (1 1.7) and (11.9). so that

Thus the Buneman algorithm (variant 2) proceeds as follows: (i) Compute the sequence {q?') by (1 1.10) for r = 1,2. . . . , k. (ii) Back-solve for x,using (1 1.11).

Note that the Buneman algorithm (variant 2) requires half the storage that the Buneman algorithm (variant 1) requires. However, the variant 2 algorithm requires approximately twice as many additions.

Page 26: On Direct Methods for Solving Poisson's Equations B. L ...scgroup.hpclab.ceid.upatras.gr/class/SCII/Various/... · In # 11 we apply the Buneman algorithm to Poisson's equation with

ON DIRECT METHODS FOR SOLVING POISSON'S EQUATIONS 651

The pj's and q,'s can be written in terms of the xj's. In 5 13, we shall show how this affects the stability of the methods. Note that

pi1' = A-'yj = + x ~ + ~ )x j + A - ' ( X ~ - ~

and

qi(1) -

- yj-1 + Y j + 1 - 2p;" -- x ~ - ~( A ) - ~ A ( ~ ) ( X ~ - ~ + x ~ + ~- + x ~ + ~ )

By an inductive argument, it is possible to show that

and

where

S(r)= ( A ( r - l ) ~ ( r - i ). . , A(0))-1

12. Applications of the Buneman algorithm to Poisson's equation. As was pointed out in 4 4, matrices of the form of (2.5)arise in solving the five-point finite difference approximation to Poisson's equation over a rectangular region with Dirichlet boundary conditions; hence, it is possible to use the methods of 4 11. For the five-point approximation to Poisson's equation over a rectangular region with Neumann or periodic conditions it is necessary to modify the Bune-man algorithms.

For the Neumann boundary conditions. we have the system of equations

AX, + 2x1 -- yo.

x ~ - ~+ Axj + xj+ = yj. j = 1,2, . . . . n~ - I .

2xm-, + Ax, = y,. with MI = 2k+l .

We define

( l ) = A(lJpjl)+ qll' for j = 0. 2,4, . . . 2k+'.Y j

where

p t J = A-ly o 7 - ( ~ l- pbl'),qrJ= 9

pi1' = A - l v ..J , = yj-1 + yj+1 - 2pS1'.

j = 2,4, . . . , M I - 2,

p;) = A - l v.,,, 9 9;' = 2(yrn-1 - p p ) .

In general then. as in 4 11. we have for I. = 1,2. . . . . k - 1, y(;+l) = 4 ( r + l J ( . + I ) + q(,r+l) - J Pj J 7

Page 27: On Direct Methods for Solving Poisson's Equations B. L ...scgroup.hpclab.ceid.upatras.gr/class/SCII/Various/... · In # 11 we apply the Buneman algorithm to Poisson's equation with

652 B. L. BUZBEE, G. H. GOLUB AND C. W. NIELSON

where

P $ + l ) = P ~ ) - ( A ( r ) ) - l ( 2 p ~ ) - q $ ) ) . q $ + ' ) = 2 ( q ? - p$+ l').

py+l ) - (A(")- '(pyl ,. + py12,. - q?'),

P(r+1) = q(y) 2. + q s 2 r - J "J - 2 ~ ' " .J

for j = i2'". i = 1.2. . . . . zk-' - I ,

pl,'+l) = - 1(2pl,')-2y ql,')), 2qg)- 2y -pm~ l , ' ) ( ~ ( ~ 1 ) - - qj,'+ 1) = - 7 ( r + 1) .

Finally

(12.1) Y2( k k + l ) = ~ ( k + l )P2( k k + l ) + q$k+l+l),

where

~ ( k +1) = 41 - ( ~ ( k ) ) 2 .

(12.2) pyk.+l ) = pLkk)- (Ak)-'(pg) + ~ ( 2 k ) + ~- qLkj).

qfk.+1) = q$) + qikJ_,- 4 p y l ) .

From (5.4). we see that

~ ( k + = ~ ( k + l )( k + 1) + q$k+ 1) .P2k

so that

X 2 k = p$kk+ 1) + (B(k+ l))-qyk+ 1).

(B(k+1J)-qLk21) a - p$+ 11)indicates solution to the singular system B ( k + 1 ) ( ~ 2 k = qik,+ I). The factorization of B(k+ is given by (5.6).The back-substitution process proceeds as in 5 11. It is also possible to eliminate the py) sequence as was done in the previous section.

For periodic boundary conditions, we have the system of equations

AX, + x2 + X, = Y 1 -

x j - , + Axj + x j + , = yj f o r j = 2,3. . . . . 111 - I .

x1 + x,-I + Ax, = y,.

We define

- J A(')

P,j(1) + qS1' f o r j = 2,4, . . . , 2k+1 .

where

p(1) = A - 1 q( l )= 2 Y 2 . 2 y1 + ~3 - 2p(:',

pS1) = A 1 y j . qS1)= yj-l + yj+ , - 2p;", j = 4. 6. . . . , 111 - 2.

= A-lym. q;' = Y I + Y m - 1 - 2~; ' .

In general. for r = 1.2. . . . . k - 1.

Page 28: On Direct Methods for Solving Poisson's Equations B. L ...scgroup.hpclab.ceid.upatras.gr/class/SCII/Various/... · In # 11 we apply the Buneman algorithm to Poisson's equation with

653 ON DIRECT METHODS FOR SOLVING POISSON'S EQUATIONS

where

P y + l ) = (A('))-'(p';? + p~? , , -q ' ; ?+~) ,r - l -

ql?'?+l = 4y,! + q$A2' - 2ptLf).

p ) - ( r ) ' ( p ~ ? 2 ,+ py:,, - qy'),=

q(,r + 1) = q(,r)]-2'. + qyi,?- - 2py+".I

p;+ 1) = p;) - (A(r))-l(pt?+ p;)-,,. - q;)),

( ' + I ) = q(;? +qjnr ) -2 , - 2p;+l).4,

Finally. as (12.1).

where

p:k.+l ) ~ $ 2- '(2p$?+ - 4$>), q$kk+l) = ?qj?k!+] 4p(kk+1)( A ( ~ ) ) - -

and B(k+l )is defined by (12.2). Then

B(k+1)X2h P2" + q(2k+l),= ~ ( k + l )( k f l )

so that X 2 k = l))-q(2k+1).P$k+ 1) + ( ~ ( k +

The back-substitution process proceeds as in 9 11. It is possible to express p'f) and qy) in terms of xi as in (1 1.12)and (11.13).

13. Accuracy of the Buneman algorithms. As was shown in 4 11, the Bune- man algorithms consist of generating the sequence of vectors {pJ", q:)}. Let us write, using (11.12) and ( 1 1.131, (13.la) pjl) = x;l + gl".

where

and

Then

where

v , indicates the Euclidean norm of a vector v, C , indicates the spectral norm of a matrix C, and

I 1 '

) x i 1 '= ~ x i i 2 .

Page 29: On Direct Methods for Solving Poisson's Equations B. L ...scgroup.hpclab.ceid.upatras.gr/class/SCII/Various/... · In # 11 we apply the Buneman algorithm to Poisson's equation with

654 B . L . BUZBEE, G . H . GOLUB AND C . W. NIELSON

When T = I,, we may redefine the polynomials given in 9: 3 in the following way. Let

and define

cos 0 for 1 % 1 5 1,% = {cosh 0 for 2 1 .

Then in a similar fashion to (10.8),

-2 cos (2k c0s-l $) for 1 $ 1 5 1,

-2 cosh (2k cosh- ' %) for IIC/I 2 1 . Thus for A = AT,

r - 1

5 n max I[p2,(ii)l - ' I j = o :".I

where (i,)are the eigenvalues of A. Therefore, for li,l2 2,

r - l

s " ) ,5 2-'. fi max [cosh 2-'0,]-', j = o ( e , )

where

Finally, r - 1

s ( ~ ) A ( ~ )< 2-'+l max {(n [cosh 2'0,]- l ) cosh 2'0,) 2 = 0 ) j = o

when I?.,I 2 2.

For the five-point difference approximation to Poisson's equation over a rectangular region with Dirichlet boundary conditions,

where p = Ax/Ay or Aj/Ax depending on the ordering of the equations. Thus

which implies 0, > 1 for all i. Then

max [cosh 2'Qi] - ' = ( e , )

Page 30: On Direct Methods for Solving Poisson's Equations B. L ...scgroup.hpclab.ceid.upatras.gr/class/SCII/Various/... · In # 11 we apply the Buneman algorithm to Poisson's equation with

Thus, after some simplification,

A similar calculation shows that

Therefore, from (13.6), we see that for large r , p:' will be a good approximation to xj.And from (13.5) and (13.7), we see that

so that the IIq:), remains bounded throughout the calculation. This explains why the Buneman algorithms lead to numerically stable results for solving the finite difference approximation to Poisson's equation.

14. Conclusion. Numerous applications require the repeated solution of a Poisson equation. The operation counts given by Dorr [5] indicate that the methods we have discussed should offer significant economies over older tech- niques ; this has been verified in practice by many users. Computational experi- ments comparing the Buneman algorithm (variant one), the M D algorithm, the Peaceman-Rachford alternating direction algorithm and the point successive over-relaxation algorithm are given by Buzbee, et al. [3]. We conclude that the method of matrix decomposition, the Buneman algorithms, and Hockney's algorithm (when used with care) are valuable methods.

Acknowledgment. This paper has benefited greatly from the comments of Dr. F. Dorr, Mr. J . Alan George, Dr . R . Hockney and Professor 0.Widlund.

REFERENCES

[I] RICHARDBELLMAN. Anah,si.c, McGraw-Hill, New York, 1960 Introduction to Ma1ri.r [2] OSCARBUNEMAN.A compact non-iteratire Poisson solcer, Rep. 294, Stanford University Institute

for Plasma Research. Stanford, Cal~f. . 1969. [3] B. L. BUZBEE. G . H . GOLUB A N D C . W. NIELSON, The rnethod qf'odd eren reduction and factoriza-

tion with application to Poisson's equation. Part II, Rep. LA-4288, Los Alamos Scientific Laboratory, University of California, Los Alamos, N . M ..

[4] J . W . COOLEYA N D J. W. TUKEY. An algorithm for machine calculation qf'complax Fourier series. Math. Comp., 19 (1965), pp. 297-301.

[5] F. W. DORR. The drrect solution qf the discrete Poisson equation on ri rectrmgle. SlAM Rev., 12 ( 1970), pp. 248-249.

[6] J . A. GEORGE,The use of' direct methods,for t h ~ ~ solution q f t h e discrete Poi.\son rquotion on non- rectrm,qulor r q i o n s , Computer Science Rep. 70-159, Stanford Univ., Stanford, Calif., 1970.

[7] G . H . GOLUB, R. UNDERWOOD Solution of A x A N D J . WILKINSON. = i.Bx n h m B is positire definite, to appear.

[8] R . W . HOCKNEY.A fast analysis, J . Assoc.direct solution of' Poisson's e q u ~ t i o n using Four i~~r Comput. Mach. (1965), pp.95-113.

Page 31: On Direct Methods for Solving Poisson's Equations B. L ...scgroup.hpclab.ceid.upatras.gr/class/SCII/Various/... · In # 11 we apply the Buneman algorithm to Poisson's equation with

656 B. L . BUZBEE, G . H. GOLUB AND C. W. NIELSON

[91 -, Tlie potetiticrl c~trlculotron trnd soma opplictrtrons, Methods in Computational Physics, vol. 9. B. Adler, S. Fernbach and M. Rotenberg, eds., Academic Press, New York and London. 1969, pp. 136-2 1 1 .

[lo] R . E. LYNCH,J . R . RICE A N D D. H . THOMAS.Direct solution qf'partial drffc~rance equations hj, tensor product method.^, Numer. Math.. 6 (1964), pp. 185-199.

[I I ] H . SHINTANI,Drrec,t .solution o f purtial drfferenca equation.r for u rectan#lc. J . Sci. Hiroshima Univ. Ser. A-I. 32 (1968). pp. 17-53.

[I21 R . S. VARGA. ;Mutrir Intaratice Analysis, Prentice-Hall, New York. 1962.