skip to main content
research-article

Hybrid differentiation strategies for simulation and analysis of applications in C++

Published: 25 July 2008 Publication History

Abstract

Computationally efficient and accurate derivatives are important to the success of many different types of numerical methods. Automatic differentation (AD) approaches compute truncation-free derivatives and can be efficient in many cases. Although present AD tools can provide a convenient implementation mechanism, the computational efficiency rarely compares to analytically derived versions that have been carefully implemented. The focus of this work is to combine the strength of these methods into a hybrid strategy that attempts to achieve an optimal balance of implementation and computational efficiency by selecting the appropriate components of the target algorithms for AD and analytical derivation. Although several AD approaches can be considered, our focus is on the use of template overloading forward AD tools in C++ applications. We demonstrate this hybrid strategy for a system of partial differential equations in gas dynamics. These methods apply however to other systems of differentiable equations, including DAEs and ODEs.

References

[1]
Beda, L. M., Korolev, L. N., Sukkikh, N. V., and Frolova, T. S. 1959. Programs for automatic differentiation for the machine BESM. Tech. rep., Institute for Precise Mechanics and Computation Techniques, Academy of Science.
[2]
Bischof, C., Carle, A., Corliss, G., Griewank, A., and Hovland, P. 1992. ADIFOR—generating derivative codes from Fortran programs. Scientific Program. 1, 1--29.
[3]
Bischof, C. H., Roh, L., and Mauer, A. 1997. ADIC—An extensible automatic differentiation tool for ANSI-C. Softw.--Pract. Experi. 27, 12, 1427--1456.
[4]
Blazek, J. 2001. Computational Fluid Dynamics: Principles and Applications. Elsevier.
[5]
Cesare, N. and Pironneau, O. 2000. Flow control problem using automatic differentiation in C++. Tech. rep., LAN-UPMC report 99013. Unversite Pierre et Marie Curie.
[6]
Courty, F., Dervieux, A., Koobus, B., and Hascoet, L. 2003. Reverse automatic differentiation for optimum design: from adjoint state assembly to gradient computation. Optimiz. Meth. Softw. 18, 5, 615--627.
[7]
Faure, C. 2005. An auomatic differentiation platform: Odyssee. Future Gener. Comput. Syst. 21, 8, 1391--1400.
[8]
Giering, R. and Kaminski, T. 1998. Recipies for adjoint code construction. ACM Trans. Math. Softw. 24, 4, 437--474.
[9]
Goedecker, S. and Hoisie, A. 2001. Performance Optimization of Numerically Intensive Codes. SIAM.
[10]
Griewank, A. 2000. Evaluating Derivatives: Principles and Techniques of Algorithmic Differentiation. SIAM.
[11]
Griewank, A., Juedes, D., and Utke, J. 1996. ADOL--C, a package for the automatic differentiation of algorithms written in C/C++. ACM Trans. Math. Softw. 22, 2, 131--167.
[12]
Hascoet, L. 2004. Tapenade: a tool for automatic differentiation of programs. In Proceedings of the 4th European Congress on Computational Methods in Applied Sciences and Engineering (ECCOMAS) 2. P. Neittaanm aki, T. Rossi, S. Korotov, E. Onate, J. Periaux, and D. Knorzer, Eds.
[13]
Linnainmaa, S. 1976. Taylor expansion of the accumulated rounding errror. BIT (Nordisk Tidskrift for Informationsbehandling) 16, 146--160.
[14]
Martins, J. R. R. A., Sturdza, P., and Alonso, J. J. 2003. The complex-step derivative approximation. ACM Trans. Math. Softw. 29, 3, 245--262.
[15]
Moore, R. 1979. Methods and Applications of Interval Analysis. SIAM.
[16]
Roe, P. 1981. Approximate Riemann solvers, parameter vectors, and difference schemes. J. Computat. Phy. 43, 357--372.
[17]
Speelpenning, B. 1980. Compiling fast partial derivatives of functions given by algorithms. Ph.D. thesis, Department of Computer Science, University of Illinois at Urbana-Champaign.
[18]
Squire, W. and Trapp, G. 1998. Using complex variables to estimate derivatives of real functions. SIAM Rev. 40, 1, 110--112.
[19]
van Albada, B., van Leer, G., and Jr., W. R. 1982. A comparative study of computational methods in cosmic gas dynamics. Astronomy Astrophys. 108, 76--84.
[20]
Vanden, K. and Orkwis, P. 1996. Comparison of numerical and analytical Jacobians. AIAA J. 34, 6, 1125--1129.
[21]
Wengert, R. E. 1964. A simple automatic derivative evaluation program. Comm. ACM 7, 8, 463--464.

Cited By

View all
  • (2014)MDO for Hypersonic Scramjet Vehicle Development (Invited)19th AIAA International Space Planes and Hypersonic Systems and Technologies Conference10.2514/6.2014-3111Online publication date: 13-Jun-2014
  • (2013)Automatic solver for non‐linear partial differential equations with implicit local laws: Application to unilateral contactInternational Journal for Numerical Methods in Engineering10.1002/nme.448394:9(850-867)Online publication date: 24-Apr-2013

Recommendations

Comments

Information & Contributors

Information

Published In

cover image ACM Transactions on Mathematical Software
ACM Transactions on Mathematical Software  Volume 35, Issue 1
July 2008
136 pages
ISSN:0098-3500
EISSN:1557-7295
DOI:10.1145/1377603
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: 25 July 2008
Accepted: 01 July 2007
Revised: 01 April 2007
Received: 01 May 2006
Published in TOMS Volume 35, Issue 1

Permissions

Request permissions for this article.

Check for updates

Author Tags

  1. Euler equations
  2. Hybrid differentiation methods
  3. automatic differentiation
  4. finite volume methods
  5. template overloading

Qualifiers

  • Research-article
  • Research
  • Refereed

Funding Sources

Contributors

Other Metrics

Bibliometrics & Citations

Bibliometrics

Article Metrics

  • Downloads (Last 12 months)0
  • Downloads (Last 6 weeks)0
Reflects downloads up to 08 Mar 2025

Other Metrics

Citations

Cited By

View all
  • (2014)MDO for Hypersonic Scramjet Vehicle Development (Invited)19th AIAA International Space Planes and Hypersonic Systems and Technologies Conference10.2514/6.2014-3111Online publication date: 13-Jun-2014
  • (2013)Automatic solver for non‐linear partial differential equations with implicit local laws: Application to unilateral contactInternational Journal for Numerical Methods in Engineering10.1002/nme.448394:9(850-867)Online publication date: 24-Apr-2013

View Options

Login options

Full Access

View options

PDF

View or Download as a PDF file.

PDF

eReader

View online with eReader.

eReader

Figures

Tables

Media

Share

Share

Share this Publication link

Share on social media