正在加载图片...
19.4 Fourier and Cyclic Reduction Methods 859 .Compute ui by the inverse Fourier transform (19.4.2). The above procedure is valid for periodic boundary conditions.In other words, the solution satisfies ujl uj+Jl=ujl+L (19.4.7) Next consider a Dirichlet boundary condition u=0 on the rectangular boundary. Instead of the expansion(19.4.2),we now need an expansion in sine waves: 22 J-1L-1 uj1了工 ∑立mn sin m sin tln si元 (19.4.8) m=1n=1 This satisfies the boundary conditions that u=0 atj=0,J and at I=0,L.If we g ICAL substitute this expansion and the analogous one for pj into equation(19.0.6),we find that the solution procedure parallels that for periodic boundary conditions: Compute pmn by the sine transform RECIPES 1-1L-1 9 pmn=】 sin rln (19.4.9) J j=1l=1 (A fast sine transform algorithm was given in 812.3.) Compute amn from the expression analogous to (19.4.5), e多口 umn= △2pmn /πm xn (19.4.10) 2(cos+cos元-2 Compute ujt by the inverse sine transform(19.4.8). If we have inhomogeneous boundary conditions,for example u =0 on all boundaries except u=f(y)on the boundary =JA,we have to add to the above solution a solution u of the homogeneous equation Numerica 10621 ¥uu=0 0r2+ 0y2 (19.4.11) that satisfies the required boundary conditions.In the continuum case,this would be an expression of the form ”=∑Asnh2贤血2器 (19.4.12) where An would be found by requiring that u=f(y)at x=JA.In the discrete case,we have -1 (19.4.13)19.4 Fourier and Cyclic Reduction Methods 859 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). • Compute ujl by the inverse Fourier transform (19.4.2). The above procedure is valid for periodic boundary conditions. In other words, the solution satisfies ujl = uj+J,l = uj,l+L (19.4.7) Next consider a Dirichlet boundary condition u = 0 on the rectangular boundary. Instead of the expansion (19.4.2), we now need an expansion in sine waves: ujl = 2 J 2 L J −1 m=1 L −1 n=1 umn sin πjm J sin πln L (19.4.8) This satisfies the boundary conditions that u = 0 at j = 0, J and at l = 0, L. If we substitute this expansion and the analogous one for ρjl into equation (19.0.6), we find that the solution procedure parallels that for periodic boundary conditions: • Compute ρmn by the sine transform ρmn = J −1 j=1 L −1 l=1 ρjl sin πjm J sin πln L (19.4.9) (A fast sine transform algorithm was given in §12.3.) • Compute umn from the expression analogous to (19.4.5), umn = ∆2ρmn 2 cos πm J + cos πn L − 2  (19.4.10) • Compute ujl by the inverse sine transform (19.4.8). If we have inhomogeneous boundary conditions, for example u = 0 on all boundaries except u = f(y) on the boundary x = J∆, we have to add to the above solution a solution uH of the homogeneous equation ∂2u ∂x2 + ∂2u ∂y2 =0 (19.4.11) that satisfies the required boundary conditions. In the continuum case, this would be an expression of the form uH =  n An sinh nπx L∆ sin nπy L∆ (19.4.12) where An would be found by requiring that u = f(y) at x = J∆. In the discrete case, we have uH jl = 2 L L −1 n=1 An sinh πnj L sin πnl L (19.4.13)
<<向上翻页向下翻页>>
©2008-现在 cucdc.com 高等教育资讯网 版权所有