Abstract
We report our experiences of programming in the functional language SaC[1] a numerical method for the KPI (Kadomtsev-Petiviashvili I) equation. KPI describes the propagation of nonlinear waves in a dispersive medium. It is an integro-differential, nonlinear equation with third-order derivatives, and so it presents a noticeable challenge in numerical solution, as well as being an important model for a range of topics in computational physics. The latter include: long internal waves in a density-stratified ocean, ion-acoustic waves in a plasma, acoustic waves on a crystal lattice, and more. Thus our solution of KPI in SaC represents an experience of solving a “real” problem using a single-assignment language and as such provides an insight into the kind of challenges and benefits that arise in using the functional paradigm in computational applications. The paper describes the structure and functionality of the program, discusses the features of functional programming that make it useful for the task in hand, and touches upon performance issues.
Preview
Unable to display preview. Download preview PDF.
Similar content being viewed by others
References
SAC development team: Single Assignment C. A definitive web site, http://www.sac-home.org
Grelck, C., Scholz, S.-B.: Towards an efficient functional implementation of the NAS benchmark FT. In: Malyshkin, V.E. (ed.) PaCT 2003. LNCS, vol. 2763, pp. 230–235. Springer, Heidelberg (2003)
Hammes, J., Sur, S., Bohm, A.P.W.: On the effectiveness of functional language features: NAS benchmark FT. Journal of Functional Programming 7, 103–123 (1997)
Serrarens, P.: Implementing the Conjugate Gradient Algorithm in a Functional Language. In: Kluge, W. (ed.) IFL 1996. LNCS, vol. 1268, pp. 125–140. Springer, Heidelberg (1997)
Frens, J., Wise, D.: Auto-Blocking Matrix-Multiplication or Tracking BLAS3 Performance from Source Code. In: Proceedings of the 6th ACM SIGPLAN Symposium on Principles and Practice of Parallel Programming. SIGPLAN Notices, vol. 32(7), pp. 206–216. ACM, New York (1997)
Kuznetsov, E.A., Musher, S., Shafarenko., A.: Collapse of acoustic waves in dispersive media. In: Sagdeev, R. (ed.) Nonlinear and Turbulent Processes in Physics, pp. 335–349. Harward Academic Publishers (1984)
Kadomtsev, B.B., Petviashvili, V.I.: On the stability of solitary waves in weakly dispersive media. Sov. Phys. Dokl. 15, 539–541 (1970)
Singh, S., Honzawa, T.: Kadomtsev-petviashivili equation for an ion-acoustic soliton in a collisionless weakly relativistic plasma with finite ion temperature. Physics of Fluids B: Plasma Physics 5, 2093–2097 (1993)
Gilbert, G.: The kadomtsev-petviashvili equations and fundamental string theory. Communications in Mathematical Physics 117, 331–348 (1988)
Chen, X.N., Sharma, S.D.: Zero wave resistance for ships moving in shallow channels at supercritical speeds. J. Fluid Mech. 335, 305–321 (1997)
Lu, Z., Tian, E.M., Grimshaw, R.: Interaction of two lump solitons described by the kadomtsev-petviashvili equation. Technical report, Dept. Math. Sci., Loughborough University (2003)
Timmes, F.X.: A pentadiagonal linear equation solver, http://www.cococubed.com/code_pages/pent.shtml
Grelck, C., Scholz, S.-B., Trojahner, K.: With-loop scalarization – merging nested array operations. In: Trinder, P., Michaelson, G.J., Peña, R. (eds.) IFL 2003. LNCS, vol. 3145, pp. 118–134. Springer, Heidelberg (2004)
Author information
Authors and Affiliations
Editor information
Editors and Affiliations
Rights and permissions
Copyright information
© 2006 Springer-Verlag Berlin Heidelberg
About this paper
Cite this paper
Shafarenko, A., Scholz, SB., Herhut, S., Grelck, C., Trojahner, K. (2006). Implementing a Numerical Solution of the KPI Equation Using Single Assignment C: Lessons and Experiences. In: Butterfield, A., Grelck, C., Huch, F. (eds) Implementation and Application of Functional Languages. IFL 2005. Lecture Notes in Computer Science, vol 4015. Springer, Berlin, Heidelberg. https://doi.org/10.1007/11964681_10
Download citation
DOI: https://doi.org/10.1007/11964681_10
Publisher Name: Springer, Berlin, Heidelberg
Print ISBN: 978-3-540-69174-7
Online ISBN: 978-3-540-69175-4
eBook Packages: Computer ScienceComputer Science (R0)