Nothing Special   »   [go: up one dir, main page]

skip to main content
research-article

Design patterns for multiphysics modeling in Fortran 2003 and C++

Published: 22 January 2010 Publication History

Abstract

We present three new object-oriented software design patterns in Fortran 2003 and C++. These patterns integrate coupled differential equations, facilitating the flexible swapping of physical and numerical software abstractions at compile-time and runtime. The Semi-Discrete pattern supports the time advancement of a dynamical system encapsulated in a single abstract data type (ADT). The Puppeteer pattern combines ADTs into a multiphysics package, mediates interabstraction communications, and enables implicit marching even when nonlinear terms couple separate ADTs with private data. The Surrogate pattern emulates C++ forward references in Fortran 2003. After code demonstrations using the Lorenz equations, we provide architectural descriptions of our use of the new patterns in extending the Rouson et al. [2008a] Navier-Stokes solver to simulate multiphysics phenomena. We also describe the relationships between the new patterns and two previously developed architectural elements: the Strategy pattern of Gamma et al. [1995] and the template emulation technique of Akin [2003]. This report demonstrates how these patterns manage complexity by providing logical separation between individual physics models and the control logic that bridges between them. Additionally, it shows how language features such as operator overloading and automated memory management enable a clear mathematical notation for model bridging and system evolution.

Supplementary Material

Rouson Appendix (a3-rouson-apndx.pdf)
Online appendix to design patterns for multiphysics modeling in Fortran 2003 and C++ on article 3.

References

[1]
Akin, E. 2003. Object-Oriented Programming via Fortran 90/95. Cambridge University Press, Cambridge, U.K.
[2]
Alexander, C., Ishikawa, S., Murray, S., Jacobson, M., Fiksdahl-King, I., and Angel S. 1977. A Pattern Language: Towns, Buildings, Construction. Oxford University Press, Oxford, U.K.
[3]
Balay, S., Buschelman, K., Eijkhout, V., Gropp, W., Kaushik, D., Knepley, M., McInnes, L. C., Smith, B., and Zhang, H. 2007. PETSc Users Manual, ANL-95/11--Rev. 2.3.3. Argonne National Laboratory, Argonne, IL.
[4]
Barker, V. A., Blackford, L. S., Dongarra, J., Du Croz, J., Hammarling, S., Marinova, M., Waniewsky, J., and Yalamov, P. 2001. LAPACK95 Users' Guide. Society for Industrial and Applied Mathematics, Philadelphia, PA.
[5]
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., Kirshnan, M., Kumfert, G., Larson, J. W., Lefantzi, S., Lewis, M. J., Malony, A. D., McInnes, L. C., Nieplocha, J., Norris, B., Parker, S. G. M, 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.
[6]
Blackford, L. S., Demmel, J., Dongarra, J., Duff, I., Hammarling, S., Henry, G., Heroux, M., Kaufman, L., Lumsdaine, A., Petitet, A., Pozo, R., Remington, K., Whaley, R. C. 2002. An updated set of basic linear algebra subprograms (BLAS). ACM Trans. Math. Soft., 28, 2, 135--151.
[7]
Blackford, L. S., Choi, J., Cleary, A., D'Azevedo, E., Demmel, J., Dhillon, I., Dongarra, J., Hammarling, S., Henry, G., Petitet, A., Stanley, K., Walker, D., and Whaley, R. C. 1997. ScaLAPACK Users' Guide. Society for Industrial and Applied Mathematics, Philadelphia, PA.
[8]
Blilie, C. 2002. Patterns in scientific software: An introduction. Comput. Sci. Eng., 4, 3, 48--52.
[9]
Booch, G., Rumbaugh, J., and Jacobson, I. 1999. The Unified Modeling Language User Guide, Addison-Wesley, Reading, MA.
[10]
Brucker, K. A., Isaza, J. C., Vaithianathan, T., and Collins, L. R. 2007. Efficient algorithm for simulating homogeneous turbulent shear flow without remeshing. J. Comput. Phys. 225, 20--32.
[11]
Collins-Sussman, B., Fitzpatrick, B. W., and Pilato, C. M. 2004. Version Control with Subversion, O'Reilly & Associates, Sebastopol, CA.
[12]
Decyk, V. K., Norton, C. D., and Szymanski, B. K. 1997a. Expressing object-oriented concepts in Fortran 90. ACM Fortran For. 15, 13--18.
[13]
Decyk, V. K., Norton, C. D., and Szymanski, B. K. 1997b. How to express C++ concepts in Fortran 90. Sci. Program. 6, 363--390.
[14]
Decyk, V. K., Norton, C. D., and Szymanski, B. K. 1998. How to support inheritance and run-time polymorphism in Fortran 90. Comput. Phys. Commun. 115, 9--17.
[15]
Decyk, V. K. and Gardner, H. J. 2007. A factory pattern in Fortran 95. In Lecture Notes in Computer Science, 4487/2007, 583-590, Springer Berlin/Heidelberg.
[16]
Decyk, V. K. and Gardner, H. J. 2008. Design patterns in Fortran 90/95. Comput. Phys. Commun. In press.
[17]
Free Software Foundation. 2004a. Gnu concurrent version system home page. http://www.gnu.org/software/cvs.
[18]
Free Software Foundation. 2004b. Gnu mailman home page. http://www.gnu.org/software/mailman/mailman.html.
[19]
Gamma, E., Helm, R., Johnson, R., and Vlissides, J. 1995. Design Patterns: Elements of Reusable Object-Oriented Software, Addison-Wesley, Reading, MA.
[20]
Gardner, H. and Manduchi, G. 2007. Design Patterns for e-Science. Springer, Berlin, Germany.
[21]
Grant, P. W., Haveraaen, M., and Webster, M. F. 2000. Coordinate free programming of computational fluid dynamics problems. Sci. Program. 8, 211--230.
[22]
Heroux, M. A., Bartlett, R. A., Howle, V. E., Hoekstra, R. J., Hu, J. J., Kolda, T. G., Lehoucq, R. B., Long, K. R., Pawlowski, R. P., Phipps, E. T., Salinger, A. G., Thornquist, H. K., Tuminaro, R. S., Willenbring, J. M., Williams, A., Stanley, K. S. 2005. An overview of the Trilinos project. ACM Trans. Math. Soft. 31, 3, 397--423.
[23]
Hill, C., DeLuca, C., Balaji, V., Suarez, M., and da Silva, A. 2004. The architecture of the Earth Systems Modeling Framework. Comput. Sci. Eng. 6, 1, 18--28.
[24]
Joy, W. and Kennedy, K. Chairs. 1999. Information technology research: Investing in our future. President's Information Technology Advisory Committee Report. Cited in Oden {2006}. www.nited.gov/pitae/report/pitae_report.pdf.
[25]
Kim, J. R., Moser, D., and Moin, P. 1987. Turbulence statistics in fully developed channel flow at low Reynolds number. J. Fluid Mech. 177, 133.
[26]
Kirk, S. R. and Jenkins, S. 2004. Information theory-based software metrics and obfuscation. J. Syst. Softw. 72, 179--186.
[27]
Knaepen, B., Kassinos, S. C., and Carati, D. 2004. Magnetohydrodynamic turbulence at moderate magnetic Reynolds number. J. Fluid Mech. 513, 199--220.
[28]
Lorenz, E. N. 1963. Deterministic nonperiodic flow. J. Atmos. Sci. 20, 2, 130--141.
[29]
Markus, A. 2006. Design patterns and Fortran 90/95. ACM Fort. For. 26, 1, April.
[30]
Martin, R. C. 2002. Agile Software Development, Principles, Patterns and Practices. Prentice-Hall, Englewood Cliffs, NJ. Cited in Kirk and Jenkins {2004}.
[31]
Mawlawski, M., Dawid, K. and Sundaram, V. 2005. MOCCA—towards a distributed CCA framework for metacomputing. In Proceedings of the 19th IEEE International Parallel and Distributed Processing Symposium (IPDPS). IEEE Computer Society, Los Alamitos, CA.
[32]
Mattson, T. G., Sanders, B. A., and Massingill, B. L. 2004. Patterns for Parallel Programming. Addison-Wesley, Reading, MA. 25, 1, 13--29.
[33]
McGrattan, K., Bryan, K., Hostikka, S. and Floyd, J. 2008. Fire dynamics simulator (version 5) user's guide. NIST Special Publication 1019-5. National Institute of Standards and Technology, Gaithersburg, MD.
[34]
Metcalf, M., Reid, J., and Cohen, M. 2004. Fortran 95/2003 Explained. Oxford University Press, Oxford, U.K.
[35]
Morris, K., Koplik, J., and Rouson, D. W. I. 2008. Vortex locking in direct numerical simulations of quantum turbulence. Phys. Rev. Lett. 101, 015301.
[36]
Oden, J. T. (Chair). 2006. Revolutionizing engineering science through simulation. Report of the National Science Foundation Blue Ribbon Panel on Simulation-Based Engineering Science. National Science Foundation, Arlington, VA.
[37]
Orszag, S. A. and Patterson, G. S. 1972. Numerical simulation of three-dimensional homogeneous isotropic turbulence. Phys. Rev. Lett. 28, 2.
[38]
Rouson, D. W. I. 2008. Toward analysis-driven scientific software architecture: The case for abstract data type calculus, Sci. Program. 16, 4.
[39]
Rouson, D. W. I. and Handler, R. 2007. Towards a variational multiscale large-eddy simulation of the atmospheric boundary layer. In Environmental Sciences and Environmental Computing Vol. III, Envirocomp Institute, Inc., Fremont, CA.
[40]
Rouson, D. W. I., Morris, K. and Xu, X. 2005. Dynamic memory de-allocation in Fortran 95/2003 derived type calculus. Sci. Program. 13, 3, 189--203.
[41]
Rouson, D. W. I., Rosenberg, R., Xu, X., Moulitsas, I., and Kassinos, S. C. 2008a. A grid-free abstraction of the Navier-Stokes equations in Fortran 95/2003. ACM Trans. Math Soft. 34, 1, Article 2 (Jan.)
[42]
Rouson, D. W. I., Kassinos, S. C., Moulitsas, I., Sarris, I. and Xu, X. 2008b. Dispersed-phase structural anisotropy in homogeneous magnetohydrodynamic turbulence at low magnetic Reynolds number. Phys. Fluids 20, 025101 (Feb.)
[43]
Rouson, D. W. I. and Xiong, Y. 2004. Design metrics in quantum turbulance simulations: How physics influences software architecture. Sci. Program. 12, 3, 185--186.
[44]
Rouson, D. W. I., Xu, X., and Morris, K. 2006. Formal constraints on memory management for composite overloaded operations. Sci. Program. 14, 1, 27--40.
[45]
Stevens, W. P., Myers, G. J., and Constantine, L. L. 1974. Structured design. IBM Syst. J. 13, 2, 115.
[46]
Stroustrup, B. 1997. The C++ Programming Language, 3rd ed. Addison-Wesley, Reading, MA.
[47]
The Mozilla Organization. 2004a. Mozilla Bonsai home page. http://ww.mozilla.org/bonsai.html.
[48]
The Mozilla Organization. 2004b. Mozilla Bugzilla home page. http://ww.mozilla.org /projects/bonsai.
[49]
Zhang, K., Damevski, K., Venkatachalapathy, V., and Parker, S. G. 2004. SCIRun2: A CCA framework for high-performance computing. In Proceedings of the 9th International Workshop on High-Level Parallel Programming Models and Supportive Environments (HIPS '04). C. Rasmussen, Workshop Chair. 72--79.

Cited By

View all
  • (2021)On the development, verification, and validation of a discontinuous Galerkin solver for the Navier-Stokes equationsComputers & Fluids10.1016/j.compfluid.2021.104990229(104990)Online publication date: Oct-2021
  • (2021)On the development, verification, and validation of a discontinuous Galerkin solver for the Navier–Stokes equationsComputers & Fluids10.1016/j.compfluid.2021.104921223(104921)Online publication date: Jun-2021
  • (2019)Extended ForUML for Automatic Generation of UML Sequence Diagrams from Object-Oriented FortranScientific Programming10.1155/2019/25426862019Online publication date: 1-Jan-2019
  • Show More Cited By

Recommendations

Comments

Please enable JavaScript to view thecomments powered by Disqus.

Information & Contributors

Information

Published In

cover image ACM Transactions on Mathematical Software
ACM Transactions on Mathematical Software  Volume 37, Issue 1
January 2010
258 pages
ISSN:0098-3500
EISSN:1557-7295
DOI:10.1145/1644001
Issue’s Table of Contents
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: 22 January 2010
Accepted: 01 March 2009
Revised: 01 October 2008
Received: 01 March 2008
Published in TOMS Volume 37, Issue 1

Permissions

Request permissions for this article.

Check for updates

Author Tags

  1. Design patterns
  2. Lorenz equations
  3. multiphysics modeling

Qualifiers

  • Research-article
  • Research
  • Refereed

Funding Sources

Contributors

Other Metrics

Bibliometrics & Citations

Bibliometrics

Article Metrics

  • Downloads (Last 12 months)30
  • Downloads (Last 6 weeks)4
Reflects downloads up to 12 Nov 2024

Other Metrics

Citations

Cited By

View all
  • (2021)On the development, verification, and validation of a discontinuous Galerkin solver for the Navier-Stokes equationsComputers & Fluids10.1016/j.compfluid.2021.104990229(104990)Online publication date: Oct-2021
  • (2021)On the development, verification, and validation of a discontinuous Galerkin solver for the Navier–Stokes equationsComputers & Fluids10.1016/j.compfluid.2021.104921223(104921)Online publication date: Jun-2021
  • (2019)Extended ForUML for Automatic Generation of UML Sequence Diagrams from Object-Oriented FortranScientific Programming10.1155/2019/25426862019Online publication date: 1-Jan-2019
  • (2019)Software system design based on patterns for Newton-type methodsComputing10.1007/s00607-019-00759-8Online publication date: 10-Sep-2019
  • (2017)Bridging the ChasmACM Computing Surveys10.1145/308422550:4(1-32)Online publication date: 25-Aug-2017
  • (2015)Extracting UML class diagrams from object-oriented fortranScientific Programming10.1155/2015/4218162015(1-1)Online publication date: 1-Jan-2015
  • (2015)Nonlinear multiphysics finite element code architecture in object oriented Fortran environmentFinite Elements in Analysis and Design10.1016/j.finel.2015.01.00899:C(1-15)Online publication date: 1-Jul-2015
  • (2013)Extracting UML class diagrams from object-oriented FortranProceedings of the 1st International Workshop on Software Engineering for High Performance Computing in Computational Science and Engineering10.1145/2532352.2532354(9-16)Online publication date: 17-Nov-2013
  • (2013)DEVELOPMENT OF SCIENTIFIC SOFTWARE: A SYSTEMATIC MAPPING, A BIBLIOMETRICS STUDY, AND A PAPER REPOSITORYInternational Journal of Software Engineering and Knowledge Engineering10.1142/S021819401350013723:04(463-506)Online publication date: May-2013
  • (2012)Exploring capabilities within ForTrilinos by solving the 3D Burgers equationScientific Programming10.1155/2012/37879120:3(275-292)Online publication date: 1-Jul-2012
  • Show More Cited By

View Options

Get Access

Login options

Full Access

View options

PDF

View or Download as a PDF file.

PDF

eReader

View online with eReader.

eReader

Media

Figures

Other

Tables

Share

Share

Share this Publication link

Share on social media