17.11.2012 Views

Numerical recipes

Numerical recipes

Numerical recipes

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

19.6 Multigrid Methods for Boundary Value Problems 873<br />

At this point we need to make an approximation to L h in order to find vh. The<br />

classical iteration methods, such as Jacobi or Gauss-Seidel, do this by finding, at<br />

each stage, an approximate solution of the equation<br />

�Lh�vh = −dh<br />

(19.6.6)<br />

where �Lh is a “simpler” operator than Lh. For example, �Lh is the diagonal part of<br />

Lh for Jacobi iteration, or the lower triangle for Gauss-Seidel iteration. The next<br />

approximation is generated by<br />

�u new<br />

h = �uh + �vh (19.6.7)<br />

Now consider, as an alternative, a completely different type of approximation<br />

for Lh, one in which we “coarsify” rather than “simplify.” That is, we form some<br />

appropriate approximation LH of Lh on a coarser grid with mesh size H (we will<br />

always take H =2h, but other choices are possible). The residual equation (19.6.5)<br />

is now approximated by<br />

LHvH = −dH<br />

(19.6.8)<br />

Since LH has smaller dimension, this equation will be easier to solve than equation<br />

(19.6.5). To define the defect dH on the coarse grid, we need a restriction operator<br />

R that restricts dh to the coarse grid:<br />

dH = Rdh<br />

(19.6.9)<br />

The restriction operator is also called the fine-to-coarse operator or the injection<br />

operator. Once we have a solution �vH to equation (19.6.8), we need a prolongation<br />

operator P that prolongates or interpolates the correction to the fine grid:<br />

�vh = P�vH<br />

(19.6.10)<br />

The prolongation operator is also called the coarse-to-fine operator or the interpolation<br />

operator. Both R and P are chosen to be linear operators. Finally the<br />

approximation �uh can be updated:<br />

�u new<br />

h = �uh + �vh (19.6.11)<br />

One step of this coarse-grid correction scheme is thus:<br />

Coarse-Grid Correction<br />

• Compute the defect on the fine grid from (19.6.4).<br />

• Restrict the defect by (19.6.9).<br />

• Solve (19.6.8) exactly on the coarse grid for the correction.<br />

• Interpolate the correction to the fine grid by (19.6.10).<br />

Sample page from NUMERICAL RECIPES IN C: THE ART OF SCIENTIFIC COMPUTING (ISBN 0-521-43108-5)<br />

Copyright (C) 1988-1992 by Cambridge University Press. Programs Copyright (C) 1988-1992 by <strong>Numerical</strong> Recipes Software.<br />

Permission is granted for internet users to make one paper copy for their own personal use. Further reproduction, or any copying of machinereadable<br />

files (including this one) to any server computer, is strictly prohibited. To order <strong>Numerical</strong> Recipes books or CDROMs, visit website<br />

http://www.nr.com or call 1-800-872-7423 (North America only), or send email to directcustserv@cambridge.org (outside North America).

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!