实例介绍
学习Matlab和谱方法的经典入门教材,由SIAM的前主席Trefethen编写。
Download the programs from http://www.comlab.ox.ac.uk/oucl/work/nick.trefethen Start up MATLAB Run p1, p2, p3 Happy computing! TOPIC PROGRAMS Chebyshev differentiation matrices 11,26 Chebyshev differentiation by FFT 18,19,20 Clenshaw-Curtis quadrature Complex arithmetic 10,24,25,31,40 Differentiation 1,2,4,5,7,11,12,18 Eigenvalue problems 8,15,21,22,23,24,26,28,39,40 Finite difterence methods Fourier differentiation matrices 2,4,8 Fourier differentiation by FFT 5,6,28 Fourth-order problems 38,39,40 Gauss quadrature Gibbs phenomenon Inhomogeneous boundary conditions 32, 35, 36 Interpolation 3,9,10.13,16 Laplace and poisson problems 13,14,15,16,23,28,29,32,33,36 Neumann boundary conditions 33,37 Nonlinear problems 14,27,34,35 Periodic domains 4,21 Polar coordinates 28,29 Potential theory 10 Pseudospectra 24 Runge phenomenon 9,10 Spectral accuracy 2,4,7,8,11,12,30 Time-stepping 6,19、20,25,27,34,35,37 Two-dimensional domains 16,17,20,23,28,29,36,37,39 Two-point boundary value problems 13, 14, 32, 33, 38 Unbounded domains 8,24 ariable coefficients 6,8,22,23,24 Wave equations 6,19,20,27,37 To Anne Contents Preface IX Acknowledgments A Note on the matlaB Programs 1 Differentiation Matrices 2 Unbounded Grids: The Semidiscrete Fourier Transform 3 Periodic Grids: The dft and FFt 17 4 Smoothness and Spectral Accuracy 29 5 Polynomial Interpolation and Clustered Grids 41 6 Chebyshev Differentiation Matrices 51 7 Boundary value Problems 61 8 Chebyshev Series and the FFt 75 9 Eigenvalues and Pseudospectra 87 10 Time-Stepping and Stability regions 101 11 Polar Coordinates 115 12 Integrals and Quadrature Formulas 125 13 More about Boundary Conditions 135 14 Fourth-Order problems 145 Afterword 153 Bibliography 155 Index 161 Preface The aim of this book is to teach you the essentials of spectral collocation methods with the aid of 40 short MATLAB programs, or M-files.”*The programsareavailableonlineathttp://www.comlab.ox.ac.uk/oucl/work/ nick trefethen, and you will run them and modify them to solve all kinds of ordinary and partial differential equations(ODEs and PDEs)connected with problems in fuid mechanics, quantum mechanics, vibrations, linear and nonlinear waves, complex analysis, and other fields. Concerning prerequisites it is assumed that the words just written have meaning for you, that you have some knowledge of numerical methods, and that you already know matlab If you like computing and numerical mathematics, you will enjoy working through this book, whether alone or in the classroom-and if you learn a few new tricks of MatlaB along the way, that's OK too Spectral methods are one of the "big three"technologies for the numeri- cal solution of PDEs, which came into their own roughly in successive decades 1950s: finite difference methods 1960s: finite element methods 1970s: spectral methods Naturally, the origins of each technology can be traced further back. For spectral methods, some of the ideas are as old as interpolation and expan- MATLAB is a registered trademark of The Math Works, Inc. 3 Apple Hill Drive, Na tickMa01760-2098,Usa,tel.508-647-7000,fax508-647-7001,info@mathworks.com http://www.mathworks.con Preface sion, and more specifically algorithmic developments arrived with lanczos as early as 1938 [ Lan38, Lan56] and with Clenshaw, Elliott, Fox, and others in the 1960s FoPa68 Then, in the 1970s, a transformation of the field was initiated by work by Orszag and others on problems in fluid dynamics and meteorology, and spectral methods became famous. Three landmarks of the early modern spectral methods literature were the short book by gottlieb and Orszag goor77, the survey by Gottlieb, Hussaini, and Orszag GHO84, and the monograph by Canuto, Hussaini, Quarteroni, and Zang CHQz88. Other books have been contributed since then by Mercier [Mer89, Boyd [Boy00 (first edition in 1989), FunaroFun92, Bernardi and Maday BeMa92], Forn berg For96, and Karniadakis and Sherwin [KaSh991 If one wants to solve an OdE or pde to high accuracy on a simple domain and if the data defining the problem are smooth, then spectral methods are usually the best tool. They can often achieve ten digits of accuracy where a finite difference or finite element method would get two or three. At lower accuracies, they demand less computer memory than the alternatives This short textbook presents some of the fundamental ideas and techniques of spectral methods. It is aimed at anyone who has finished a numerical analysis course and is familiar with the basics of applied ODEs and PDEs. You will see that a remarkable range of problems can be solved to high precision by a few lines of maTlab in a few seconds of computer time. Play with the programs; make them your own! The exercises at the end of each chapter will help get you started I would like to highlight three mathematical topics presented here that while known to experts, are not usually found in textbooks. The first, in Chapter 4, is the connection between the smoothness of a function and the rate of decay of its Fourier transform, which determines the size of the aliasing errors introduced by discretization; these connections explain how the accu- racy of spectral methods depends on the smoothness of the functions being approximated The second, in Chapter 5, is the analogy between roots of poly nomials and electric point charges in the plane, which leads to an explanation in terms of potential theory of why grids for nonperiodic spectral methods need to be clustered at boundaries. The third, in Chapter & is the three-way link between Chebyshev series on [-1, 1], trigonometric series on[-, 7), and Laurent series on the unit circle, which forms the basis of the technique of computing Chebyshev spectral derivatives via the fast Fourier transform. All three of these topics are beautiful mathematical subjects in their own right well worth learning for any applied mathematician If you are determined to move immediately to applications without paying too much attention to the underlying mathematics, you may wish to turn directly to Chapter 6. Most of the applications appear in Chapters 7-14 Inevitably this book covers only a part of the subject of spectral meth ods. It emphasizes collocation( "pseudospectral")methods on periodic and on Preface Chebyshev grids, saying next to nothing about the equally important Galerkin methods and legendre grids and polynomials. The theoretical analysis is very limited, and simple tools for simple geometries are emphasized rather than the "industrial strength"methods of spectral elements and hp finite elements Some indications of omitted topics and other points of view are given in the Afterword A new era in scientific computing has been ushered in by the development of MATLAB. One can now present advanced numerical algorithms and so lutions of nontrivial problems in complete detail with great brevity, covering more applied mathematics in a few pages than would have been imaginable a few years ago. By sacrificing sometimes(not always! )a certain factor in ma chine efficiency compared with lower level languages such as Fortran or C, one obtains with MaTlaB a remarkable human efficiency-an ability to modify a program and try something new, then something new again, with unprece dented ease. This short book is offered as an encouragement to students scientists, and engineers to become skilled at this new kind of computing Acknowledgments I must begin by acknowledging two special colleagues who have taught me a great deal about spectral methods over the years. These are Andre weideman of the university of stellenbosch, coauthor of the "MATLAB Differentiation Matrix Suite!"[WeReoo, and Bengt Fornberg, of the University of Colorado author of A Practical Guide to Pseudospectral Methods For96. These good friends share my enthusiasm for simplicityand my enjoyment of the occa- sional detail that refuses to be simplified, no matter how hard you try. In this book, among many other contributions, Weideman significantly improved the crucial program cheb must also thank Cleve Moler. the inventor of matlab. a friend and mentor since my graduate school days. Perhaps i had better admit here at the outset that there is a brass plaque on my office wall, given to me in 1998 by The Math Works, Inc.. which reads: FIRST ORDER FOR MATLAB. Febru- ary 7, 1985, Ordered by Professor Nick Trefethen, Massachusetts Institute of Technology. I was there in the classroom at stanford when Moler taught the numerical eigensystems course cs238b in the winter of 1979 based around this new experimental interface to EISPACK and LiNPaCK he had cooked up. I am a card-carrying MATlaB fan Toby Driscoll, author of the Sc Toolbox for Schwarz-Christoffel conformal mapping in MATLAB Dri96), has taught me many MATLAB tricks, and he helped to improve the codes in this book. he also provided key suggestions for the nonlinear waves calculations of Chapter 10. The other person whose sug gestions improved the codes most significantly is Pascal gahinet of The Math- WorkS, Inc, whose eye for MATLAB style is something special. David Carlisle 【实例截图】
【核心代码】
标签:
小贴士
感谢您为本站写下的评论,您的评论对其它用户来说具有重要的参考价值,所以请认真填写。
- 类似“顶”、“沙发”之类没有营养的文字,对勤劳贡献的楼主来说是令人沮丧的反馈信息。
- 相信您也不想看到一排文字/表情墙,所以请不要反馈意义不大的重复字符,也请尽量不要纯表情的回复。
- 提问之前请再仔细看一遍楼主的说明,或许是您遗漏了。
- 请勿到处挖坑绊人、招贴广告。既占空间让人厌烦,又没人会搭理,于人于己都无利。
关于好例子网
本站旨在为广大IT学习爱好者提供一个非营利性互相学习交流分享平台。本站所有资源都可以被免费获取学习研究。本站资源来自网友分享,对搜索内容的合法性不具有预见性、识别性、控制性,仅供学习研究,请务必在下载后24小时内给予删除,不得用于其他任何用途,否则后果自负。基于互联网的特殊性,平台无法对用户传输的作品、信息、内容的权属或合法性、安全性、合规性、真实性、科学性、完整权、有效性等进行实质审查;无论平台是否已进行审查,用户均应自行承担因其传输的作品、信息、内容而可能或已经产生的侵权或权属纠纷等法律责任。本站所有资源不代表本站的观点或立场,基于网友分享,根据中国法律《信息网络传播权保护条例》第二十二与二十三条之规定,若资源存在侵权或相关问题请联系本站客服人员,点此联系我们。关于更多版权及免责申明参见 版权及免责申明
网友评论
我要评论