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

Laura I. Cerviño, Thomas R. Bewley
2003 Journal of Computational Physics  
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
more » ... 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. Published by Elsevier Science B.V.
doi:10.1016/s0021-9991(03)00123-2 fatcat:atgcnfp2t5cfzcsufgklkl66m4