Abstract
Ordinary Differential Equations (ODEs) are a fundamental mathematical tool to model physical, biological or chemical systems, and they are widely used in engineering, economics and social sciences. Given their vast appearance, it is of crucial importance to develop efficient numerical routines for solving ODEs that employ the computational power of modern GPUs. Here, we present a high-level approach to compute numerical solutions of ODEs by developing a generic implementation of the most common algorithms and combining this with modern C\(++\) libraries like VexCL and Thrust. Our approach is based on generic programming and results in highly scalable and easy-to-use source code.
Access this chapter
Tax calculation will be finalised at checkout
Purchases are for personal use only
Notes
- 1.
- 2.
- 3.
- 4.
- 5.
- 6.
- 7.
In Mathematics, the independent variable is often called x and the function is y(x).
References
Ahnert, K.: Odeint v2 - Solving Ordinary Differential Equations in C\(++\). http://www.codeproject.com/Articles/268589/odeint-v2-Solving-ordinary-differential-equations (Oct 2011)
Ahnert, K., Mulansky, M.: Odeint — solving ordinary differential equations in C++. AIP Conf. Proc. 1389, 1586–1589 (2011)
Alexandrescu, A.: Modern C++ Design: Generic Programming and Design Patterns Applied. Addison-Wesley Longman Publishing, Boston (2001)
Bell, N., Hoberock, J.: Thrust: A Productivity-Oriented Library for CUDA, Chap. 26, pp. 359–371. Elsevier, USA (2011)
Cohen, A.H., Holmes, P.J., Rand, R.H.: The nature of the coupling between segmental oscillators of the lamprey spinal generator for locomotion: a mathematical model. J. Math. Biol. 13, 345–369 (1982)
Cormen, T.H., Leiserson, C.E., Rivest, R.L., Stein, C.: Introduction to Algorithms. MIT Press, Cambridge (2001)
Demidov, D.: VexCL: Vector Expression Template Library for OpenCL. http://www.codeproject.com/Articles/415058/VexCL-Vector-expression-template-library-for-OpenC (July 2012)
Demidov, D., Ahnert, K., Rupp, K., Gottschling, P.: Programming CUDA and OpenCL: a case study using modern C++ libraries. SIAM J. Sci. Comput. 35(5), C453–C472 (2013)
Frenkel, D., Smit, B.: Understanding Molecular Simulation from Algorithms to Applications. Academic, San Diego (2002)
Galassi, M., Davies, J., Theiler, J., Gough, B., Jungman, G., Alken, P., Booth, M., Rossi, F.: GNU Scientific Library. Network Theory, Bristol (2007)
Gottschling, P., Wise, D.S., Adams, M.D.: Representation-transparent matrix algorithms with scalable performance. In: Proceedings of the 21st Annual International Conference on Supercomputing, pp. 116–125. ACM, New York (2007)
Gregor, D.: The Boost Function Library. http://www.boost.org/doc/libs/release/libs/function (2001)
Guennebaud, G., Jacob, B., et al.: Eigen v3. http://eigen.tuxfamily.org (2010)
Hairer, E., Nørsett, S.P., Wanner, G.: Solving Ordinary Differential Equations I: Nonstiff Problems, 2nd edn. Springer, Berlin (1993) (corr. 3rd printing 1993; corr. 3rd edn. 2009)
Hairer, E., Wanner, G.: Solving Ordinary Differential Equations II: Stiff and Differential-Algebraic Problems, 2nd edn. Springer, Berlin (1996) (2nd printing edn. 2010)
Hindmarsh, A.C., Brown, P.N., Grant, K.E., Lee, S.L., Serban, R., Shumaker, D.E., Woodward, C.S.: SUNDIALS: suite of nonlinear and differential/algebraic equation solvers. ACM Trans. Math. Softw. (TOMS) 31(3), 363–396 (2005)
Intel Math Kernel Library Reference Manual, Intel, Version 11.1 (2013)
Izhikevich, E.M., Ermentrout, B.: Phase model. Scholarpedia 3(10), 1487 (2008)
Jones, J.E.: On the determination of molecular fields. II. From the equation of state of a gas. R. Soc. Lond. Proc. Ser. A 106, 463–477 (1924)
Kuramoto, Y.: Chemical Oscillations, Waves, and Turbulence. Springer, New York (1984)
Leimkuhler, B., Reich, S.: Simulating Hamiltonian Dynamics, vol. 14. Cambridge University Press, Cambridge (2004)
Moore, R.E., Kearfott, R.B., Cloud, M.J.: Methods and Applications of Interval Analysis, vol. 2. SIAM, Philadelphia (1979)
Munshi, A., et al.: The OpenCL Specification. Khronos OpenCL Working Group 1, pp. 11–15 (2009)
NVIDIA CUDA Programming Guide. NVIDIA Corporation, Version 5.5 (2013)
OpenMP Architecture Review Board: OpenMP Application Program Interface Version 3.0. http://www.openmp.org/mp-documents/spec30.pdf (May 2008)
Ott, E.: Chaos in Dynamical Systems. Cambridge University Press, Cambridge (2002)
Pikovsky, A., Rosenblum, M., Kurths, J.: Synchronization: A Universal Concept in Nonlinear Sciences. Cambridge University Press, Cambridge (2001)
Poschel, T., Schwager, T.: Computational Granular Dynamics: Models and Algorithms. Springer, Berlin/Heidelberg [u.a.] (2010)
Press, W.H., Teukolsky, S.A., Vetterling, W.T., Flannery, B.P.: Numerical Recipes: The Art of Scientific Computing, 3rd edn. Cambridge University Press, Cambridge (2007)
R Core Team: R: A Language and Environment for Statistical Computing. R Foundation for Statistical Computing, Vienna (2013)
Reinders, J.: Intel Threading Building Blocks: Outfitting C++ for Multi-core Processor Parallelism. O’Reilly Media, Inc., Sebastopol (2010)
Rupp, K., Rudolf, F., Weinbub, J.: ViennaCL - A High Level Linear Algebra Library for GPUs and Multi-Core CPUs. In: International Workshop on GPUs and Scientific Applications, pp. 51–56 (2010)
Schabel, M.C., Watanabe, S.: The Boost Units Library. http://www.boost.org/doc/libs/release/libs/units (2010)
Soetaert, K., Cash, J.R., Mazzia, F.: Solving Differential Equations in R. Springer, Berlin/New York (2012)
Sparrow, C.: The Lorenz Equations: Bifurcations, Chaos, and Strange Attractors, vol. 41. Springer, New York (1982)
Stepanov, A., Lee, M: The Standard Template Library, vol. 1501. Hewlett Packard Laboratories, Palo Alto (1995)
Teschl, G.: Ordinary Differential Equations and Dynamical Systems, vol. 140. AMS Bookstore, Providence (2012)
Verlet, L.: Computer “experiments” on classical fluids. I. Thermodynamical properties of Lennard-Jones molecules. Phys. Rev. 159(1), 98–103 (1967)
Walter, J., Koch, M.: The Boost uBLAS Library. http://www.boost.org/doc/libs/release/libs/numeric/ublas/doc/index.htm (2002)
Acknowledgements
This work has been partially supported by the Russian Foundation for Basic Research (RFBR) grants No. 12-07-0007, 12-01-00333a, and by the Russian Government Program of Competitive Growth of Kazan Federal University. M. M. thankfully acknowledges financial support through the visitors program of the MPIPKS, Dresden (Germany).
Author information
Authors and Affiliations
Corresponding author
Editor information
Editors and Affiliations
Rights and permissions
Copyright information
© 2014 Springer International Publishing Switzerland
About this chapter
Cite this chapter
Ahnert, K., Demidov, D., Mulansky, M. (2014). Solving Ordinary Differential Equations on GPUs. In: Kindratenko, V. (eds) Numerical Computations with GPUs. Springer, Cham. https://doi.org/10.1007/978-3-319-06548-9_7
Download citation
DOI: https://doi.org/10.1007/978-3-319-06548-9_7
Published:
Publisher Name: Springer, Cham
Print ISBN: 978-3-319-06547-2
Online ISBN: 978-3-319-06548-9
eBook Packages: Computer ScienceComputer Science (R0)