NESSi
v1.0.2
The NonEquilibrium Systems Simulation Library
|
Computes the Fourier integral \(I(\omega) = \int^b_a dt\, e^{i \omega t}f(t)\) using cubically corrected DFT.
For a function \(f(t)\), represented on an equidistant grid \(t_j= j h\), \(j=0,\dots,n\), we would like to compute the Fourier integral \(I(\omega) = \int^b_a dt\, e^{i \omega t}f(t)\). Using piecewie cubic interpolation of \(f(t)\), the \(I(\omega)\) can be computed by by cubically corrected discrete Fourier transformation (DFT). The algorithm is explained in
W. H. Press, S. A. Teukolosky, W. T. Vetterling, B. P. Flannery, Numerical Recipes 3rd Edition: The Art of Scientific Computing, Cambridge University Press, 2007, chapter 13.9
dft_cplx
computes the integral \(I(\omega)\), using the cubic correction factor and boundary correction terms computed bycomplex_dftcor_cubic
. Furthermore, an approximate error is returned, given the difference usingn
and(n+1)/2
points.
w |
|
n |
|
a |
|
b |
|
f |
|
res |
|
err |
|
Definition at line 283 of file fourier.cpp.
References complex_dftcor_cubic().
Referenced by fourier::adft_func::dft(), and fourier::adft_func::sample().