00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00038 #ifndef fastsum_h_inc
00039 #define fastsum_h_inc
00040
00042 #include <complex.h>
00044 #include "util.h"
00046 #include "nfft3.h"
00047
00051 #define EXACT_NEARFIELD (1U<< 0)
00052
00054 typedef struct fastsum_plan_
00055 {
00058 int d;
00060 int N_total;
00061 int M_total;
00063 double _Complex *alpha;
00064 double _Complex *f;
00066 double *x;
00067 double *y;
00069 double _Complex (*kernel)(double , int , const double *);
00070 double *kernel_param;
00072 unsigned flags;
00077 double _Complex *pre_K;
00080 int n;
00081 fftw_complex *b;
00083 int p;
00084 double eps_I;
00085 double eps_B;
00086
00087 nfft_plan mv1;
00088 nfft_plan mv2;
00091 int Ad;
00092 double *Add;
00094
00095 fftw_plan fft_plan;
00096 } fastsum_plan;
00097
00114 void fastsum_init_guru(fastsum_plan *ths, int d, int N_total, int M_total, double _Complex (*kernel)(), double *param, unsigned flags, int nn, int m, int p, double eps_I, double eps_B);
00115
00120 void fastsum_finalize(fastsum_plan *ths);
00121
00126 void fastsum_exact(fastsum_plan *ths);
00127
00132 void fastsum_precompute(fastsum_plan *ths);
00133
00138 void fastsum_trafo(fastsum_plan *ths);
00139
00140
00141 double regkern(double _Complex (*kernel)(), double xx, int p, const double *param, double a, double b);
00142
00144 double kubintkern(double x, double *Add, int Ad, double a);
00145
00146 #endif
00147