正在加载图片...
19.4 Fourier and Cyclic Reduction Methods 861 Here the double prime notation means that the terms for m=0 and m =should be multiplied by and similarly for n=0 and n=L.Inhomogeneous terms Vu=g can be again included by adding a suitable solution of the homogeneous equation,or more simply by taking boundary terms over to the right-hand side.For example,the condition Ou =9(y at x=0 (19.4.23) OT becomes 4-u-14=g0 (19.4.24) 2△ where g=g(y =IA).Once again we write the solution in the form (19.4.16), where now Vu'=0 on the boundary.This time VuB takes on the prescribed value on the boundary,but uB vanishes everywhere except just outside the boundary. Thus equation (19.4.24)gives RECIPES uB11=-2△g (19.4.25) 9 All the uB terms in equation (19.4.19)vanish except whenj=0: 三学 .1+∠11+6.+1+6.l-1-4u6.1=2△g+△2p0.l (19.4.26 Thus u'is the solution of a zero-gradient problem,with the source term modified by the replacement IENTIFIC △2p0.1→△2p0.1+2△9m (19.4.27) 6 Sometimes Neumann boundary conditions are handled by using a staggered grid,with the u's defined midway between zone boundaries so that first derivatives are centered on the mesh points.You can solve such problems using similar 9 techniques to those described above if you use the alternative form of the cosine transform,equation (12.3.23). Numerical 10521 uction 43106 Cyclic Reduction (outside Recipes Evidently the FFT method works only when the original PDE has constant coefficients.and boundaries that coincide with the coordinate lines.An alternative North Software. algorithm,which can be used on somewhat more general equations,is called cyclic reduction (CR). We illustrate cyclic reduction on the equation 82u,02u 0m2+2 +b(y) -+c()u=g(x,y) (19.4.28) This form arises very often in practice from the Helmholtz or Poisson equations in polar,cylindrical,or spherical coordinate systems.More general separable equations are treated in [1].19.4 Fourier and Cyclic Reduction Methods 861 Permission is granted for internet users to make one paper copy for their own personal use. Further reproduction, or any copyin Copyright (C) 1988-1992 by Cambridge University Press. Programs Copyright (C) 1988-1992 by Numerical Recipes Software. Sample page from NUMERICAL RECIPES IN C: THE ART OF SCIENTIFIC COMPUTING (ISBN 0-521-43108-5) g of machine￾readable files (including this one) to any server computer, is strictly prohibited. To order Numerical Recipes books or CDROMs, visit website http://www.nr.com or call 1-800-872-7423 (North America only), or send email to directcustserv@cambridge.org (outside North America). Here the double prime notation means that the terms for m = 0 and m = J should be multiplied by 1 2 , and similarly for n = 0 and n = L. Inhomogeneous terms ∇u = g can be again included by adding a suitable solution of the homogeneous equation, or more simply by taking boundary terms over to the right-hand side. For example, the condition ∂u ∂x = g(y) at x =0 (19.4.23) becomes u1,l − u−1,l 2∆ = gl (19.4.24) where gl ≡ g(y = l∆). Once again we write the solution in the form (19.4.16), where now ∇u = 0 on the boundary. This time ∇uB takes on the prescribed value on the boundary, but uB vanishes everywhere except just outside the boundary. Thus equation (19.4.24) gives uB −1,l = −2∆gl (19.4.25) All the uB terms in equation (19.4.19) vanish except when j = 0: u 1,l + u −1,l + u 0,l+1 + u 0,l−1 − 4u 0,l = 2∆gl + ∆2ρ0,l (19.4.26) Thus u is the solution of a zero-gradient problem, with the source term modified by the replacement ∆2ρ0,l → ∆2ρ0,l + 2∆gl (19.4.27) Sometimes Neumann boundary conditions are handled by using a staggered grid, with the u’s defined midway between zone boundaries so that first derivatives are centered on the mesh points. You can solve such problems using similar techniques to those described above if you use the alternative form of the cosine transform, equation (12.3.23). Cyclic Reduction Evidently the FFT method works only when the original PDE has constant coefficients, and boundaries that coincide with the coordinate lines. An alternative algorithm, which can be used on somewhat more general equations, is called cyclic reduction (CR). We illustrate cyclic reduction on the equation ∂2u ∂x2 + ∂2u ∂y2 + b(y) ∂u ∂y + c(y)u = g(x, y) (19.4.28) This form arises very often in practice from the Helmholtz or Poisson equations in polar, cylindrical, or spherical coordinate systems. More general separable equations are treated in [1].
<<向上翻页向下翻页>>
©2008-现在 cucdc.com 高等教育资讯网 版权所有