NFFT 3.6.0
Functions | Variables
mpolar_fft_test
Collaboration diagram for mpolar_fft_test:

Functions

static int mpolar_grid (int T, int S, NFFT_R *x, NFFT_R *w)
 Generates the points $x_{t,j}$ with weights $w_{t,j}$ for the modified polar grid with $T$ angles and $R$ offsets.
 
static int mpolar_dft (NFFT_C *f_hat, int NN, NFFT_C *f, int T, int S, int m)
 discrete mpolar FFT
 
static int mpolar_fft (NFFT_C *f_hat, int NN, NFFT_C *f, int T, int S, int m)
 NFFT-based mpolar FFT.
 
static int inverse_mpolar_fft (NFFT_C *f, int T, int S, NFFT_C *f_hat, int NN, int max_i, int m)
 inverse NFFT-based mpolar FFT
 
static int comparison_fft (FILE *fp, int N, int T, int S)
 Comparison of the FFTW, mpolar FFT, and inverse mpolar FFT.
 
int main (int argc, char **argv)
 test program for various parameters
 

Variables

NFFT_R GLOBAL_elapsed_time
 

Detailed Description

Function Documentation

◆ mpolar_grid()

static int mpolar_grid ( int  T,
int  S,
NFFT_R *  x,
NFFT_R *  w 
)
static

Generates the points $x_{t,j}$ with weights $w_{t,j}$ for the modified polar grid with $T$ angles and $R$ offsets.

We add more concentric circles to the polar grid and exclude those nodes not located in the unit square, i.e.,

\[
  x_{t,j} := r_j\left(\cos\theta_t, \sin\theta_t\right)^{\top}\,,\qquad
  (j,t)^{\top}\in I_{\sqrt{2}R}\times I_T\,.
\]

with $r_j$ and $\theta_t$ as for the polar grid. The number of nodes for the modified polar grid can be estimated as $M \approx \frac{4}{\pi}\log(1+\sqrt{2}) T R$.

Definition at line 58 of file mpolar_fft_test.c.

Referenced by inverse_mpolar_fft(), main(), mpolar_dft(), and mpolar_fft().

◆ mpolar_dft()

static int mpolar_dft ( NFFT_C *  f_hat,
int  NN,
NFFT_C *  f,
int  T,
int  S,
int  m 
)
static

discrete mpolar FFT

Definition at line 102 of file mpolar_fft_test.c.

References FFTW_INIT, MALLOC_F, MALLOC_F_HAT, MALLOC_X, mpolar_grid(), PRE_PHI_HUT, and PRE_PSI.

Referenced by comparison_fft(), and main().

◆ mpolar_fft()

static int mpolar_fft ( NFFT_C *  f_hat,
int  NN,
NFFT_C *  f,
int  T,
int  S,
int  m 
)
static

NFFT-based mpolar FFT.

Definition at line 164 of file mpolar_fft_test.c.

References FFT_OUT_OF_PLACE, FFTW_INIT, MALLOC_F, MALLOC_F_HAT, MALLOC_X, mpolar_grid(), PRE_FULL_PSI, PRE_LIN_PSI, PRE_PHI_HUT, and PRE_PSI.

Referenced by comparison_fft(), and main().

◆ inverse_mpolar_fft()

static int inverse_mpolar_fft ( NFFT_C *  f,
int  T,
int  S,
NFFT_C *  f_hat,
int  NN,
int  max_i,
int  m 
)
static

◆ comparison_fft()

static int comparison_fft ( FILE *  fp,
int  N,
int  T,
int  S 
)
static

Comparison of the FFTW, mpolar FFT, and inverse mpolar FFT.

Definition at line 347 of file mpolar_fft_test.c.

References inverse_mpolar_fft(), mpolar_dft(), and mpolar_fft().

Referenced by main().

◆ main()

int main ( int  argc,
char **  argv 
)

test program for various parameters

Definition at line 412 of file mpolar_fft_test.c.

References comparison_fft(), inverse_mpolar_fft(), max_i(), mpolar_dft(), mpolar_fft(), and mpolar_grid().

Variable Documentation

◆ GLOBAL_elapsed_time

NFFT_R GLOBAL_elapsed_time

Definition at line 43 of file mpolar_fft_test.c.