Abstract
In the traditional programming paradigm, data structures and algorithms are developed for specific data types and requirements. This leads to code redundancy and inflexibility, thus not allowing effective code reuse for similar applications. One effective approach to increase code reuse is generic programming, which focuses on the development of efficient, reusable software libraries through suitable abstractions for the common requirements. In this paper, we present how we applied generic programming to an ongoing effort for mesh-based adaptive simulations on massively parallel computers. Three generic components, iterator, set and tag, were developed using design pattern, C++ template programming and the standard template library. The scaling studies on petascale supercomputers demonstrate the efficiency of the reusable, generic components which do not sacrifice the performance of the previous tools developed in the traditional object-oriented programming paradigm.
Similar content being viewed by others
Notes
In this paper, entity dimension and entity type are interchangeable terms.
The notation [first, last) refers to all the iterators from first up to, but not including, last [35].
Abbreviations
- V :
-
The model, \(V\,\in\,\{ G, \,P, \,M \}\) where G signifies the geometric model, P signifies the partition model, and M signifies the mesh model
- V d i :
-
The ith entity of dimension d in model V. d = 0 for a vertex, d = 1 for an edge, d = 2 for a face, and d = 3 for a region
- P i :
-
The ith part in a distributed mesh
References
Austern MH (1999) Generic programming and the STL: using and extending the C++ standard template library, 1 edn. Addison-Wesley, Reading
Alexandrescu A (2001) Modern C++ design: generic programming and design patterns applied, 1st edn. Addison-Wesley, Reading
Musser DR, Derge GJ, Saini A (2001) STL tutorial and reference guide: C++ programming with the standard template library, 2nd edn. Addison-Wesley, Boston
Stroustrup B (1997) The C++ programming language, 3rd edn. Addison-Wesley, Reading
Siek JG, Lumsdaine A (1999) The matrix template library: generic components for high-performance scientific computing. Comput Sci Eng 1(6):70–71
Lee L-Q, Lumsdaine A (2003) The generic message passing framework. In: Proceedings of the 2003 international parallel distributed processing symposium, Apr 2003
Berti G (2001) A generic toolbox for the grid craftsman. In: Proceedings of the 17th GAMM seminar construction of grid generation algorithms. http://www.mis.mpg.de/conferences/gamm/2001
Berti G (2006) GrAL-the grid algorithms library. Fut Gener Comput Syst 22(1–2):110–122
Fabri A, Giezeman G-J, Kettner L, Schirra S, Schönherr S (2000) On the design of CGAL a computational geometry algorithms library. Softw Pract Exper 30(11):1167–1202
Bastian P, Blatt M, Dedner A, Engwer C, Klöfkorn R, Ohlberger M, Sander O (2008) A generic grid interface for parallel and adaptive scientific computing. Part I: abstract framework. Computing 82(2):103–119
Bastian P, Blatt M, Dedner A, Engwer C, Klöfkorn R, Kornhuber R, Ohlberger M, Sander O (2008) A generic grid interface for parallel and adaptive scientific computing. Part II: implementation and tests in DUNE. Computing 82(2):121–138
Cirak F, Cummings JC (2008) Generic programming techniques for parallelizing and extending procedural finite element programs. Eng Comput 24(1):1–16
Beall MW, Shephard MS (1999) An object-oriented framework for reliable numerical simulations. Eng Comput 15:61–72
Shephard MS, Beall MW, O’Bara RM, Webster BE (2004) Toward simulation-based design. Finite Elem Anal Des 40(12):1575–1598
Simmetrix Inc. (2012) The simulation modeling suite (Online). http://www.simmetrix.com/. Accessed 5 April 2012
Department of Energy’s Scientific Discovery through Advanced Computing (SciDAC) (2010) Interoperable Technologies for Advanced Petascale Simulations (ITAPS) (Online). http://www.itaps.org/. Accessed 5 April 2012
Chand KK, Diachin LF, Li X, Ollivier-Gooch C, Seol ES, Shephard MS, Tautges T, Trease H (2007) Toward interoperable mesh, geometry and field components for PDE simulation development. Eng Comput 24(2):165–182
Ollivier-Gooch C, Diachin L, Shephard MS, Tautges T, Kraftcheck J, Leung V, Luo X, Miller M (2010) An interoperable, data-structure-neutral component for mesh query and manipulation. ACM Trans Math Softw 37(3):29:1–29
Weiler KJ (1988) The radial-edge structure: a topological representation for non-manifold geometric boundary representations. Geom Model CAD Appl, 3–36
Shephard MS, Georges MK (1992) Reliability of automatic 3D mesh generation. Comput Meth Appl Mech Eng 101(1–3):443–462
Li X, Shephard MS, Beall MW (2003) Accounting for curved domains in mesh adaptation. Int J Numer Meth Eng 58(2):247–276
Beall MW, Walsh J, Shephard MS (2003) Accessing CAD geometry for mesh generation. In: 12th international meshing roundtable. Sandia National Laboratories, pp 33–42, SAND-2003-3030P
Tautges TJ, Meyers R, Merkley K, Stimpson C, Ernst C (2004) MOAB: a mesh-oriented database. Technical report, Sandia
Interoperable Technologies for Advanced Petascale Simulations (ITAPS) Center (2010) The ITAPS iMesh interface documentation (Online). http://www.itaps.org/software/iMesh_html/index.html/. Accessed 5 April 2012
Beall MW, Shephard MS (1997) A general topology-based mesh data structure. Int J Numer Meth Eng 40(9):1573–1596
Remacle J-F, Shephard MS (2003) An algorithm oriented mesh database. Int J Numer Meth Eng 58(2):349–374
Seol ES (2005) FMDB: flexible distributed mesh database for parallel automated adaptive analysis. PhD dissertation, Rensselaer Polytechnic Institute, Department of Computer Science
Seol ES, MS Shephard (2006) Efficient distributed mesh data structure for parallel automated adaptive analysis. Eng Comput 22(3–4):197–213
Teresco JD, Devine KD, Flaherty JE (2006) Partitioning and dynamic load balancing for the numerical solution of partial differential equations. In: Bruaset AM, Tveito A (eds) Numerical solution of partial differential equations on parallel computers. Lecture notes in computational science and engineering, vol 51. Springer, Berlin, pp 55–88
Zhou M, Sahni O, Devine KD, Shephard MS, Jansen KE (2010) Controlling unstructured mesh partitions for massively parallel simulations. SIAM J Sci Comput 32:3201–3227
Simon HD (1991) Partitioning of unstructured problems for parallel processing. Comput Syst Eng 2(2–3):135–148
Devine KD, Boman EG, Heaphy RT, Hendrickson BA, Teresco JD, Faik J, Flaherty JE, Gervasio LG (2005) New challenges in dynamic load balancing. Appl Numer Math 52(2–3):133–152
Devine KD, Boman EG, Heaphy RT, Bisseling RH, Catalyurek UV (2006) Parallel hypergraph partitioning for scientific computing. In: Proceedings of the 20th international parallel distributed processing symposium. IPDPS’06. IEEE Computer Society, Washington, DC, p 124
Alauzet F, Li X, Seol ES, Shephard MS (2006) Parallel anisotropic 3D mesh adaptation by mesh modification. Eng Comput 21(3):247–258
Silicon Graphics International (SGI) (2011) Standard template library programmer’s guide (Online). http://www.sgi.com/tech/stl/. Accessed 5 Apr 2012
Gamma E, Helm R, Johnson R, Vlissides J (1994) Design patterns: elements of reusable object-oriented software, 1 edn. Addison-Wesley, Reading
Sahni O, Jansen KE, Shephard MS, Taylor CA, Beall MW (2008) Adaptive boundary layer meshing for viscous flow simulations. Eng Comput 24(3):267–285
Scientific Computation Research Center (2012) (SCOREC. Flexible distributed mesh database user’s guide (Online). http://scorec.rpi.edu/FMDB/documentation.html/. Accessed 5 Apr 2012
Scientific Computation Research Center (SCOREC) at Rensselaer Polytechnic Institute (2012) Simulation model and data management components (Online). http://www.scorec.rpi.edu/software.php/. Accessed 5 Apr 2012
Remacle J-F, Klaas O, Flaherty JE, Shephard MS (2002) Parallel algorithm oriented mesh database. Eng Comput 18(3):274–284
Ovcharenko A, Chitale K, Sahni O, Jansen KE, Shephard MS (2012) Parallel anisotropic mesh adaptation with boundary layers. Int J Numer Meth Eng (unpublished)
Li X, Shephard MS, Beall MW (2005) 3D anisotropic mesh adaptation by mesh modification. Comput Meth Appl Mech Eng 194(48–49):4915–4950
Zhou M, Xie T, Seol S, Shephard MS, Sahni O, Jansen KE (2011) Tools to support mesh adaptation on massively parallel computers. Eng Comput, 1–15
Argonne Leadership Computing Facility, Argonne National Laboratory (2012) Intrepid/challenger/surveyor guide (Online). http://www.alcf.anl.gov/resource-guides/intrepid-and-surveyor-guide/. Accessed 5 Apr 2012
The Boost community (2007) The boost C++ libraries (Online). http://www.boost.org/. Accessed 5 Apr 2012
Acknowledgments
We gratefully acknowledge the support of this work by the Department of Energy (DOE) office of Science’s Scientific Discovery through Advanced Computing (SciDAC) Institute as part of the Interoperable Technologies for Advanced Petascale Simulations (ITAPS) program, under grant DE-FC02-06ER25769.
Author information
Authors and Affiliations
Corresponding author
Rights and permissions
About this article
Cite this article
Xie, T., Seol, S. & Shephard, M.S. Generic components for petascale adaptive unstructured mesh-based simulations. Engineering with Computers 30, 79–95 (2014). https://doi.org/10.1007/s00366-012-0288-4
Received:
Accepted:
Published:
Issue Date:
DOI: https://doi.org/10.1007/s00366-012-0288-4