![]() |
NFFT 3.6.0
|

Data Structures | |
| struct | fgt_plan |
| Structure for the Gauss transform. More... | |
Macros | |
| #define | NFFT_PRECISION_DOUBLE |
| #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 | |
| static void | dgt_trafo (fgt_plan *ths) |
| Executes the discrete Gauss transform. | |
| static void | fgt_trafo (fgt_plan *ths) |
| Executes the fast Gauss transform. | |
| static void | fgt_init_guru (fgt_plan *ths, int N, int M, NFFT_C sigma, int n, NFFT_R p, int m, unsigned flags) |
| Initialisation of a transform plan, guru. | |
| static void | fgt_init (fgt_plan *ths, int N, int M, NFFT_C sigma, NFFT_R eps) |
| Initialisation of a transform plan, simple. | |
| static void | fgt_init_node_dependent (fgt_plan *ths) |
| Initialisation of a transform plan, depends on source and target nodes. | |
| static void | fgt_finalize (fgt_plan *ths) |
| Destroys the transform plan. | |
| static void | fgt_test_init_rand (fgt_plan *ths) |
| Random initialisation of a fgt plan. | |
| static NFFT_R | fgt_test_measure_time (fgt_plan *ths, unsigned dgt) |
| Compares execution times for the fast and discrete Gauss transform. | |
| static void | fgt_test_simple (int N, int M, NFFT_C sigma, NFFT_R eps) |
| Simple example that computes fast and discrete Gauss transforms. | |
| static void | fgt_test_andersson (void) |
| Compares accuracy and execution time of the fast Gauss transform with increasing expansion degree. | |
| static void | fgt_test_error (void) |
| Compares accuracy of the fast Gauss transform with increasing expansion degree. | |
| static void | fgt_test_error_p (void) |
| 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. | |
Variables | |
| int | fgt_plan::N |
| number of source nodes | |
| int | fgt_plan::M |
| number of target nodes | |
| NFFT_C * | fgt_plan::alpha |
| source coefficients | |
| NFFT_C * | fgt_plan::f |
| target evaluations | |
| unsigned | fgt_plan::flags |
| flags for precomputation and approximation type | |
| NFFT_C | fgt_plan::sigma |
| parameter of the Gaussian | |
| NFFT_R * | fgt_plan::x |
| source nodes in | |
| NFFT_R * | fgt_plan::y |
| target nodes in | |
| NFFT_C * | fgt_plan::pre_cexp |
| precomputed values for dgt | |
| int | fgt_plan::n |
| expansion degree | |
| NFFT_R | fgt_plan::p |
| period, at least 1 | |
| NFFT_C * | fgt_plan::b |
| expansion coefficients | |
| #define NFFT_PRECISION_DOUBLE |
Definition at line 30 of file fastgauss.c.
| #define DGT_PRE_CEXP (1U<< 0) |
If this flag is set, the whole matrix is precomputed and stored for the discrete Gauss transfrom.
Definition at line 42 of file fastgauss.c.
| #define FGT_NDFT (1U<< 1) |
If this flag is set, the fast Gauss transform uses the discrete instead of the fast Fourier transform.
Definition at line 53 of file fastgauss.c.
| #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.
Definition at line 63 of file fastgauss.c.
|
static |
Executes the discrete Gauss transform.
Definition at line 101 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().
|
static |
Executes the fast Gauss transform.
Definition at line 128 of file fastgauss.c.
References fgt_plan::b, FGT_NDFT, fgt_plan::flags, and fgt_plan::n.
Referenced by fgt_test_error(), fgt_test_error_p(), fgt_test_measure_time(), and fgt_test_simple().
|
static |
Initialisation of a transform plan, guru.
Definition at line 166 of file fastgauss.c.
References fgt_plan::alpha, fgt_plan::b, fgt_plan::f, FFTW_INIT, FGT_APPROX_B, fgt_plan::flags, fgt_plan::M, MALLOC_F_HAT, MALLOC_X, fgt_plan::N, fgt_plan::n, fgt_plan::p, 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().
|
static |
Initialisation of a transform plan, simple.
Definition at line 240 of file fastgauss.c.
References DGT_PRE_CEXP, and fgt_init_guru().
Referenced by fgt_test_simple().
|
static |
Initialisation of a transform plan, depends on source and target nodes.
Definition at line 261 of file fastgauss.c.
References DGT_PRE_CEXP, fgt_plan::flags, fgt_plan::M, fgt_plan::N, fgt_plan::p, fgt_plan::pre_cexp, PRE_PSI, fgt_plan::sigma, fgt_plan::x, and fgt_plan::y.
Referenced by fgt_test_andersson(), fgt_test_error(), fgt_test_error_p(), and fgt_test_simple().
|
static |
Destroys the transform plan.
Definition at line 292 of file fastgauss.c.
References fgt_plan::alpha, fgt_plan::b, fgt_plan::f, fgt_plan::x, and fgt_plan::y.
Referenced by fgt_test_andersson(), fgt_test_error(), fgt_test_error_p(), and fgt_test_simple().
|
static |
Random initialisation of a fgt plan.
Definition at line 315 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().
|
static |
Compares execution times for the fast and discrete Gauss transform.
Definition at line 338 of file fastgauss.c.
References dgt_trafo(), and fgt_trafo().
Referenced by fgt_test_andersson().
|
static |
Simple example that computes fast and discrete Gauss transforms.
Definition at line 373 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, and fgt_plan::N.
Referenced by main().
|
static |
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 complex parameters. J. Comput. Physics 203 (2005) 274-286
Definition at line 409 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, and fgt_plan::N.
Referenced by main().
|
static |
Compares accuracy of the fast Gauss transform with increasing expansion degree.
Definition at line 475 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, and fgt_plan::N.
Referenced by main().
|
static |
Compares accuracy of the fast Gauss transform with increasing expansion degree and different periodisation lengths.
Definition at line 527 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, and fgt_plan::N.
Referenced by main().
| int main | ( | int | argc, |
| char ** | argv | ||
| ) |
Different tests of the fast Gauss transform.
Definition at line 576 of file fastgauss.c.
References fgt_test_andersson(), fgt_test_error(), fgt_test_error_p(), and fgt_test_simple().
| int fgt_plan::N |
number of source nodes
Definition at line 68 of file fastgauss.c.
Referenced by dgt_trafo(), fgt_init_guru(), fgt_init_node_dependent(), fgt_test_andersson(), fgt_test_error(), fgt_test_error_p(), fgt_test_init_rand(), and fgt_test_simple().
| int fgt_plan::M |
number of target nodes
Definition at line 69 of file fastgauss.c.
Referenced by dgt_trafo(), fgt_init_guru(), fgt_init_node_dependent(), fgt_test_andersson(), fgt_test_error(), fgt_test_error_p(), fgt_test_init_rand(), and fgt_test_simple().
| NFFT_C* fgt_plan::alpha |
source coefficients
Definition at line 71 of file fastgauss.c.
Referenced by dgt_trafo(), fgt_finalize(), fgt_init_guru(), fgt_test_andersson(), fgt_test_error(), fgt_test_error_p(), fgt_test_init_rand(), and fgt_test_simple().
| NFFT_C* fgt_plan::f |
target evaluations
Definition at line 72 of file fastgauss.c.
Referenced by dgt_trafo(), fgt_finalize(), fgt_init_guru(), fgt_test_andersson(), fgt_test_error(), fgt_test_error_p(), and fgt_test_simple().
| unsigned fgt_plan::flags |
flags for precomputation and approximation type
Definition at line 74 of file fastgauss.c.
Referenced by dgt_trafo(), fgt_init_guru(), fgt_init_node_dependent(), fgt_test_andersson(), and fgt_trafo().
| NFFT_C fgt_plan::sigma |
parameter of the Gaussian
Definition at line 77 of file fastgauss.c.
Referenced by dgt_trafo(), fgt_init_guru(), and fgt_init_node_dependent().
| NFFT_R* fgt_plan::x |
source nodes in ![$[-1/4,1/4]$](form_255.png)
Definition at line 79 of file fastgauss.c.
Referenced by dgt_trafo(), fgt_finalize(), fgt_init_guru(), fgt_init_node_dependent(), and fgt_test_init_rand().
| NFFT_R* fgt_plan::y |
target nodes in ![$[-1/4,1/4]$](form_255.png)
Definition at line 80 of file fastgauss.c.
Referenced by dgt_trafo(), fgt_finalize(), fgt_init_guru(), fgt_init_node_dependent(), and fgt_test_init_rand().
| NFFT_C* fgt_plan::pre_cexp |
precomputed values for dgt
Definition at line 82 of file fastgauss.c.
Referenced by dgt_trafo(), and fgt_init_node_dependent().
| int fgt_plan::n |
expansion degree
Definition at line 84 of file fastgauss.c.
Referenced by fgt_init_guru(), and fgt_trafo().
| NFFT_R fgt_plan::p |
period, at least 1
Definition at line 85 of file fastgauss.c.
Referenced by fgt_init_guru(), and fgt_init_node_dependent().
| NFFT_C* fgt_plan::b |
expansion coefficients
Definition at line 87 of file fastgauss.c.
Referenced by fgt_finalize(), fgt_init_guru(), and fgt_trafo().