dl.acm.org

A grid-free abstraction of the Navier-Stokes equations in Fortran 95/2003 | ACM Transactions on Mathematical Software

  • ️KassinosStavros C.
  • ️Sat Jan 19 2008

Article No.: 2, Pages 1 - 33

Abstract

Computational complexity theory inspires a grid-free abstraction of the Navier-Stokes equations in Fortran 95/2003. A novel complexity analysis estimates that structured programming time grows at least quadratically with the number of program lines. Further analysis demonstrates how an object-oriented strategy focused on mathematical objects renders the quadratic estimate scale-invariant, so the time required for the limiting factor in program development (debugging) no longer grows as the code grows. Compared to the coordinate-free C++ programming of Grant et al. [2000], grid-free Fortran programming eliminates a layer of procedure calls, eliminates a related need for the C++ template construct, and offers a shorter migration path for Fortran programmers. The grid-free strategy is demonstrated by constructing a physical-space driver for a Fourier-space Navier-Stokes solver. Separating the expression of the continuous mathematical model from the discrete numerics clarifies issues that are otherwise easily conflated. A run-time profile suggests that grid-free design substantially reduces the fraction of the procedures that significantly impact runtime, freeing more code to be structured in ways that reduce development time. Applying Amdahl's law to the total solution time (development time plus run time) leads to a strategy that negligibly impacts development time but achieves 58% of the maximum possible speedup.

References

[1]

Akin, E. 2003. Object-Oriented Programming via Fortran 90/95. Cambridge University Press, Cambridge, UK.

[2]

Barton, J. J. and Nackman, L. R. 1994. Scientific and Engineering C++: An Introduction with Advanced Examples. Addison-Wesley. Boston, MA.

[3]

Bernholdt, D. E., Allan, B. A., Armstrong, R., Bertrand, F., Chiu, K., Dahlgren, T. L., Damevski, K., Elwasif, W. R., Epperly, T. G. W., Govindaraju, M., Katz, D. S., Kohl, J. A., Krishnan, M., Kumfert, G., Larson, J. W., Lefantzi, S., Lewis, M. J., Malony, A. D., McInnes, L. C., Nieplocha, J., Norris, B., Parker, S. G., Ray, J., Shende, S., Windus, T. L., and Zhou, S. 2006. A component architecture for high-performance scientific computing. Int. J. High Perform. Comput. Appl. 20, 163--202.

[4]

Berryhill, J. R. 2001. C++ Scientific Programming: Computational Recipes at a Higher Level. Wiley-Interscience, Hoboken, NJ.

[5]

Bronson, G. J. 2006. C++ for Engineers and Scientists 2nd Ed. Thomson Learning, Stamford, CT.

[6]

Buzzi-Ferraris, G. 1998. Scientific C++. Addison-Wesley, Boston, MA.

[7]

Canuto, C., Hussaini, M. Y., Quarteroni, A., and Zang, T. A. 1988. Spectral Methods in Fluid Dynamics. Springer-Verlag, Berlin, Germany.

[8]

Collins, J. B. 2004. Standardizing an ontology of physics for modeling and simulation. Proceedings of the Fall Simulation Interoperability Workshop. Orlando, FL.

[9]

Decyk, V. K., Norton, C. D., and Szymanski, B. K. 1997. Expressing object-oriented concepts in Fortran 90. ACM Fortran For. 15, 13--18.

[10]

Decyk, V. K., Norton, C. D., and Szymanski, B. K. 1997. How to express C++ concepts in Fortran 90. Scient. Program. 6, 363--390.

[11]

Decyk, V. K., Norton, C. D., and Szymanski, B. K. 1997. High performance object-oriented programming in Fortran 90. In Proceedings of the 8th SIAM Conference On Parallel Processing for Scientific Computing. M. Heath et al., Eds. Minneapolis, MN.

[12]

Decyk, V. K., Norton, C. D., and Szymanski, B. K. 1998. How to support inheritance and run-time polymorphism in Fortran 90. Comput. Phys. Comm. 115, 9--17.

[13]

Dinesh, T., Haveraaen, M., and Heering, J. 2000. An algebraic programming style for numerical software and its optimization. Scient. Program. 8, 247--259.

[14]

Fenton, N. E. and Ohlsson, N. 2000. Quantitative analysis of faults and failures in a complex software system. IEEE Trans. Softw. Eng. 26, 797--814.

[15]

Grant, P. W. Haveraaen, M. and Webster, M. F. 2000. Coordinate free programming of computational fluid dynamics problems. Scient. Program. 8, 211--230.

[16]

Hatton, L. 1997. The T experiments: Errors in scientific software. IEEE Computat. Scien. Eng. 4, 27--38.

[17]

Haveraaen, M. Madsen, V., and Munthe-Kaas, M. 1992. Algebraic programming technology for partial differential equations. In Proceedings Norsk Informatikk Konferanse, A. Maus et al., Eds. 55--68.

[18]

Kim, J., Moin, P., and Moser, R.D. 1987. Turbulence statistics in fully developed channel flow at low Reynolds number. J. Fluid Mechan. 177, 133--166.

[19]

Lefantzi, S. Ray, J., Kennedy, C. A., and Najm, H. N. 2005. A component-based toolkit for simulating reacting flows with high order spatial discretizations on structured adaptively refined meshes. Prog. Computat. Fluid Dynam. 5, 298--315.

[20]

Machiels, L. and Deville, M. O. 1997. Fortran 90: An entry into object-oriented programming for the solution of partial differential equations. ACM Trans. Math. Softw. 23, 32--49.

[21]

Markus, A. 2003. Avoiding memory leaks with derived types. ACM Fortran For. 22, 1--6.

[22]

Malawski, M., Dawid, K., and Vaidy, Sunderam. 2005. MOCCA---Towards a distributed CCA framework for metacomputing. Proceedings of the 19th IEEE International Parallel and Distributed Processing Symposium (IPDPS)---IEEE Computer Society.

[23]

McInnes, L. C., Allan, B. A., Armstrong, R., Benson, S. J., Bernholdt, D. E., Dahlgren, T. L., Diachin, L. F., Krishnan, M., Kohl, J. A., Larson, J. W., Lefantzi, S., Nieplocha, J., Norris, B., Parker, S. G., Ray, J., and Zhou, S. 2005. Parallel PDE-based simulations using the Common Component Architecture. In Numerical Solution of Partial Differential Equations on Parallel computers, A.M., Bruaset, and A. Tveito, Eds. Springer, Berlin, Germany.

[24]

Metcalf, M., Reid, J., and Cohen, M. 2004. Fortran 95/2003 Explained. Oxford University Press, Oxford, UK.

[25]

Mittal, R. and Iaccarino, G. 2005. Immersed boundary methods. Ann. Rev. Fluid Mechan. 37, 239--261.

[26]

Moin, P. 2001. Fundamentals of Engineering Numerical Analysis. Cambridge University Press, Cambridge, UK.

[27]

Oliveira, S. and Stewart, D. 2006. Writing Scientific Software: A Guide to Good Style. Cambridge University Press, Cambridge, UK.

[28]

Orszag, S. A. and Patterson Jr., G. S. 1972. Numerical simulation of three-dimensional homogeneous isotropic turbulence. Phys. Rev. Lett. 28, 76--79.

[29]

Rouson, D. W. I., Kassinos, S. C., Sarris, I., and Toschi, F. 2006b. Particle dispersion in magnetohydrodynamic turbulence at low magnetic Reynolds number. In Proceedings of the CTR Summer Program. Center for Turbulence Research, Stanford University, Stanford, CA.

[30]

Rouson, D. W. I., Morris, K., and Xu, X. 2005. Dynamic memory de-allocation in Fortran 95/2003 derived type calculus.Scien. Program. 13, 189--203.

[31]

Rouson, D. W. I. and Xiong, Y. 2004. Design metrics in quantum turbulence simulations: How physics influences software architecture. Scien. Program. 12, 185--196.

[32]

Rouson, D. W. I., Xu, X., and Morris, K. 2006a. Formal constraints on memory management in composite overloaded operations, Scien. Program. 14, 27--40.

[33]

Shalloway, A. and Trott, J. R. 2002. Design Patterns Explained: A New Perspective on Object-Oriented Design. Addison-Wesley.

[34]

Spalart, P. R., Moser, R. D., and Rogers, M. M. 1991. Spectral methods for the Navier-Stokes equations in one infinite and two periodic directions. J. Comput. Phys. 96, 297--324.

[35]

Stewart, G. W. 2003. Memory leaks in derived types revisited. ACM Fortran For. 22, (Dec), 25--27.

[36]

Yang, D. 2000. C++ and Object-Oriented Numeric Computing for Scientists and Engineers. Springer, Berlin, Germany.

[37]

Zhang, K., Damevski, K., Venkatachalapathy, V., and Parker, S.G. 2004. SCIRun2: A CCA framework for high performance computing. In 9th International Workshop on High-Level Parallel Programming Models and Supportive Environments (HIPS'04). Rasmussen, C., Workshop Chair, Santa Fe, NM, 72--79.

Information & Contributors

Information

Published In

cover image ACM Transactions on Mathematical Software

ACM Transactions on Mathematical Software  Volume 34, Issue 1

January 2008

131 pages

Copyright © 2008 ACM.

Permission to make digital or hard copies of all or part of this work for personal or classroom use is granted without fee provided that copies are not made or distributed for profit or commercial advantage and that copies bear this notice and the full citation on the first page. Copyrights for components of this work owned by others than ACM must be honored. Abstracting with credit is permitted. To copy otherwise, or republish, to post on servers or to redistribute to lists, requires prior specific permission and/or a fee. Request permissions from [email protected]

Publisher

Association for Computing Machinery

New York, NY, United States

Publication History

Published: 19 January 2008

Accepted: 01 March 2007

Revised: 01 December 2006

Received: 01 March 2006

Published in TOMS Volume 34, Issue 1

Permissions

Request permissions for this article.

Check for updates

Author Tags

  1. Fortran
  2. Navier-Stokes equations
  3. complexity
  4. computational fluid dynamics
  5. coordinate-free programming
  6. grid-free programming
  7. scientific computing

Qualifiers

  • Research-article
  • Research
  • Refereed

Funding Sources

Contributors

Other Metrics

Bibliometrics & Citations

Bibliometrics

Article Metrics

  • Downloads (Last 12 months)8
  • Downloads (Last 6 weeks)1

Reflects downloads up to 05 Mar 2025

Other Metrics

Citations

  • Haveraaen MScholz SShivers O(2018)Proving a core code for FDM correct by 2 + dw testsProceedings of the 5th ACM SIGPLAN International Workshop on Libraries, Languages, and Compilers for Array Programming10.1145/3219753.3219759(42-49)Online publication date: 19-Jun-2018
  • Haveraaen MMorris KRouson DRadhakrishnan HCarson C(2015)High-Performance design patterns for modern fortranScientific Programming10.1155/2015/9420592015(3-3)Online publication date: 1-Jan-2015
  • Xu XRouson DKassinos SRadhakrishnan H(2012)Dispersed-phase structure in sheared MHD turbulenceJournal of Turbulence10.1080/14685248.2011.63604613(N2)Online publication date: 25-Jan-2012
  • Rouson DAdalsteinsson HXia J(2010)Design patterns for multiphysics modeling in Fortran 2003 and C++ACM Transactions on Mathematical Software10.1145/1644001.164400437:1(1-30)Online publication date: 22-Jan-2010
  • Rouson DXia JXu X(2010)Object construction and destruction design patterns in Fortran 2003Procedia Computer Science10.1016/j.procs.2010.04.1661:1(1495-1504)Online publication date: May-2010
  • Echekki T(2009)Multiscale methods in turbulent combustion: strategies and computational challengesComputational Science & Discovery10.1088/1749-4699/2/1/0130012:1(013001)Online publication date: 4-Dec-2009
  • Rouson D(2008)Towards analysis-driven scientific software architecture: The case for abstract data type calculusScientific Programming10.1155/2008/39391816:4(329-339)Online publication date: 1-Dec-2008
  • Jaeger EBerry LD’Azevedo EBarrett RAhern SSwain DBatchelor DHarvey RMyra JD’Ippolito DPhillips CValeo ESmithe DBonoli PWright JChoi M(2008)Simulation of high-power electromagnetic wave heating in the ITER burning plasmaPhysics of Plasmas10.1063/1.295912815:7Online publication date: 22-Jul-2008
  • Rouson DKassinos SMoulitsas ISarris IXu X(2008)Dispersed-phase structural anisotropy in homogeneous magnetohydrodynamic turbulence at low magnetic Reynolds numberPhysics of Fluids10.1063/1.283277620:2(025101)Online publication date: Feb-2008

View Options

Login options

Check if you have access through your login credentials or your institution to get full access on this article.

Sign in

Full Access

View options

PDF

View or Download as a PDF file.

PDF

eReader

View online with eReader.

eReader

Figures

Tables

Media