| List of Figures |
|
xi | |
| List of Tables |
|
xv | |
| Preface |
|
xvii | |
| Acknowledgments |
|
xxi | |
| Disclaimer |
|
xxii | |
| Part I The Tao Of Scientific OOP |
|
1 | (82) |
|
1 Development Costs and Complexity |
|
|
3 | (28) |
|
|
|
3 | (4) |
|
1.2 Conventional Scientific Programming Costs |
|
|
7 | (4) |
|
1.3 Conventional Programming Complexity |
|
|
11 | (8) |
|
1.4 Alternative Programming Paradigms |
|
|
19 | (5) |
|
1.5 How Performance Informs Design |
|
|
24 | (1) |
|
1.6 How Design Informs Performance |
|
|
25 | (2) |
|
|
|
27 | (4) |
|
2 The Object-Oriented Way |
|
|
31 | (26) |
|
|
|
31 | (2) |
|
2.2 Object-Oriented Analysis and Design |
|
|
33 | (3) |
|
2.3 Encapsulation and Information Hiding |
|
|
36 | (4) |
|
2.4 Wrapping Legacy Software |
|
|
40 | (8) |
|
2.5 Composition, Aggregation, and Inheritance |
|
|
48 | (5) |
|
2.6 Static and Dynamic Polymorphism |
|
|
53 | (1) |
|
|
|
54 | (1) |
|
|
|
55 | (2) |
|
|
|
57 | (26) |
|
3.1 Abstract Data Type Calculus |
|
|
57 | (9) |
|
3.2 Analysis-Driven Design |
|
|
66 | (11) |
|
|
|
69 | (2) |
|
|
|
71 | (2) |
|
|
|
73 | (4) |
|
|
|
77 | (2) |
|
|
|
79 | (4) |
| Part II SOOP To Nuts And Bolts |
|
83 | (146) |
|
|
|
85 | (22) |
|
|
|
85 | (1) |
|
|
|
86 | (13) |
|
4.2.1 Building Architecture |
|
|
87 | (6) |
|
4.2.2 Software Architecture |
|
|
93 | (5) |
|
4.2.3 Scientific Software Architecture |
|
|
98 | (1) |
|
|
|
99 | (8) |
|
4.3.1 The Lorenz Equations: A Chaotic Dynamical System |
|
|
100 | (2) |
|
4.3.2 Quantum Vortex Dynamics in a Superfluid |
|
|
102 | (2) |
|
4.3.3 Burgers' Equation: Shock Formation and Dissipation |
|
|
104 | (3) |
|
|
|
107 | (22) |
|
|
|
107 | (1) |
|
|
|
108 | (19) |
|
5.2.1 Fortran Implementation |
|
|
110 | (6) |
|
5.2.2 C++ Style and Tools |
|
|
116 | (6) |
|
5.2.3 C++ Implementation of Vortex |
|
|
122 | (5) |
|
|
|
127 | (1) |
|
|
|
127 | (2) |
|
6 The Abstract Calculus Pattern |
|
|
129 | (14) |
|
|
|
129 | (1) |
|
|
|
130 | (10) |
|
6.2.1 Fortran Implementation |
|
|
131 | (6) |
|
|
|
137 | (3) |
|
|
|
140 | (1) |
|
|
|
141 | (2) |
|
7 The Strategy and Surrogate Patterns |
|
|
143 | (24) |
|
|
|
143 | (1) |
|
|
|
144 | (20) |
|
7.2.1 Fortran Implementation |
|
|
146 | (9) |
|
|
|
155 | (9) |
|
|
|
164 | (1) |
|
|
|
164 | (3) |
|
|
|
167 | (35) |
|
|
|
167 | (2) |
|
|
|
169 | (30) |
|
8.2.1 Fortran Implementation |
|
|
170 | (15) |
|
8.2.2 A C++ Tool: 2D Allocatable Arrays |
|
|
185 | (6) |
|
|
|
191 | (8) |
|
|
|
199 | (2) |
|
|
|
201 | (1) |
|
|
|
202 | (27) |
|
|
|
202 | (1) |
|
|
|
203 | (23) |
|
9.2.1 Fortran Implementation |
|
|
205 | (11) |
|
|
|
216 | (10) |
|
|
|
226 | (1) |
|
|
|
227 | (2) |
| Part III Gumbo SOOP |
|
229 | (106) |
|
|
|
231 | (20) |
|
|
|
231 | (2) |
|
|
|
233 | (4) |
|
10.3 Side Effects in Abstract Calculus |
|
|
237 | (1) |
|
10.4 Formal Specification |
|
|
238 | (6) |
|
10.4.1 Modeling Arrays with OCL |
|
|
238 | (1) |
|
|
|
239 | (3) |
|
|
|
242 | (2) |
|
|
|
244 | (1) |
|
10.6 An Assertion Utility for Fortran |
|
|
245 | (2) |
|
10.7 Case Study: A Fluid Turbulence Solver |
|
|
247 | (4) |
|
11 Mixed-Language Programming |
|
|
251 | (34) |
|
11.1 Automated Interoperability Tools |
|
|
251 | (3) |
|
11.2 Manual Interoperability: C++/Fortran 95 |
|
|
254 | (5) |
|
11.3 Case Study: ForTrilinos and CTrilinos |
|
|
259 | (26) |
|
11.3.1 C Interoperability in Fortran 2003 |
|
|
261 | (8) |
|
|
|
269 | (4) |
|
11.3.3 Tabulation, Construction, and Destruction |
|
|
273 | (5) |
|
11.3.4 Polymorphism and Hierarchy Mirroring |
|
|
278 | (3) |
|
|
|
281 | (4) |
|
12 Multiphysics Architectures |
|
|
285 | (50) |
|
12.1 Toward a Scalable Abstract Calculus |
|
|
285 | (32) |
|
12.1.1 Amdahl's Law and Parallel Efficiency |
|
|
286 | (6) |
|
12.1.2 Automatic Parallelization: Compiler Technology |
|
|
292 | (3) |
|
12.1.3 Directive-Based Parallelization: OpenMP |
|
|
295 | (2) |
|
12.1.4 Library-Based Parallelization: ForTrilinos and MPI |
|
|
297 | (12) |
|
12.1.5 Intrinsic Parallelization: Fortran 2008 Coarrays |
|
|
309 | (8) |
|
12.2 Case Studies: Multiphysics Modeling |
|
|
317 | (13) |
|
12.2.1 Quantum Turbulence in Superfluid Liquid Helium |
|
|
318 | (2) |
|
12.2.2 Lattice-Boltzman Biofluid Dynamics |
|
|
320 | (5) |
|
12.2.3 Particle Dispersion in Magnetohydrodynamics |
|
|
325 | (1) |
|
12.2.4 Radar Scattering in the Atmospheric Boundary Layer |
|
|
326 | (4) |
|
12.3 The Morfeus Framework |
|
|
330 | (5) |
| Appendix A Mathematical Background |
|
335 | (22) |
|
|
|
335 | (2) |
|
A.1.1 Lagrange Interpolation |
|
|
335 | (2) |
|
|
|
337 | (6) |
|
A.2.1 Gaussian Elimination |
|
|
337 | (5) |
|
|
|
342 | (1) |
|
|
|
343 | (2) |
|
A.3.1 Newton's Method in 1D |
|
|
343 | (1) |
|
A.3.2 Newton's Method in Multiple Dimensions |
|
|
344 | (1) |
|
A.4 Partial Differential Equations |
|
|
345 | (2) |
|
|
|
345 | (1) |
|
A.4.2 The Burgers Equation |
|
|
346 | (1) |
|
|
|
347 | (10) |
|
|
|
347 | (3) |
|
A.5.2 Numerical Methods for Differential Equations |
|
|
350 | (7) |
| Appendix B Unified Modeling Language Elements |
|
357 | (16) |
|
|
|
357 | (2) |
|
|
|
359 | (7) |
|
|
|
359 | (3) |
|
|
|
362 | (4) |
|
|
|
366 | (1) |
|
|
|
367 | (3) |
|
B.4.1 Interactions and Messages |
|
|
368 | (1) |
|
|
|
368 | (2) |
|
B.5 The Object Constraint Language |
|
|
370 | (3) |
|
B.5.1 The Context of OCL Expression |
|
|
370 | (1) |
|
|
|
371 | (1) |
|
B.5.3 Specifying Object Invariants |
|
|
371 | (1) |
|
B.5.4 Adding Pre- and Postconditions to Operations |
|
|
371 | (2) |
| Bibliography |
|
373 | (6) |
| Index |
|
379 | |