Design Patterns for Multiphysics Modeling in Fortran 2003 and C++

被引:10
|
作者
Rouson, Damian W. I. [1 ]
Adalsteinsson, Helgi [1 ]
Xia, Jim [2 ]
机构
[1] Sandia Natl Labs, Scalable Comp R&D, Livermore, CA 94550 USA
[2] IBM Corp, IBM Toronto Lab, Markham, ON L6G 1C7, Canada
来源
关键词
Design; Languages; Design patterns; multiphysics modeling; Lorenz equations; TURBULENCE; SOFTWARE; FLOW;
D O I
10.1145/1644001.1644004
中图分类号
TP31 [计算机软件];
学科分类号
081202 ; 0835 ;
摘要
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.
引用
收藏
页数:30
相关论文
共 50 条
  • [1] Object construction and destruction design patterns in Fortran 2003
    Rouson, Damian W. I.
    Xia, Jim
    Xu, Xiaofeng
    [J]. ICCS 2010 - INTERNATIONAL CONFERENCE ON COMPUTATIONAL SCIENCE, PROCEEDINGS, 2010, 1 (01): : 1489 - 1498
  • [2] WHY C++ WILL REPLACE FORTRAN
    KEFFER, T
    [J]. DR DOBBS JOURNAL, 1992, 17 (12): : S39 - &
  • [3] Design patterns for generic programming in C++
    Duret-Lutz, A
    Géraud, T
    Demaille, A
    [J]. 6TH USENIX CONFERENCE OF OBJECT-ORIENTED TECHNOLOGIES AND SYSTEMS (COOTS 01), 2001, : 189 - 202
  • [4] Scientific computing: C++ versus Fortran
    Veldhuizen, T
    [J]. DR DOBBS JOURNAL, 1997, 22 (11): : 34 - +
  • [5] Automatic Fortran to C++ conversion with FABLE
    Grosse-Kunstleve, Ralf W.
    Terwilliger, Thomas C.
    Sauter, Nicholas K.
    Adams, Paul D.
    [J]. SOURCE CODE FOR BIOLOGY AND MEDICINE, 2012, 7 (01):
  • [6] C、C++、Fortran混合编程研究
    魏威
    魏冲
    [J]. 洛阳理工学院学报(社会科学版), 2007, (04) : 94 - 98
  • [7] Automatic design patterns identification of C++ programs
    Espinoza, FAC
    Esquer, GN
    Cansino, JS
    [J]. EURASIA-ICT 2002: INFORMATION AND COMMUNICATION TECHNOLOGY, PROCEEDINGS, 2002, 2510 : 816 - 823
  • [8] Fortran, C and C++ code for econometrics and optimisation applications
    Orszag, JM
    [J]. ECONOMIC JOURNAL, 1997, 107 (440): : 252 - 256
  • [9] Fortran 90模拟C++函数重载
    靳开冠
    周振红
    [J]. 硅谷, 2011, (23) : 193 - 194
  • [10] This Isn't Your Parents' Fortran: Managing C++ Objects with Modern Fortran
    Rouson, Damian
    Morris, Karla
    Xia, Jim
    [J]. COMPUTING IN SCIENCE & ENGINEERING, 2012, 14 (02) : 46 - 54