NESSi  v1.0.2
The NonEquilibrium Systems Simulation Library

◆ dft()

void fourier::adft_func::dft ( double  w,
cplx &  result,
cplx &  err 
)
inline

Computes the cubically corrected DFT.

Purpose

Computes the cubically corrected DFT by integrating over the individual intervals.

Parameters
w

frequency \(\omega\) in the Fourier integral

result

value of the Fourier integral

err

estimate of the error

Definition at line 317 of file fourier.hpp.

References fourier::dft_cplx().

Referenced by cntr::green_equilibrium_mat(), and cntr::smooth_box::set_norm().

317  {
318  int i,n_i;
319  double a,b;
320  cplx res_i,err_i,*f_i;
321  if(n_<=0) {std::cerr << "adft_cplx: no interval in f" << std::endl; abort();}
322  result=0;
323  err=0;
324 
325  for(i=0;i<n_;i++){
326  f_i=interval_data(i);
327  a=a_[i];
328  b=b_[i];
329  n_i=len_[i];
330  fourier::dft_cplx(w,n_i,a,b,f_i,res_i,err_i);
331  result += res_i;
332  err += err_i;
333  }
334  }
std::complex< double > cplx
Definition: fourier.hpp:44
void dft_cplx(double w, int n, double a, double b, cplx *f, cplx &res, cplx &err)
Computes the Fourier integral using cubically corrected DFT.
Definition: fourier.cpp:283
+ Here is the call graph for this function:
+ Here is the caller graph for this function: