On the extension of the complex-step derivative technique to pseudospectral algorithms

  • Authors:
  • Laura I. Cerviño;Thomas R. Bewley

  • Affiliations:
  • Department of MAE, University of California at San Diego, 9500 Gilman Avenue, La Jolla, CA;Department of MAE, University of California at San Diego, 9500 Gilman Avenue, La Jolla, CA

  • Venue:
  • Journal of Computational Physics
  • Year:
  • 2003

Quantified Score

Hi-index 31.45

Visualization

Abstract

The complex-step derivative (CSD) technique is a convenient and highly accurate strategy to perform a linearized "perturbation" analysis to determine a "directional derivative" via a minor modification of an existing nonlinear simulation code. The technique has previously been applied to nonlinear simulation codes (such as finite-element codes) which employ real arithmetic only. The present note examines the suitability of this technique for extension to efficient pseudospectral simulation codes which nominally use the fast Fourier transform (FFT) to convert back and forth between the physical and transformed representations of the system. It is found that, if used carefully, this extension retains the remarkable accuracy of the CSD approach. However, to perform this extension without sacrificing this accuracy, particular care must be exercised; specifically, the state (real) and perturbation (imaginary) components of the complexified system must be transformed separately and arranged in such a manner that they are kept distinct during the process of differentiation in the transformed space in order to avoid the linear combination of the large and small quantities in the analysis. It is shown that this is relatively straightforward to implement even in complicated nonlinear simulation codes, thus positioning the CSD approach as an attractive and relatively simple alternative to hand coding a perturbation (a.k.a. "tangent linear") code for determining the directional derivative even when pseudospectral algorithms are employed.