skip to main content
OSTI.GOV title logo U.S. Department of Energy
Office of Scientific and Technical Information

Title: Automatic differentiation of C++ codes for large-scale scientific computing.

Conference ·
OSTI ID:943906

We discuss computing first derivatives for models based on elements, such as large-scale finite-element PDE discretizations, implemented in the C++ programming language.We use a hybrid technique of automatic differentiation (AD) and manual assembly, with local element-level derivatives computed via AD and manually summed into the global derivative. C++ templating and operator overloading work well for both forward- and reverse-mode derivative computations. We found that AD derivative computations compared favorably in time to finite differencing for a scalable finite-element discretization of a convection-diffusion problem in two dimensions.

Research Organization:
Sandia National Laboratories (SNL), Albuquerque, NM, and Livermore, CA (United States)
Sponsoring Organization:
USDOE
DOE Contract Number:
AC04-94AL85000
OSTI ID:
943906
Report Number(s):
SAND2006-0902C; TRN: US200902%%363
Resource Relation:
Conference: Proposed for presentation at the Third International Workshop on Automatic Differentiation: Tools and Application at ICCS 2006 held May 28-31, 2006 in Reading, UK.
Country of Publication:
United States
Language:
English