#include <stdlib.h>
#include <complex.h>
#include <math.h>
#include "util.h"
#include "nfft3.h"
#include "fastsum.h"
Functions | |
double | fak (int n) |
factorial | |
double | binom (int n, int m) |
binomial coefficient | |
double | BasisPoly (int m, int r, double xx) |
basis polynomial for regularized kernel | |
double | regkern (complex(*kernel)(double, int, const double *), double xx, int p, const double *param, double a, double b) |
regularized kernel with K_I arbitrary and K_B smooth to zero | |
double | regkern1 (complex(*kernel)(double, int, const double *), double xx, int p, const double *param, double a, double b) |
regularized kernel with K_I arbitrary and K_B periodized (used in 1D) | |
double | regkern2 (complex(*kernel)(double, int, const double *), double xx, int p, const double *param, double a, double b) |
regularized kernel for even kernels with K_I even and K_B mirrored | |
double | regkern3 (complex(*kernel)(double, int, const double *), double xx, int p, const double *param, double a, double b) |
regularized kernel for even kernels with K_I even and K_B mirrored smooth to K(1/2) (used in dD, d>1) | |
double | kubintkern (double x, double *Add, int Ad, double a) |
cubic spline interpolation in near field with even kernels | |
double | kubintkern1 (double x, double *Add, int Ad, double a) |
cubic spline interpolation in near field with arbitrary kernels | |
void | quicksort (int d, int t, double *x, complex *alpha, int N) |
quicksort algorithm for source knots and associated coefficients | |
void | BuildTree (int d, int t, double *x, complex *alpha, int N) |
recursive sort of source knots dimension by dimension to get tree structure | |
complex | SearchTree (int d, int t, double *x, complex *alpha, double *xmin, double *xmax, int N, complex(*kernel)(double, int, const double *), const double *param, int Ad, double *Add, int p, unsigned flags) |
fast search in tree of source knots for near field computation | |
void | fastsum_init_guru (fastsum_plan *ths, int d, int N_total, int M_total, complex(*kernel)(), double *param, unsigned flags, int nn, int m, int p, double eps_I, double eps_B) |
initialize fast summation plan | |
void | fastsum_finalize (fastsum_plan *ths) |
finalize plan | |
void | fastsum_exact (fastsum_plan *ths) |
direct summation | |
void | fastsum_precompute (fastsum_plan *ths) |
sort source nodes, precompute Fourier coefficients, etc. | |
void | fastsum_trafo (fastsum_plan *ths) |
fast NFFT-based summation algorithm |
|
direct summation
|
|
finalize plan
|
|
initialize fast summation plan inner boundary outer boundary init spline for near field computation init d-dimensional NFFT plan init d-dimensional FFTW plan |
|
sort source nodes, precompute Fourier coefficients, etc. sort source knots precompute spline values for near field init NFFT plan for transposed transform in first step precompute psi, the entries of the matrix B init Fourier coefficients init NFFT plan for transform in third step precompute psi, the entries of the matrix B precompute Fourier coefficients of regularised kernel |
|
fast NFFT-based summation algorithm limits for d-dimensional near field box first step of algorithm second step of algorithm third step of algorithm add near field |