How to Solve Systems of Conservation Laws Numerically Using the Graphics Processor as a High-Performance Computational Engine

  • Trond Runar Hagen
  • Martin O. Henriksen
  • Jon M. Hjelmervik
  • Knut-Andreas Lie


The paper has two main themes: The first theme is to give the reader an introduction to modern methods for systems of conservation laws. To this end, we start by introducing two classical schemes, the Lax-Friedrichs scheme and the Lax-Wendroff scheme. Using a simple example, we show how these two schemes fail to give accurate approximations to solutions containing discontinuities. We then introduce a general class of semi-discrete finite-volume schemes that are designed to produce accurate resolution of both smooth and nonsmooth parts of the solution. Using this special class we wish to introduce the reader to the basic principles used to design modern high-resolution schemes. As examples of systems of conservation laws, we consider the shallow-water equations for water waves and the Euler equations for the dynamics of an ideal gas.

The second theme in the paper is how programmable graphics processor units (GPUs or graphics cards) can be used to efficiently compute numerical solutions of these systems. In contrast to instruction driven micro-processors (CPUs), GPUs subscribe to the data-stream-based computing paradigm and have been optimised for high throughput of large data streams. Most modern numerical methods for hyperbolic conservation laws are explicit schemes defined over a grid, in which the unknowns at each grid point or in each grid cell can be updated independently of the others. Therefore such methods are particularly attractive for implementation using data-stream-based processing.


Riemann Problem Graphic Card Spurious Oscillation Graphic Processor Unit Gaussian Integration Point 
These keywords were added by machine and not by the authors. This process is experimental and the keywords may be updated as the learning algorithm improves.


Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.


  1. 1.
    J. E. Aarnes, T. Gimse, and K.-A. Lie. An introduction to the numerics of flow in porous media using Matlab. In this book.Google Scholar
  2. 2.
    J. E. Aarnes, V. Kippe, K.-A. Lie, and A. B. Rustad. Modelling of multiscale structures in flow simulations for petroleum reservoirs. In this book.Google Scholar
  3. 3.
    P. Arminjon, D. Stanescu, and M.-C. Viallon. A two-dimensional finite volume extension of the Lax-Friedrichs and Nessyahu-Tadmor schemes for compressible flows. In M. Hafez and K. Oshima, editors, Proceedings of the 6th International Symposium on CFD, Lake Tahoe, volume IV, pages 7–14, 1995.Google Scholar
  4. 4.
    E. Audusse, F. Bouchut, M.-O. Bristeau, R. Klein, and B. Perthame. A fast and stable well-balanced scheme with hydrostatic reconstruction for shallow water flows. SIAM J. Sci. Comp., 25:2050–2065, 2004.zbMATHCrossRefMathSciNetGoogle Scholar
  5. 5.
    Derek S. Bale, Randall J. Leveque, Sorin Mitran, and James A. Rossmanith. A wave propagation method for conservation laws and balance laws with spatially varying flux functions. SIAM J. Sci. Comput., 24(3):955–978 (electronic), 2002.zbMATHCrossRefMathSciNetGoogle Scholar
  6. 6.
    F. Benkhaldoun and R. Vilsmeier, editors. Finite volumes for complex applications. Hermes Science Publications, Paris, 1996. Problems and perspectives.Google Scholar
  7. 7.
    F. Bianco, G. Puppo, and G. Russo. High-order central schemes for hyperbolic systems of conservation laws. SIAM J. Sci. Comput., 21(1):294–322 (electronic), 1999.zbMATHCrossRefMathSciNetGoogle Scholar
  8. 8.
    A. J. Chorin and J. E. Marsden. A mathematical introduction to fluid mechanics, volume 4 of Texts in Applied Mathematics. Springer-Verlag, New York, third edition, 1993.zbMATHGoogle Scholar
  9. 9.
    R. Courant and K. O. Friedrichs. Supersonic Flow and Shock Waves. Interscience Publishers, Inc., New York, N. Y., 1948.zbMATHGoogle Scholar
  10. 10.
    T. Dokken, T. R. Hagen, and J. M. Hjelmervik. An introduction to general-purpose computing on programmable graphics cards. In this book.Google Scholar
  11. 11.
    M. Van Dyke. An Album of Fluid Motion. Parabolic Press, 1982.Google Scholar
  12. 12.
    Z. Fan, F. Qiu, A. Kaufman, and S. Yoakum-Stover. GPU cluster for high performance computing. In SC’ 04: Proceedings of the 2004 ACM/IEEE conference on Supercomputing, page 47, Washington, DC, USA, 2004. IEEE Computer Society.Google Scholar
  13. 13.
    R. Fernando, editor. GPU Gems: Programming Techniques, Tips and Tricks for Real-Time Graphics. Addison Wesley, 2004.Google Scholar
  14. 14.
    R. Fernando and M.J. Kilgard. The Cg Tutorial: The Definitive Guide to Programmable Real-Time Graphics. Addison-Wesley Longman Publishing Co., Inc., 2003.Google Scholar
  15. 15.
    E. Godlewski and P.-A. Raviart. Numerical approximation of hyperbolic systems of conservation laws, volume 118 of Applied Mathematical Sciences. Springer-Verlag, New York, 1996.zbMATHGoogle Scholar
  16. 16.
    S. K. Godunov. A difference method for numerical calculation of discontinuous solutions of the equations of hydrodynamics. Mat. Sb. (N.S.), 47(89):271–306, 1959.MathSciNetGoogle Scholar
  17. 17.
    T. R. Hagen, J. M. Hjelmervik, K.-A. Lie, J. R. Natvig, and M. Ofstad Henriksen. Visual simulation of shallow-water waves. Simul. Model. Pract. Theory, 13(8):716–726, 2005.CrossRefGoogle Scholar
  18. 18.
    T. R. Hagen, K.-A. Lie, and J. R. Natvig. Solving the Euler equations on graphical processing units. In V.N. Alexandrov, G.D. van Albada, P.M.A. Sloot, and J. Dongarra, editors, Computational Science — ICCS 2006: 6th International Conference, Reading, UK, May 28–31, 2006, Proceedings, Part IV, volume 3994 of Lecture Notes in Computer Science (LNCS), pages 220–227. Springer Verlag, 2006.Google Scholar
  19. 19.
    A. Harten. High resolution schemes for hyperbolic conservation laws. J. Comput. Phys., 49(3):357–393, 1983.zbMATHCrossRefMathSciNetGoogle Scholar
  20. 20.
    A. Harten, P. D. Lax, and B. van Leer. On upstream differencing and Godunov-type schemes for hyperbolic conservation laws. SIAM Rev., 25(1):35–61, 1983.zbMATHCrossRefMathSciNetGoogle Scholar
  21. 21.
    R. Herbin and D. Kröner, editors. Finite volumes for complex applications III. Laboratoire d’Analyse, Topologie et Probabilités CNRS, Marseille, 2002. Problems and perspectives, Papers from the 3rd Symposium held in Porquerolles, June 24–28, 2002.Google Scholar
  22. 22.
    H. Holden and N. H. Risebro. Front tracking for hyperbolic conservation laws, volume 152 of Applied Mathematical Sciences. Springer-Verlag, New York, 2002.zbMATHGoogle Scholar
  23. 23.
    G.-S. Jiang and E. Tadmor. Nonoscillatory central schemes for multidimensional hyperbolic conservation laws. SIAM J. Sci. Comput., 19(6):1892–1917, 1998.zbMATHCrossRefMathSciNetGoogle Scholar
  24. 24.
    S. N. Kružkov. First order quasilinear equations with several independent variables. Mat. Sb. (N.S.), 81(123):228–255, 1970.MathSciNetGoogle Scholar
  25. 25.
    A. Kurganov, S. Noelle, and G. Petrova. Semidiscrete central-upwind schemes for hyperbolic conservation laws and Hamilton-Jacobi equations. SIAM J. Sci. Comput., 23(3):707–740 (electronic), 2001.zbMATHCrossRefMathSciNetGoogle Scholar
  26. 26.
    A. Kurganov and E. Tadmor. New high-resolution semi-discrete central schemes for Hamilton-Jacobi equations. J. Comp. Phys., 160:720–742, 2000.zbMATHCrossRefMathSciNetGoogle Scholar
  27. 27.
    Alexander Kurganov and Doron Levy. Central-upwind schemes for the Saint-Venant system. M2AN Math. Model. Numer. Anal., 36(3):397–425, 2002.zbMATHCrossRefMathSciNetGoogle Scholar
  28. 28.
    L. D. Landau and E. M. Lifshitz. Fluid mechanics. Translated from the Russian by J. B. Sykes and W. H. Reid. Course of Theoretical Physics, Vol. 6. Pergamon Press, London, 1959.Google Scholar
  29. 29.
    P. D. Lax. Weak solutions of nonlinear hyperbolic equations and their numerical computation. Comm. Pure Appl. Math., 7:159–193, 1954.zbMATHCrossRefMathSciNetGoogle Scholar
  30. 30.
    P.D. Lax and B. Wendroff. Systems of conservation laws. Comm. Pure Appl. Math., 13:217–237, 1960.zbMATHCrossRefMathSciNetGoogle Scholar
  31. 31.
    R. J. LeVeque. Numerical Methods for Conservation Laws. Lectures in Mathematics ETH Zürich. Birkhäuser Verlag, Basel, second edition, 1994.Google Scholar
  32. 32.
    R. J. LeVeque. Balancing source terms and flux gradients in high-resolution Godunov methods: The quasi-steady wave-propagation algorithm. J. Comput. Phys, 146:346–365, 1998.CrossRefMathSciNetGoogle Scholar
  33. 33.
    R. J. LeVeque. Finite volume methods for hyperbolic problems. Cambridge Texts in Applied Mathematics. Cambridge University Press, Cambridge, 2002.Google Scholar
  34. 34.
    D. Levy, G. Puppo, and G. Russo. Compact central WENO schemes for multidimensional conservation laws. SIAM J. Sci. Comput., 22(2):656–672, 2000.zbMATHCrossRefMathSciNetGoogle Scholar
  35. 35.
    K.-A. Lie and S. Noelle. An improved quadrature rule for the flux-computation in staggered central difference schemes in multidimensions. J. Sci. Comput., 18(1):69–81, 2003.zbMATHCrossRefMathSciNetGoogle Scholar
  36. 36.
    K.-A. Lie and S. Noelle. On the artificial compression method for second-order nonoscillatory central difference schemes for systems of conservation laws. SIAM J. Sci. Comput., 24(4):1157–1174, 2003.zbMATHCrossRefMathSciNetGoogle Scholar
  37. 37.
    R. Liska and B. Wendroff. Composite schemes for conservation laws. SIAM J. Numer. Anal., 35(6):2250–2271, 1998.zbMATHCrossRefMathSciNetGoogle Scholar
  38. 38.
    X.-D. Liu and E. Tadmor. Third order nonoscillatory central scheme for hyperbolic conservation laws. Numer. Math., 79(3):397–425, 1998.zbMATHCrossRefMathSciNetGoogle Scholar
  39. 39.
    Y. Liu, X. Liu, and E. Wu. Real-time 3d fluid simulation on GPU with complex obstacles. In Proceedings of Pacific Graphics 2004, pages 247–256. IEEE Computer Society, 2004.Google Scholar
  40. 40.
    H. Nessyahu and E. Tadmor. Nonoscillatory central differencing for hyperbolic conservation laws. J. Comput. Phys., 87(2):408–463, 1990.zbMATHCrossRefMathSciNetGoogle Scholar
  41. 41.
    S. Noelle, N. Pankratz, G. Puppo, and J. R. Natvig. Well-balanced finite volume schemes of arbitrary order of accuracy for shallow water flows. J. Comput. Phys., 213(2):474–499, 2006.zbMATHCrossRefMathSciNetGoogle Scholar
  42. 42.
    J. D. Owens, D. Luebke, N. Govindaraju, M. Harris, J. Krüger, A. E. Lefohn, and T. J. Purcell. A survey of general-purpose computation on graphics hardware. In Eurographics 2005, State of the Art Reports, pages 21–51, August 2005.Google Scholar
  43. 43.
    M. Pharr, editor. GPU Gems 2: Programming Techniques for High-Performance Graphics and General-Purpose Computation. Addison-Wesley Professional, 2005.Google Scholar
  44. 44.
    R. D. Richtmyer and K. W. Morton. Difference methods for initial-value problems. Second edition. Interscience Tracts in Pure and Applied Mathematics, No. 4. Interscience Publishers John Wiley & Sons, Inc., New York-London-Sydney, 1967.Google Scholar
  45. 45.
    R. J. Rost. OpenGL R Shading Language. Addison Wesley Longman Publishing Co., Inc., 2004.Google Scholar
  46. 46.
    M. Rumpf and R. Strzodka. Graphics processor units: new prospects for parallel computing. In A.M. Bruaset and A. Tveito, editors, Numerical Solution of Partial Differential Equations on Parallel Computers, volume 51 of Lecture Notes in Computational Science and Engineering, pages 89–134. Springer Verlag, 2006.Google Scholar
  47. 47.
    C.-W. Shu. Total-variation-diminishing time discretisations. SIAM J. Sci. Stat. Comput., 9:1073–1084, 1988.zbMATHCrossRefGoogle Scholar
  48. 48.
    C.-W. Shu. Essentially non-oscillatory and weighted essentially non-oscillatory schemes for hyperbolic conservation laws. In Advanced numerical approximation of nonlinear hyperbolic equations (Cetraro, 1997), volume 1697 of Lecture Notes in Math., pages 325–432. Springer, Berlin, 1998.CrossRefGoogle Scholar
  49. 49.
    V. A. Titarev and E. F. Toro. Finite-volume WENO schemes for threedimensional conservation laws. J. Comput. Phys., 201(1):238–260, 2004.zbMATHCrossRefMathSciNetGoogle Scholar
  50. 50.
    E. F. Toro. Riemann solvers and numerical methods for fluid dynamics. Springer-Verlag, Berlin, second edition, 1999.zbMATHGoogle Scholar
  51. 51.
    E. F. Toro. Shock-capturing methods for free-sufrace shallow flows. Wiley and Sons Ltd., 2001.Google Scholar
  52. 52.
    E. F. Toro. Multi-stage predictor-corrector fluxes for hyperbolic equations. Technical Report NI03037-NPA, Isaac Newton Institute for Mathematical Sciences, 2003.Google Scholar
  53. 53.
    R. Vilsmeier, F. Benkhaldoun, and D. Hänel, editors. Finite volumes for complex applications II. Hermes Science Publications, Paris, 1999. Problems and perspectives, Papers from the 2nd International Conference held in Duisburg, July 19–22, 1999.Google Scholar
  54. 54.
    G. B. Whitham. Linear and nonlinear waves. Wiley-Interscience [John Wiley & Sons], New York, 1974. Pure and Applied Mathematics.zbMATHGoogle Scholar
  55. 55.
    E. Wu, Y. Liu, and X. Liu. An improved study of real-time fluid simulation on GPU. J. of Computer Animation and Virtual World, 15(3–4):139–146, 2004.CrossRefGoogle Scholar

Copyright information

© Springer-Verlag Berlin Heidelberg 2007

Authors and Affiliations

  • Trond Runar Hagen
    • 1
  • Martin O. Henriksen
    • 1
  • Jon M. Hjelmervik
    • 1
  • Knut-Andreas Lie
    • 1
  1. 1.Applied MathematicsSINTEF ICTOsloNorway

Personalised recommendations