NFFT Logo 3.0 API Reference
Main Page | Modules | Data Structures | Directories | File List | Data Fields | Globals

Fast Gauss transfrom with complex parameter
[Applications]


Data Structures

struct  fgt_plan
 Structure for the Gauss transform. More...

Defines

#define DGT_PRE_CEXP   (1U<< 0)
 If this flag is set, the whole matrix is precomputed and stored for the discrete Gauss transfrom.
#define FGT_NDFT   (1U<< 1)
 If this flag is set, the fast Gauss transform uses the discrete instead of the fast Fourier transform.
#define FGT_APPROX_B   (1U<< 2)
 If this flag is set, the discrete Fourier coefficients of the uniformly sampled Gaussian are used instead of the sampled continuous Fourier transform.

Functions

void dgt_trafo (fgt_plan *ths)
 Executes the discrete Gauss transform.
void fgt_trafo (fgt_plan *ths)
 Executes the fast Gauss transform.
void fgt_init_guru (fgt_plan *ths, int N, int M, double complex sigma, int n, double p, int m, unsigned flags)
 Initialisation of a transform plan, guru.
void fgt_init (fgt_plan *ths, int N, int M, double complex sigma, double eps)
 Initialisation of a transform plan, simple.
void fgt_init_node_dependent (fgt_plan *ths)
 Initialisation of a transform plan, depends on source and target nodes.
void fgt_finalize (fgt_plan *ths)
 Destroys the transform plan.
void fgt_test_init_rand (fgt_plan *ths)
 Random initialisation of a fgt plan.
double fgt_test_measure_time (fgt_plan *ths, unsigned dgt)
 Compares execution times for the fast and discrete Gauss transform.
void fgt_test_simple (int N, int M, double complex sigma, double eps)
 Simple example that computes fast and discrete Gauss transforms.
void fgt_test_andersson ()
 Compares accuracy and execution time of the fast Gauss transform with increasing expansion degree.
void fgt_test_error ()
 Compares accuracy of the fast Gauss transform with increasing expansion degree.
void fgt_test_error_p ()
 Compares accuracy of the fast Gauss transform with increasing expansion degree and different periodisation lengths.
int main (int argc, char **argv)
 Different tests of the fast Gauss transform.

Define Documentation

#define DGT_PRE_CEXP   (1U<< 0)
 

If this flag is set, the whole matrix is precomputed and stored for the discrete Gauss transfrom.

See also:
fgt_init_node_dependent

fgt_init

Author:
Stefan Kunis

Definition at line 27 of file fastgauss.c.

Referenced by dgt_trafo(), fgt_init(), fgt_init_node_dependent(), and fgt_test_andersson().

#define FGT_NDFT   (1U<< 1)
 

If this flag is set, the fast Gauss transform uses the discrete instead of the fast Fourier transform.

See also:
fgt_init

ndft_trafo

nfft_trafo

Author:
Stefan Kunis

Definition at line 38 of file fastgauss.c.

Referenced by fgt_test_andersson(), and fgt_trafo().

#define FGT_APPROX_B   (1U<< 2)
 

If this flag is set, the discrete Fourier coefficients of the uniformly sampled Gaussian are used instead of the sampled continuous Fourier transform.

See also:
fgt_init
Author:
Stefan Kunis

Definition at line 48 of file fastgauss.c.

Referenced by fgt_init_guru().


Function Documentation

void dgt_trafo fgt_plan ths  ) 
 

Executes the discrete Gauss transform.

  • ths The pointer to a fgt plan
Author:
Stefan Kunis

Definition at line 86 of file fastgauss.c.

References fgt_plan::alpha, DGT_PRE_CEXP, fgt_plan::f, fgt_plan::flags, fgt_plan::M, fgt_plan::N, fgt_plan::pre_cexp, fgt_plan::sigma, fgt_plan::x, and fgt_plan::y.

Referenced by fgt_test_error(), fgt_test_error_p(), fgt_test_measure_time(), and fgt_test_simple().

void fgt_trafo fgt_plan ths  ) 
 

Executes the fast Gauss transform.

  • ths The pointer to a fgt plan
Author:
Stefan Kunis

Definition at line 111 of file fastgauss.c.

References fgt_plan::b, nfft_plan::f_hat, FGT_NDFT, fgt_plan::flags, fgt_plan::n, ndft_adjoint(), ndft_trafo(), nfft_adjoint(), nfft_trafo(), fgt_plan::nplan1, and fgt_plan::nplan2.

Referenced by fgt_test_error(), fgt_test_error_p(), fgt_test_measure_time(), and fgt_test_simple().

void fgt_init_guru fgt_plan ths,
int  N,
int  M,
double complex  sigma,
int  n,
double  p,
int  m,
unsigned  flags
 

Initialisation of a transform plan, guru.

  • ths The pointer to a fpt plan
  • N The number of source nodes
  • M The number of target nodes
  • sigma The parameter of the Gaussian
  • n The polynomial expansion degree
  • p the periodisation length, at least 1
  • m The spatial cut-off of the nfft
  • flags FGT flags to use
Author:
Stefan Kunis

Definition at line 149 of file fastgauss.c.

References fgt_plan::alpha, fgt_plan::b, nfft_plan::f, fgt_plan::f, nfft_plan::f_hat, FFTW_INIT, FGT_APPROX_B, fgt_plan::flags, fgt_plan::M, MALLOC_F_HAT, MALLOC_X, fgt_plan::n, fgt_plan::N, nfft_fftshift_complex(), nfft_init_guru(), nfft_next_power_of_2(), fgt_plan::nplan1, fgt_plan::nplan2, fgt_plan::p, PI, PRE_PHI_HUT, PRE_PSI, fgt_plan::sigma, fgt_plan::x, and fgt_plan::y.

Referenced by fgt_init(), fgt_test_andersson(), fgt_test_error(), and fgt_test_error_p().

void fgt_init fgt_plan ths,
int  N,
int  M,
double complex  sigma,
double  eps
 

Initialisation of a transform plan, simple.

  • ths The pointer to a fpt plan
  • N The number of source nodes
  • M The number of target nodes
  • sigma The parameter of the Gaussian
  • eps The target accuracy
Author:
Stefan Kunis

Definition at line 219 of file fastgauss.c.

References DGT_PRE_CEXP, fgt_init_guru(), and PI.

Referenced by fgt_test_simple().

void fgt_init_node_dependent fgt_plan ths  ) 
 

Initialisation of a transform plan, depends on source and target nodes.

  • ths The pointer to a fpt plan
    Author:
    Stefan Kunis

Definition at line 242 of file fastgauss.c.

References DGT_PRE_CEXP, fgt_plan::flags, fgt_plan::M, nfft_plan::M_total, fgt_plan::N, nfft_plan::nfft_flags, nfft_precompute_psi(), fgt_plan::nplan1, fgt_plan::nplan2, fgt_plan::p, fgt_plan::pre_cexp, PRE_PSI, fgt_plan::sigma, nfft_plan::x, fgt_plan::x, and fgt_plan::y.

Referenced by fgt_test_andersson(), fgt_test_error(), fgt_test_error_p(), and fgt_test_simple().

void fgt_finalize fgt_plan ths  ) 
 

Destroys the transform plan.

  • ths The pointer to the fgt plan
    Author:
    Stefan Kunis

Definition at line 274 of file fastgauss.c.

References fgt_plan::alpha, fgt_plan::b, fgt_plan::f, nfft_finalize(), fgt_plan::nplan1, fgt_plan::nplan2, fgt_plan::x, and fgt_plan::y.

Referenced by fgt_test_andersson(), fgt_test_error(), fgt_test_error_p(), and fgt_test_simple().

void fgt_test_init_rand fgt_plan ths  ) 
 

Random initialisation of a fgt plan.

  • ths The pointer to the fgt plan
    Author:
    Stefan Kunis

Definition at line 297 of file fastgauss.c.

References fgt_plan::alpha, fgt_plan::M, fgt_plan::N, fgt_plan::x, and fgt_plan::y.

Referenced by fgt_test_andersson(), fgt_test_error(), fgt_test_error_p(), and fgt_test_simple().

double fgt_test_measure_time fgt_plan ths,
unsigned  dgt
 

Compares execution times for the fast and discrete Gauss transform.

  • ths The pointer to the fgt plan
  • dgt If this parameter is set dgt_trafo is called as well
Author:
Stefan Kunis

Definition at line 320 of file fastgauss.c.

References dgt_trafo(), fgt_trafo(), and nfft_second().

Referenced by fgt_test_andersson().

void fgt_test_simple int  N,
int  M,
double complex  sigma,
double  eps
 

Simple example that computes fast and discrete Gauss transforms.

  • ths The pointer to the fgt plan
  • sigma The parameter of the Gaussian
  • eps The target accuracy
Author:
Stefan Kunis

Definition at line 357 of file fastgauss.c.

References fgt_plan::alpha, dgt_trafo(), fgt_plan::f, fgt_finalize(), fgt_init(), fgt_init_node_dependent(), fgt_test_init_rand(), fgt_trafo(), fgt_plan::M, fgt_plan::N, nfft_error_l_infty_1_complex(), NFFT_SWAP_complex, and nfft_vpr_complex().

Referenced by main().

void fgt_test_andersson  ) 
 

Compares accuracy and execution time of the fast Gauss transform with increasing expansion degree.

Similar to the test in F. Andersson and G. Beylkin. The fast Gauss transform with double complex parameters. J. Comput. Physics 203 (2005) 274-286

Author:
Stefan Kunis

Definition at line 392 of file fastgauss.c.

References fgt_plan::alpha, DGT_PRE_CEXP, fgt_plan::f, fgt_finalize(), fgt_init_guru(), fgt_init_node_dependent(), FGT_NDFT, fgt_test_init_rand(), fgt_test_measure_time(), fgt_plan::flags, fgt_plan::M, fgt_plan::N, nfft_error_l_infty_1_complex(), and NFFT_SWAP_complex.

Referenced by main().

void fgt_test_error  ) 
 

Compares accuracy of the fast Gauss transform with increasing expansion degree.

Author:
Stefan Kunis

Definition at line 463 of file fastgauss.c.

References fgt_plan::alpha, dgt_trafo(), fgt_plan::f, fgt_finalize(), fgt_init_guru(), fgt_init_node_dependent(), fgt_test_init_rand(), fgt_trafo(), fgt_plan::M, fgt_plan::N, nfft_error_l_infty_1_complex(), and NFFT_SWAP_complex.

Referenced by main().

void fgt_test_error_p  ) 
 

Compares accuracy of the fast Gauss transform with increasing expansion degree and different periodisation lengths.

Author:
Stefan Kunis

Definition at line 514 of file fastgauss.c.

References fgt_plan::alpha, dgt_trafo(), fgt_plan::f, fgt_finalize(), fgt_init_guru(), fgt_init_node_dependent(), fgt_test_init_rand(), fgt_trafo(), fgt_plan::M, fgt_plan::N, nfft_error_l_infty_1_complex(), and NFFT_SWAP_complex.

Referenced by main().

int main int  argc,
char **  argv
 

Different tests of the fast Gauss transform.

Author:
Stefan Kunis

Definition at line 562 of file fastgauss.c.

References fgt_test_andersson(), fgt_test_error(), fgt_test_error_p(), and fgt_test_simple().


Generated on 1 Nov 2006 by Doxygen 1.4.4