Skip to main content
Log in

Generic programming techniques for parallelizing and extending procedural finite element programs

  • Original Article
  • Published:
Engineering with Computers Aims and scope Submit manuscript

Abstract

We outline an approach for extending procedural finite-element software components using generic programming. A layer of generic software components consisting of C++ containers and algorithms is used for parallelization of the finite-element solver and for solver coupling in multi-physics applications. The advantages of generic programming in connection with finite-element codes are discussed and compared with those of object-oriented programming. The use of the proposed generic programming techniques is demonstrated in a tutorial fashion through basic illustrative examples as well as code excerpts from a large-scale finite-element program for serial and parallel computing platforms.

This is a preview of subscription content, log in via an institution to check access.

Access this article

Price excludes VAT (USA)
Tax calculation will be finalised during checkout.

Instant access to the full article PDF.

Fig. 1
Fig. 2
Fig. 3
Fig. 4
Fig. 5
Fig. 6
Fig. 7
Fig. 8

Similar content being viewed by others

Notes

  1. Public inheritance with virtual member functions in C++.

  2. If shared libraries are used, the framework user does not even need to create a new executable.

  3. One may, however, pre-instantiate a templated function or class with specific template arguments and compile such instantiations into a library. This can be helpful in cases where particular instantiations are commonly used.

  4. Note that in OOP, a pointer to a base class may contain the address of an object of a derived class. Consequently, the actual type of the object referred to by the pointer can be known only at run time.

  5. The keyword typename is used to clarify that the entity Compare qualified by the type parameter PT is itself a type.

  6. In order to avoid the successive memory reallocations during the collection process with the STL vector container, one can use the reserve method.

  7. The axis-aligned bounding box of a subdomain is the smallest rectangular box with sides parallel to the x, y, and z axes that encloses the subdomain.

References

  1. Schroeder W, Martin K, Lorensen B (1998) The visualization toolkit—an object-oriented approach to 3D graphics, 2nd edn. Prentice Hall, Englewood Cliffs

  2. Mackie RI (1992) Object oriented programming of the finite-element method. Int J Numer Method Eng 35(2):425–436

    Article  MATH  Google Scholar 

  3. Stroustrup B (1997) The C++ programming language, 3rd edn. Addison-Wesley, Reading

    Google Scholar 

  4. Josuttis NM (1999) The C++ standard library: a tutorial and reference. Addison-Wesley, Reading

    Google Scholar 

  5. http://www.boost.org/

  6. Karlsson B (2005) Beyond the C++ standard library—an introduction to boost. Addison-Wesley, Reading

  7. Fabri A, Giezeman GJ, Kettner L, Schirra S, Schönherr S (2000) On the design of cgal, a computational geometry algorithms library. Softw-Pract Exp 30:1167–1202

    Article  MATH  Google Scholar 

  8. Veldhuizen T Blitz++. http://www.oonumerics.org/blitz/

  9. Renard Y, Pommier J Getfem++. http://www.gmm.insa-toulouse.fr/getfem/

  10. Cirak F, Ortiz M, Schröder P (2000) Subdivision surfaces: a new paradigm for thin-shell finite-element analysis. Int J Numer Method Eng 47(12):2039–2072

    Article  MATH  Google Scholar 

  11. JF Remacle, Shephard MS (2003) An algorithm oriented mesh database. Int J Numer Method Eng 58(2):349–374

    Article  Google Scholar 

  12. Lakos J (1996) Large-scale C++ software design. Addison-Wesley, Reading

    Google Scholar 

  13. Gamma E, Helm R, Johnson R, Vlissides J (1995) Design patterns: elements of reusable object-oriented software. Addison-Wesley, Reading

    Google Scholar 

  14. Vandevoorde D, Josuttis NM (2002) C++ templates: the complete guide. Addison-Wesley, Reading

    Google Scholar 

  15. Austern MH(1998) Generic programming and the STL. Addison-Wesley, Reading

    Google Scholar 

  16. Alexandrescu A (2001) Modern C++ design: generic programming and design patterns applied. Addison-Wesley, Reading

    Google Scholar 

  17. Heinstein MW, Mello FJ, Attaway SW, Laursen TA (2000) Contact-impact modeling in explicit transient dynamics. Comput Method Appl Mech Eng 187:621–640

    Article  MATH  Google Scholar 

  18. Cirak F, West M (2005) Decomposition-based contact response (dcr) for explicit finite element dynamics. Int J Numer Method Eng 64:1078–1110

    Article  MATH  MathSciNet  Google Scholar 

  19. Mauch SP (2003) Efficient algorithms for solving static Hamilton–Jacobi equations. PhD thesis, California Institute of Technology, Pasadena

  20. Myers NC (1995) Traits: a new and useful template technique. C++ Report, June 1995

  21. Veldhuizen T (1995) Using C++ template metaprograms. C++ report, May 1995

  22. Veldhuizen T (1995) Expression templates. C++ report, June 1995

  23. Quarteroni A, Valli A (1999) Domain decomposition methods for partial differential equations. Oxford University Press, Oxford

    MATH  Google Scholar 

  24. Cirak F, Ortiz M (2001) Fully c 1-conforming subdivision elements for finite deformation thin-shell analysis. Int J Numer Method Eng 51(7):813–833

    Article  MATH  Google Scholar 

  25. Cirak F, Ortiz M, Pandolfi A (2005) A cohesive approach to thin-shell fracture and fragmentation. Comput Method Appl Mech Eng 194:2604–2618

    Article  MATH  Google Scholar 

  26. Berger MJ, Bokhari SH (1987) A partitioning strategy for nonuniform problems on multiprocessors. IEEE Trans Comput 36:570–580

    Article  Google Scholar 

  27. Hendrickson B, Devine K (2000) Dynamic load balancing in computational mechanics. Comput Method Appl Mech Eng 184:485–500

    Article  MATH  Google Scholar 

  28. Stewart JR, Edwards HC (2004) A framework approach for developing parallel adaptive multiphysics applications. Finite Elem Anal Des 40:1599–1617

    Article  Google Scholar 

  29. Beall MW, Shephard MS (1999) An object-oriented framework for reliable numerical simulations. Eng Comput 15:61–72

    Article  Google Scholar 

  30. Cuitino A, Ortiz M (1992) A material-independent method for extending stress update algorithms from small-strain plasticity to finite plasticity with multiplicative kinematics. Eng Comput 9:437–451

    Google Scholar 

  31. Deiterding R (2003) Parallel adaptive simulation of multi-dimensional detonation structures. PhD thesis, Brandenburgische Technische Universität Cottbus, September

  32. Cirak F, Radovitzky R (2005) A lagrangian-eulerian shell-fluid coupling algorithm based on level sets. Comput Struct 83:491–498

    Article  Google Scholar 

  33. Cirak F, Deiterding R, Mauch SP (2006) Large-scale fluid-structure interaction simulation of viscoplastic, and fracturing thin-shells subjected to shocks and detonations. Comput Struct (in press)

  34. Deiterding R, Radovitzky R, Mauch SP, Noels L, Cummings JC, Meiron DI (2006) A virtual test facility for the efficient simulation of solid material response under strong shock and detonation wave loading. Eng Comput 22:325–347

    Article  Google Scholar 

Download references

Acknowledgments

The support of DoE through Caltech’s ASCI Center is gratefully acknowledged (DOE W-7405-ENG-48, B523297).

Author information

Authors and Affiliations

Authors

Corresponding author

Correspondence to Fehmi Cirak.

Rights and permissions

Reprints and permissions

About this article

Cite this article

Cirak, F., Cummings, J.C. Generic programming techniques for parallelizing and extending procedural finite element programs. Engineering with Computers 24, 1–16 (2008). https://doi.org/10.1007/s00366-007-0058-x

Download citation

  • Received:

  • Accepted:

  • Published:

  • Issue Date:

  • DOI: https://doi.org/10.1007/s00366-007-0058-x

Keywords

Navigation