Fast summation
Applications

Direct and fast summation (convolution). More...

Collaboration diagram for Fast summation:

## Topics

| fastsum_matlab
| fastsum_test

## Data Structures

struct | fastsum_plan_
| plan for fast summation algorithm More...

## Macros

#define | X(name)
| Include header for C99 complex datatype.
#define | NF_KUB
#define | EXACT_NEARFIELD (1U<< 0)
| Constant symbols.
#define | NEARFIELD_BOXES (1U<< 1)
#define | STORE_PERMUTATION_X_ALPHA (1U<< 2)
| If this flag is set, and eps_I > 0.0 and NEARFIELD_BOXES is not set, then the vector permutation_x_alpha is stored.

## Typedefs

typedef C(* | kernel) (R, int, const R *)
typedef struct fastsum_plan_ | fastsum_plan
| plan for fast summation algorithm

## Functions

static int | max_i (int a, int b)
| max
static R | fak (int n)
| factorial
static R | binom (int n, int m)
| binomial coefficient
static R | BasisPoly (int m, int r, R xx)
| basis polynomial for regularized kernel
C | regkern (kernel k, R xx, int p, const R *param, R a, R b)
| regularized kernel with K_I arbitrary and K_B smooth to zero
static C | regkern1 (kernel k, R xx, int p, const R *param, R a, R b)
| regularized kernel with K_I arbitrary and K_B periodized (used in 1D)
static C | regkern3 (kernel k, R xx, int p, const R *param, R a, R b)
| regularized kernel for even kernels with K_I even and K_B mirrored
C | kubintkern (const R x, const C *Add, const int Ad, const R a)
| linear spline interpolation in near field with even kernels
static C | kubintkern1 (const R x, const C *Add, const int Ad, const R a)
| cubic spline interpolation in near field with arbitrary kernels
static void | quicksort (int d, int t, R *x, C *alpha, int *permutation_x_alpha, int N)
| quicksort algorithm for source knots and associated coefficients
static void | BuildBox (fastsum_plan *ths)
| initialize box-based search data structures
static C | calc_SearchBox (int d, R *y, R *x, C *alpha, int start, int end_lt, const C *Add, const int Ad, int p, R a, const kernel k, const R *param, const unsigned flags)
| inner computation function for box-based near field correction
static C | SearchBox (R *y, fastsum_plan *ths)
| box-based near field correction
static void | BuildTree (int d, int t, R *x, C *alpha, int *permutation_x_alpha, int N)
| recursive sort of source knots dimension by dimension to get tree structure
static C | SearchTree (const int d, const int t, const R *x, const C *alpha, const R *xmin, const R *xmax, const int N, const kernel k, const R *param, const int Ad, const C *Add, const int p, const unsigned flags)
| fast search in tree of source knots for near field computation
static void | fastsum_precompute_kernel (fastsum_plan *ths)
void | fastsum_init_guru_kernel (fastsum_plan *ths, int d, kernel k, R *param, unsigned flags, int nn, int p, R eps_I, R eps_B)
| initialize node independent part of fast summation plan
void | fastsum_init_guru_source_nodes (fastsum_plan *ths, int N_total, int nn_oversampled, int m)
| initialize source nodes dependent part of fast summation plan
void | fastsum_init_guru_target_nodes (fastsum_plan *ths, int M_total, int nn_oversampled, int m)
| initialize target nodes dependent part of fast summation plan
void | fastsum_init_guru (fastsum_plan *ths, int d, int N_total, int M_total, kernel k, R *param, unsigned flags, int nn, int m, int p, R eps_I, R eps_B)
| initialization of fastsum plan
void | fastsum_finalize_source_nodes (fastsum_plan *ths)
| finalization of fastsum plan
void | fastsum_finalize_target_nodes (fastsum_plan *ths)
| finalization of fastsum plan
void | fastsum_finalize_kernel (fastsum_plan *ths)
| finalization of fastsum plan
void | fastsum_finalize (fastsum_plan *ths)
| finalization of fastsum plan
void | fastsum_exact (fastsum_plan *ths)
| direct computation of sums
void | fastsum_precompute_source_nodes (fastsum_plan *ths)
| precomputation for fastsum
void | fastsum_precompute_target_nodes (fastsum_plan *ths)
| precomputation for fastsum
void | fastsum_precompute (fastsum_plan *ths)
| precomputation for fastsum
void | fastsum_trafo (fastsum_plan *ths)
| fast NFFT-based summation
| fastsum_plan_::NFFT (plan) mv1
| source nfft plan
| fastsum_plan_::FFTW (plan) fft_plan
C | gaussian (R x, int der, const R *param)
| K(x)=exp(-x^2/c^2).
C | multiquadric (R x, int der, const R *param)
| K(x)=sqrt(x^2+c^2).
C | inverse_multiquadric (R x, int der, const R *param)
| K(x)=1/sqrt(x^2+c^2).
C | logarithm (R x, int der, const R *param)
| K(x)=log |x|.
C | thinplate_spline (R x, int der, const R *param)
| K(x) = x^2 log |x|.
C | one_over_square (R x, int der, const R *param)
| K(x) = 1/x^2.
C | one_over_modulus (R x, int der, const R *param)
| K(x) = 1/|x|.
C | one_over_x (R x, int der, const R *param)
| K(x) = 1/x.
C | inverse_multiquadric3 (R x, int der, const R *param)
| K(x) = 1/sqrt(x^2+c^2)^3.
C | sinc_kernel (R x, int der, const R *param)
| K(x) = sin(cx)/x.
C | cosc (R x, int der, const R *param)
| K(x) = cos(cx)/x.
C | kcot (R x, int der, const R *param)
| K(x) = cot(cx).
C | one_over_cube (R x, int der, const R *param)
| K(x) = 1/x^3.
C | log_sin (R x, int der, const R *param)
| K(x) = log(|sin(cx)|).
C | laplacian_rbf (R x, int der, const R *param)
| K(x) = exp(-|x|/c).

## Variables

int | fastsum_plan_::d
| api
int | fastsum_plan_::N_total
| number of source knots
int | fastsum_plan_::M_total
| number of target knots
C * | fastsum_plan_::alpha
| source coefficients
C * | fastsum_plan_::f
| target evaluations
R * | fastsum_plan_::x
| source knots in d-ball with radius 1/4-eps_b/2
R * | fastsum_plan_::y
| target knots in d-ball with radius 1/4-eps_b/2
kernel | fastsum_plan_::k
| kernel function
R * | fastsum_plan_::kernel_param
| parameters for kernel function
unsigned | fastsum_plan_::flags
| flags precomp.
C * | fastsum_plan_::pre_K
| internal
int | fastsum_plan_::n
| FS__ - fast summation.
C * | fastsum_plan_::b
| expansion coefficients
C * | fastsum_plan_::f_hat
| Fourier coefficients of nfft plans.
int | fastsum_plan_::p
| degree of smoothness of regularization
R | fastsum_plan_::eps_I
| inner boundary
R | fastsum_plan_::eps_B
| outer boundary
int | fastsum_plan_::Ad
| near field
C * | fastsum_plan_::Add
| spline values
int | fastsum_plan_::box_count
int | fastsum_plan_::box_count_per_dim
int * | fastsum_plan_::box_offset
R * | fastsum_plan_::box_x
C * | fastsum_plan_::box_alpha
int * | fastsum_plan_::permutation_x_alpha
| permutation vector of source nodes if STORE_PERMUTATION_X_ALPHA is set
R | fastsum_plan_::MEASURE_TIME_t [8]
| Measured time for each step if MEASURE_TIME is set.

## Detailed Description

Direct and fast summation (convolution).

Computes the sums

## Macro Definition Documentation

## X

#define X | ( |  | name | ) |

Value:
NFFT(name)

Include header for C99 complex datatype.

Include header for utils from NFFT3 library. Include header for NFFT3 library.

Definition at line 57 of file fastsum.h.

Referenced by fpt_init(), fpt_transposed(), main(), nfsft_precompute(), nfsoft_adjoint(), and nfsoft_trafo().

## NF_KUB

#define NF_KUB

Definition at line 60 of file fastsum.h.

## EXACT_NEARFIELD

#define EXACT_NEARFIELD (1U<< 0)

Constant symbols.

Definition at line 73 of file fastsum.h.

Referenced by calc_SearchBox(), fastsum_finalize_kernel(), fastsum_init_guru_kernel(), and SearchTree().

## NEARFIELD_BOXES

#define NEARFIELD_BOXES (1U<< 1)

Definition at line 75 of file fastsum.h.

## STORE_PERMUTATION_X_ALPHA

#define STORE_PERMUTATION_X_ALPHA (1U<< 2)

If this flag is set, and eps_I > 0.0 and NEARFIELD_BOXES is not set, then the vector permutation_x_alpha is stored.

Definition at line 79 of file fastsum.h.

Referenced by fastsum_init_guru_source_nodes().

## Typedef Documentation

## kernel

typedef C(* kernel) (R, int, const R *)

Definition at line 68 of file fastsum.h.

## Function Documentation

## max_i()

int max_i | ( | int | a,
|  | int | b )

static

max

Definition at line 46 of file fastsum.c.

Referenced by fastsum_init_guru_kernel(), and SearchBox().

## fak()

R fak | ( | int | n | ) |

static

factorial

Definition at line 52 of file fastsum.c.

References fak().

Referenced by BasisPoly(), binom(), and fak().

## binom()

R binom | ( | int | n,
|  | int | m )

static

binomial coefficient

Definition at line 61 of file fastsum.c.

References fak().

Referenced by BasisPoly().

## BasisPoly()

R BasisPoly | ( | int | m,
|  | int | r,
|  | R | xx )

static

basis polynomial for regularized kernel

Definition at line 67 of file fastsum.c.

References binom(), and fak().

Referenced by regkern(), regkern1(), and regkern3().

## regkern()

C regkern | ( | kernel | k,
|  | R | xx,
|  | int | p,
|  | const R * | param,
|  | R | a,
|  | R | b )

regularized kernel with K_I arbitrary and K_B smooth to zero

Definition at line 81 of file fastsum.c.

References BasisPoly().

Referenced by calc_SearchBox(), and SearchTree().

## regkern1()

C regkern1 | ( | kernel | k,
|  | R | xx,
|  | int | p,
|  | const R * | param,
|  | R | a,
|  | R | b )

static

regularized kernel with K_I arbitrary and K_B periodized (used in 1D)

Definition at line 134 of file fastsum.c.

References BasisPoly().

Referenced by calc_SearchBox(), and SearchTree().

## regkern3()

C regkern3 | ( | kernel | k,
|  | R | xx,
|  | int | p,
|  | const R * | param,
|  | R | a,
|  | R | b )

static

regularized kernel for even kernels with K_I even and K_B mirrored

regularized kernel for even kernels with K_I even and K_B mirrored smooth to K(1/2) (used in dD, d>1)

Definition at line 230 of file fastsum.c.

References BasisPoly().

## kubintkern()

C kubintkern | ( | const R | x,
|  | const C * | Add,
|  | const int | Ad,
|  | const R | a )

linear spline interpolation in near field with even kernels

cubic spline interpolation in near field with even kernels

Definition at line 318 of file fastsum.c.

Referenced by calc_SearchBox(), and SearchTree().

## kubintkern1()

C kubintkern1 | ( | const R | x,
|  | const C * | Add,
|  | const int | Ad,
|  | const R | a )

static

cubic spline interpolation in near field with arbitrary kernels

Definition at line 352 of file fastsum.c.

Referenced by calc_SearchBox(), and SearchTree().

## quicksort()

void quicksort | ( | int | d,
|  | int | t,
|  | R * | x,
|  | C * | alpha,
|  | int * | permutation_x_alpha,
|  | int | N )

static

quicksort algorithm for source knots and associated coefficients

Definition at line 381 of file fastsum.c.

References quicksort().

Referenced by BuildTree(), and quicksort().

## BuildBox()

void BuildBox | ( | fastsum_plan * | ths | ) |

static

initialize box-based search data structures

Definition at line 429 of file fastsum.c.

References fastsum_plan_::alpha, fastsum_plan_::d, fastsum_plan_::eps_B, fastsum_plan_::eps_I, fastsum_plan_::N_total, and fastsum_plan_::x.

Referenced by fastsum_precompute_source_nodes().

## calc_SearchBox()

C calc_SearchBox | ( | int | d,
|  | R * | y,
|  | R * | x,
|  | C * | alpha,
|  | int | start,
|  | int | end_lt,
|  | const C * | Add,
|  | const int | Ad,
|  | int | p,
|  | R | a,
|  | const kernel | k,
|  | const R * | param,
|  | const unsigned | flags )

inline static

inner computation function for box-based near field correction

Definition at line 480 of file fastsum.c.

References EXACT_NEARFIELD, kubintkern(), kubintkern1(), regkern(), and regkern1().

Referenced by SearchBox().

## SearchBox()

C SearchBox | ( | R * | y,
|  | fastsum_plan * | ths )

static

box-based near field correction

Definition at line 533 of file fastsum.c.

References fastsum_plan_::Ad, fastsum_plan_::Add, calc_SearchBox(), fastsum_plan_::d, fastsum_plan_::eps_B, fastsum_plan_::eps_I, fastsum_plan_::flags, fastsum_plan_::k, fastsum_plan_::kernel_param, max_i(), and fastsum_plan_::p.

Referenced by fastsum_trafo().

## BuildTree()

void BuildTree | ( | int | d,
|  | int | t,
|  | R * | x,
|  | C * | alpha,
|  | int * | permutation_x_alpha,
|  | int | N )

static

recursive sort of source knots dimension by dimension to get tree structure

Definition at line 599 of file fastsum.c.

References BuildTree(), and quicksort().

Referenced by BuildTree(), and fastsum_precompute_source_nodes().

## SearchTree()

C SearchTree | ( | const int | d,
|  | const int | t,
|  | const R * | x,
|  | const C * | alpha,
|  | const R * | xmin,
|  | const R * | xmax,
|  | const int | N,
|  | const kernel | k,
|  | const R * | param,
|  | const int | Ad,
|  | const C * | Add,
|  | const int | p,
|  | const unsigned | flags )

static

fast search in tree of source knots for near field computation

Definition at line 613 of file fastsum.c.

References EXACT_NEARFIELD, kubintkern(), kubintkern1(), regkern(), regkern1(), and SearchTree().

Referenced by fastsum_trafo(), and SearchTree().

## fastsum_precompute_kernel()

void fastsum_precompute_kernel | ( | fastsum_plan * | ths | ) |

static

Definition at line 698 of file fastsum.c.

## fastsum_init_guru_kernel()

void fastsum_init_guru_kernel | ( | fastsum_plan * | ths,
|  | int | d,
|  | kernel | k,
|  | R * | param,
|  | unsigned | flags,
|  | int | nn,
|  | int | p,
|  | R | eps_I,
|  | R | eps_B )

initialize node independent part of fast summation plan

Parameters

  ths | The pointer to a fastsum plan.
  d | The dimension of the problem.
  kernel | The kernel function.
  param | The parameters for the kernel function.
  flags | Fastsum flags.
  nn | The expansion degree.
  p | The degree of smoothness.
  eps_I | The inner boundary.
  eps_B | the outer boundary.

Definition at line 779 of file fastsum.c.

References fastsum_plan_::Ad, fastsum_plan_::Add, fastsum_plan_::b, fastsum_plan_::d, fastsum_plan_::eps_B, fastsum_plan_::eps_I, EXACT_NEARFIELD, fastsum_plan_::f_hat, fastsum_plan_::flags, fastsum_plan_::k, fastsum_plan_::kernel_param, max_i(), fastsum_plan_::n, one_over_x(), and fastsum_plan_::p.

Referenced by fastsum_init_guru().

## fastsum_init_guru_source_nodes()

void fastsum_init_guru_source_nodes | ( | fastsum_plan * | ths,
|  | int | N_total,
|  | int | nn_oversampled,
|  | int | m )

initialize source nodes dependent part of fast summation plan

Parameters

  ths | The pointer to a fastsum plan.
  N_total | The number of source knots x.
  nn_oversampled | The oversampled expansion degree for nfft.
  m | The cut-off parameter for the NFFT.

Definition at line 887 of file fastsum.c.

References fastsum_plan_::alpha, fastsum_plan_::d, fastsum_plan_::eps_B, fastsum_plan_::eps_I, fastsum_plan_::f, fastsum_plan_::f_hat, FFT_OUT_OF_PLACE, FFTW_INIT, fastsum_plan_::flags, fastsum_plan_::n, fastsum_plan_::N_total, fastsum_plan_::permutation_x_alpha, PRE_PHI_HUT, PRE_PSI, STORE_PERMUTATION_X_ALPHA, and fastsum_plan_::x.

Referenced by fastsum_init_guru().

## fastsum_init_guru_target_nodes()

void fastsum_init_guru_target_nodes | ( | fastsum_plan * | ths,
|  | int | M_total,
|  | int | nn_oversampled,
|  | int | m )

initialize target nodes dependent part of fast summation plan

Parameters

  ths | The pointer to a fastsum plan.
  M_total | The number of target knots y.
  nn_oversampled | The oversampled expansion degree for nfft.
  m | The cut-off parameter for the NFFT.

Definition at line 955 of file fastsum.c.

References fastsum_plan_::d, fastsum_plan_::f, fastsum_plan_::f_hat, FFT_OUT_OF_PLACE, FFTW_INIT, fastsum_plan_::M_total, fastsum_plan_::n, PRE_PHI_HUT, PRE_PSI, fastsum_plan_::x, and fastsum_plan_::y.

Referenced by fastsum_init_guru().

## fastsum_init_guru()

void fastsum_init_guru | ( | fastsum_plan * | ths,
|  | int | d,
|  | int | N_total,
|  | int | M_total,
|  | kernel | k,
|  | R * | param,
|  | unsigned | flags,
|  | int | nn,
|  | int | m,
|  | int | p,
|  | R | eps_I,
|  | R | eps_B )

initialization of fastsum plan

initialize fast summation plan

Parameters

  ths | The pointer to a fastsum plan.
  d | The dimension of the problem.
  N_total | The number of source knots x.
  M_total | The number of target knots y.
  kernel | The kernel function.
  param | The parameters for the kernel function.
  flags | Fastsum flags.
  nn | The expansion degree.
  m | The cut-off parameter for the NFFT.
  p | The degree of smoothness.
  eps_I | The inner boundary.
  eps_B | the outer boundary.

Definition at line 987 of file fastsum.c.

References fastsum_init_guru_kernel(), fastsum_init_guru_source_nodes(), and fastsum_init_guru_target_nodes().

## fastsum_finalize_source_nodes()

void fastsum_finalize_source_nodes | ( | fastsum_plan * | ths | ) |

finalization of fastsum plan

finalize source nodes dependent part of plan

Parameters

  ths | The pointer to a fastsum plan.

Definition at line 996 of file fastsum.c.

References fastsum_plan_::alpha, fastsum_plan_::eps_I, fastsum_plan_::flags, fastsum_plan_::permutation_x_alpha, and fastsum_plan_::x.

Referenced by fastsum_finalize().

## fastsum_finalize_target_nodes()

void fastsum_finalize_target_nodes | ( | fastsum_plan * | ths | ) |

finalization of fastsum plan

finalize target nodes dependent part of plan

Parameters

  ths | The pointer to a fastsum plan.

Definition at line 1020 of file fastsum.c.

References fastsum_plan_::f, and fastsum_plan_::y.

Referenced by fastsum_finalize().

## fastsum_finalize_kernel()

void fastsum_finalize_kernel | ( | fastsum_plan * | ths | ) |

finalization of fastsum plan

finalize node independent part of plan

Parameters

  ths | The pointer to a fastsum plan.

Definition at line 1029 of file fastsum.c.

References fastsum_plan_::Add, fastsum_plan_::b, fastsum_plan_::eps_I, EXACT_NEARFIELD, fastsum_plan_::f_hat, and fastsum_plan_::flags.

Referenced by fastsum_finalize().

## fastsum_finalize()

void fastsum_finalize | ( | fastsum_plan * | ths | ) |

finalization of fastsum plan

finalize plan

Parameters

  ths | The pointer to a fastsum plan.

Definition at line 1048 of file fastsum.c.

References fastsum_finalize_kernel(), fastsum_finalize_source_nodes(), and fastsum_finalize_target_nodes().

## fastsum_exact()

void fastsum_exact | ( | fastsum_plan * | ths | ) |

direct computation of sums

direct summation

Parameters

  ths | The pointer to a fastsum plan.

Definition at line 1056 of file fastsum.c.

References fastsum_plan_::alpha, fastsum_plan_::d, fastsum_plan_::f, fastsum_plan_::k, fastsum_plan_::kernel_param, fastsum_plan_::M_total, fastsum_plan_::N_total, fastsum_plan_::x, and fastsum_plan_::y.

## fastsum_precompute_source_nodes()

void fastsum_precompute_source_nodes | ( | fastsum_plan * | ths | ) |

precomputation for fastsum

sort source nodes, precompute nfft source plan.

Parameters

  ths | The pointer to a fastsum plan.

Definition at line 1086 of file fastsum.c.

References fastsum_plan_::alpha, BuildBox(), BuildTree(), fastsum_plan_::d, fastsum_plan_::eps_I, fastsum_plan_::flags, fastsum_plan_::MEASURE_TIME_t, fastsum_plan_::N_total, nfft_elapsed_seconds(), fastsum_plan_::permutation_x_alpha, PRE_FULL_PSI, PRE_LIN_PSI, PRE_PSI, and fastsum_plan_::x.

Referenced by fastsum_precompute().

## fastsum_precompute_target_nodes()

void fastsum_precompute_target_nodes | ( | fastsum_plan * | ths | ) |

precomputation for fastsum

precompute nfft target plan.

Parameters

  ths | The pointer to a fastsum plan.

Definition at line 1141 of file fastsum.c.

References fastsum_plan_::flags, fastsum_plan_::MEASURE_TIME_t, PRE_FULL_PSI, PRE_LIN_PSI, and PRE_PSI.

Referenced by fastsum_precompute().

## fastsum_precompute()

void fastsum_precompute | ( | fastsum_plan * | ths | ) |

precomputation for fastsum

sort source nodes, precompute nfft plans etc.

Parameters

  ths | The pointer to a fastsum plan.

Definition at line 1173 of file fastsum.c.

References fastsum_precompute_source_nodes(), and fastsum_precompute_target_nodes().

## fastsum_trafo()

void fastsum_trafo | ( | fastsum_plan * | ths | ) |

fast NFFT-based summation

fast NFFT-based summation algorithm

Parameters

  ths | The pointer to a fastsum plan.

Definition at line 1180 of file fastsum.c.

References fastsum_plan_::Ad, fastsum_plan_::Add, fastsum_plan_::alpha, fastsum_plan_::b, fastsum_plan_::d, fastsum_plan_::eps_I, fastsum_plan_::f, fastsum_plan_::f_hat, fastsum_plan_::flags, fastsum_plan_::k, fastsum_plan_::kernel_param, fastsum_plan_::M_total, fastsum_plan_::MEASURE_TIME_t, fastsum_plan_::N_total, nfft_elapsed_seconds(), fastsum_plan_::p, SearchBox(), SearchTree(), fastsum_plan_::x, and fastsum_plan_::y.

## gaussian()

C gaussian | ( | R | x,
|  | int | der,
|  | const R * | param )

K(x)=exp(-x^2/c^2).

Definition at line 38 of file kernels.c.

## multiquadric()

C multiquadric | ( | R | x,
|  | int | der,
|  | const R * | param )

K(x)=sqrt(x^2+c^2).

Definition at line 64 of file kernels.c.

## inverse_multiquadric()

C inverse_multiquadric | ( | R | x,
|  | int | der,
|  | const R * | param )

K(x)=1/sqrt(x^2+c^2).

Definition at line 90 of file kernels.c.

## logarithm()

C logarithm | ( | R | x,
|  | int | der,
|  | const R * | param )

K(x)=log |x|.

Definition at line 116 of file kernels.c.

## thinplate_spline()

C thinplate_spline | ( | R | x,
|  | int | der,
|  | const R * | param )

K(x) = x^2 log |x|.

Definition at line 149 of file kernels.c.

## one_over_square()

C one_over_square | ( | R | x,
|  | int | der,
|  | const R * | param )

K(x) = 1/x^2.

Definition at line 177 of file kernels.c.

## one_over_modulus()

C one_over_modulus | ( | R | x,
|  | int | der,
|  | const R * | param )

K(x) = 1/|x|.

Definition at line 205 of file kernels.c.

## one_over_x()

C one_over_x | ( | R | x,
|  | int | der,
|  | const R * | param )

K(x) = 1/x.

Definition at line 233 of file kernels.c.

Referenced by fastsum_init_guru_kernel().

## inverse_multiquadric3()

C inverse_multiquadric3 | ( | R | x,
|  | int | der,
|  | const R * | param )

K(x) = 1/sqrt(x^2+c^2)^3.

Definition at line 261 of file kernels.c.

## sinc_kernel()

C sinc_kernel | ( | R | x,
|  | int | der,
|  | const R * | param )

K(x) = sin(cx)/x.

Definition at line 287 of file kernels.c.

## cosc()

C cosc | ( | R | x,
|  | int | der,
|  | const R * | param )

K(x) = cos(cx)/x.

Definition at line 314 of file kernels.c.

## kcot()

C kcot | ( | R | x,
|  | int | der,
|  | const R * | param )

K(x) = cot(cx).

Definition at line 346 of file kernels.c.

Referenced by log_sin().

## one_over_cube()

C one_over_cube | ( | R | x,
|  | int | der,
|  | const R * | param )

K(x) = 1/x^3.

Definition at line 374 of file kernels.c.

References UNUSED.

## log_sin()

C log_sin | ( | R | x,
|  | int | der,
|  | const R * | param )

K(x) = log(|sin(cx)|).

Definition at line 402 of file kernels.c.

References kcot().

## laplacian_rbf()

C laplacian_rbf | ( | R | x,
|  | int | der,
|  | const R * | param )

K(x) = exp(-|x|/c).

Definition at line 417 of file kernels.c.

## Variable Documentation

## d

int fastsum_plan_::d

api

number of dimensions

Definition at line 86 of file fastsum.h.

Referenced by BuildBox(), fastsum_exact(), fastsum_init_guru_kernel(), fastsum_init_guru_source_nodes(), fastsum_init_guru_target_nodes(), fastsum_precompute_source_nodes(), fastsum_trafo(), and SearchBox().

## N_total

int fastsum_plan_::N_total

number of source knots

Definition at line 88 of file fastsum.h.

Referenced by BuildBox(), fastsum_exact(), fastsum_init_guru_source_nodes(), fastsum_precompute_source_nodes(), and fastsum_trafo().

## M_total

int fastsum_plan_::M_total

number of target knots

Definition at line 89 of file fastsum.h.

Referenced by fastsum_exact(), fastsum_init_guru_target_nodes(), and fastsum_trafo().

## alpha

C* fastsum_plan_::alpha

source coefficients

Definition at line 91 of file fastsum.h.

Referenced by BuildBox(), fastsum_exact(), fastsum_finalize_source_nodes(), fastsum_init_guru_source_nodes(), fastsum_precompute_source_nodes(), and fastsum_trafo().

## f

C* fastsum_plan_::f

target evaluations

Definition at line 92 of file fastsum.h.

Referenced by fastsum_exact(), fastsum_finalize_target_nodes(), fastsum_init_guru_source_nodes(), fastsum_init_guru_target_nodes(), and fastsum_trafo().

## x

R* fastsum_plan_::x

source knots in d-ball with radius 1/4-eps_b/2

Definition at line 94 of file fastsum.h.

Referenced by BuildBox(), fastsum_exact(), fastsum_finalize_source_nodes(), fastsum_init_guru_source_nodes(), fastsum_init_guru_target_nodes(), fastsum_precompute_source_nodes(), and fastsum_trafo().

## y

R* fastsum_plan_::y

target knots in d-ball with radius 1/4-eps_b/2

Definition at line 95 of file fastsum.h.

Referenced by fastsum_exact(), fastsum_finalize_target_nodes(), fastsum_init_guru_target_nodes(), and fastsum_trafo().

## k

kernel fastsum_plan_::k

kernel function

Definition at line 97 of file fastsum.h.

Referenced by fastsum_exact(), fastsum_init_guru_kernel(), fastsum_trafo(), and SearchBox().

## kernel_param

R* fastsum_plan_::kernel_param

parameters for kernel function

Definition at line 98 of file fastsum.h.

Referenced by fastsum_exact(), fastsum_init_guru_kernel(), fastsum_trafo(), and SearchBox().

## flags

unsigned fastsum_plan_::flags

flags precomp.

and approx.type

Definition at line 100 of file fastsum.h.

Referenced by fastsum_finalize_kernel(), fastsum_finalize_source_nodes(), fastsum_init_guru_kernel(), fastsum_init_guru_source_nodes(), fastsum_precompute_source_nodes(), fastsum_precompute_target_nodes(), fastsum_trafo(), and SearchBox().

## pre_K

C* fastsum_plan_::pre_K

internal

DS_PRE - direct summation precomputed K(x_j-y_l)

Definition at line 105 of file fastsum.h.

## n

int fastsum_plan_::n

FS__ - fast summation.

expansion degree

Definition at line 108 of file fastsum.h.

Referenced by fastsum_init_guru_kernel(), fastsum_init_guru_source_nodes(), and fastsum_init_guru_target_nodes().

## b

C* fastsum_plan_::b

expansion coefficients

Definition at line 109 of file fastsum.h.

Referenced by fastsum_finalize_kernel(), fastsum_init_guru_kernel(), and fastsum_trafo().

## f_hat

C* fastsum_plan_::f_hat

Fourier coefficients of nfft plans.

Definition at line 110 of file fastsum.h.

Referenced by fastsum_finalize_kernel(), fastsum_init_guru_kernel(), fastsum_init_guru_source_nodes(), fastsum_init_guru_target_nodes(), and fastsum_trafo().

## p

int fastsum_plan_::p

degree of smoothness of regularization

Definition at line 112 of file fastsum.h.

Referenced by fastsum_init_guru_kernel(), fastsum_trafo(), and SearchBox().

## eps_I

R fastsum_plan_::eps_I

inner boundary

Definition at line 113 of file fastsum.h.

Referenced by BuildBox(), fastsum_finalize_kernel(), fastsum_finalize_source_nodes(), fastsum_init_guru_kernel(), fastsum_init_guru_source_nodes(), fastsum_precompute_source_nodes(), fastsum_trafo(), and SearchBox().

## eps_B

R fastsum_plan_::eps_B

outer boundary

Definition at line 114 of file fastsum.h.

Referenced by BuildBox(), fastsum_init_guru_kernel(), fastsum_init_guru_source_nodes(), and SearchBox().

## Ad

int fastsum_plan_::Ad

near field

number of spline knots for nearfield computation of regularized kernel

Definition at line 120 of file fastsum.h.

Referenced by fastsum_init_guru_kernel(), fastsum_trafo(), and SearchBox().

## Add

C* fastsum_plan_::Add

spline values

Definition at line 121 of file fastsum.h.

Referenced by fastsum_finalize_kernel(), fastsum_init_guru_kernel(), fastsum_trafo(), and SearchBox().

## box_count

int fastsum_plan_::box_count

Definition at line 126 of file fastsum.h.

## box_count_per_dim

int fastsum_plan_::box_count_per_dim

Definition at line 127 of file fastsum.h.

## box_offset

int* fastsum_plan_::box_offset

Definition at line 128 of file fastsum.h.

## box_x

R* fastsum_plan_::box_x

Definition at line 129 of file fastsum.h.

## box_alpha

C* fastsum_plan_::box_alpha

Definition at line 130 of file fastsum.h.

## permutation_x_alpha

int* fastsum_plan_::permutation_x_alpha

permutation vector of source nodes if STORE_PERMUTATION_X_ALPHA is set

Definition at line 132 of file fastsum.h.

Referenced by fastsum_finalize_source_nodes(), fastsum_init_guru_source_nodes(), and fastsum_precompute_source_nodes().

## MEASURE_TIME_t

R fastsum_plan_::MEASURE_TIME_t[8]

Measured time for each step if MEASURE_TIME is set.

Definition at line 134 of file fastsum.h.

Referenced by fastsum_precompute_source_nodes(), fastsum_precompute_target_nodes(), and fastsum_trafo().