FLAG  1.0b1
Exact Fourier-Laguerre transform in spherical coordinates
Macros | Functions
flag_spherlaguerre.c File Reference
#include "flag.h"
#include <math.h>
#include <stdlib.h>
#include <complex.h>
#include <fftw3.h>
#include <ssht.h>
#include <assert.h>

Go to the source code of this file.

Macros

#define MIN(a, b)   ((a) < (b) ? (a) : (b))
 

Functions

double eval_laguerre (double z, int n, int alpha)
 
double eval_laguerre_rescaled (double z, int n, int alpha, double normfac)
 
long factorial (int n)
 
long factorial_range (int min, int max)
 
void flag_spherlaguerre_quadrature (double *roots, double *weights, int N, int alpha)
 
double flag_spherlaguerre_tau (double R, int N)
 
double flag_spherlaguerre_Rmax (int N)
 
void flag_spherlaguerre_sampling (double *nodes, double *weights, double tau, int N)
 
void flag_spherlaguerre_allocate_sampling (double **nodes, double **weights, int N)
 
void flag_spherlaguerre_analysis (double *fn, const double *f, const double *nodes, const double *weights, double tau, int N)
 
void flag_spherlaguerre_synthesis (double *f, const double *fn, const double *nodes, int Nnodes, double tau, int N)
 
void flag_spherlaguerre_synthesis_gen (double *f, const double *fn, const double *nodes, int Nnodes, double tau, int N, int alpha)
 
void flag_spherlaguerre_mapped_analysis (complex double *fn, const complex double *f, const double *nodes, const double *weights, double tau, int N, int mapsize)
 
void flag_spherlaguerre_mapped_synthesis (complex double *f, const complex double *fn, const double *nodes, int Nnodes, double tau, int N, int mapsize)
 
void flag_spherlaguerre_basis (double *KN, const int N, const double *nodes, int Nnodes, double tau)
 
void flag_spherbessel_sampling (double *nodes, double *weights, double R, int N)
 

Macro Definition Documentation

#define MIN (   a,
 
)    ((a) < (b) ? (a) : (b))

Definition at line 13 of file flag_spherlaguerre.c.

Function Documentation

double eval_laguerre ( double  z,
int  n,
int  alpha 
)

Definition at line 16 of file flag_spherlaguerre.c.

double eval_laguerre_rescaled ( double  z,
int  n,
int  alpha,
double  normfac 
)

Definition at line 30 of file flag_spherlaguerre.c.

long factorial ( int  n)

Definition at line 44 of file flag_spherlaguerre.c.

long factorial_range ( int  min,
int  max 
)

Definition at line 52 of file flag_spherlaguerre.c.

void flag_spherbessel_sampling ( double *  nodes,
double *  weights,
double  R,
int  N 
)

Definition at line 479 of file flag_spherlaguerre.c.

void flag_spherlaguerre_allocate_sampling ( double **  nodes,
double **  weights,
int  N 
)

Allocate spherical Laguerre sampling scheme.

Parameters
[out]nodesNodes of the sampling.
[out]weightsWeights for the SLAG quadrature.
[in]NHarmonic band-limit.
Return values
none

Definition at line 253 of file flag_spherlaguerre.c.

void flag_spherlaguerre_analysis ( double *  fn,
const double *  f,
const double *  nodes,
const double *  weights,
double  tau,
int  N 
)

Perform spherical Laguerre analysis.

Parameters
[out]fnSLAG coefficients.
[in]fInput dataset.
[in]nodesNodes of the sampling.
[in]weightsWeights for the SLAG quadrature.
[in]NHarmonic band-limit.
Return values
none

Definition at line 262 of file flag_spherlaguerre.c.

void flag_spherlaguerre_basis ( double *  KN,
const int  N,
const double *  nodes,
int  Nnodes,
double  tau 
)

Compute the spherical-Laguerre basis functions on a grid of radii

Parameters
[out]KNSynthesised basis function.
[in]NSLAG band-limit.
[in]nodesRadii where the function must be calculated.
[in]NnodesNumber of radii.
Return values
none

Definition at line 443 of file flag_spherlaguerre.c.

void flag_spherlaguerre_mapped_analysis ( complex double *  fn,
const complex double *  f,
const double *  weights,
const double *  nodes,
double  tau,
int  N,
int  mapsize 
)

Perform spherical Laguerre analysis. 3D mapped version - suitable for FLAG transform.

Parameters
[out]fnSLAG coefficients.
[in]fInput dataset.
[in]nodesNodes of the sampling.
[in]weightsWeights for the SLAG quadrature.
[in]mapsizeSize of each layer (L^2 in FLAG).
[in]NHarmonic band-limit.
Return values
none

Definition at line 337 of file flag_spherlaguerre.c.

void flag_spherlaguerre_mapped_synthesis ( complex double *  f,
const complex double *  fn,
const double *  nodes,
int  Nnodes,
double  tau,
int  N,
int  mapsize 
)

Perform spherical Laguerre synthesis. 3D mapped version - suitable for FLAG transform.

Parameters
[out]fSynthesised dataset.
[in]fnInput SLAG coefficients.
[in]nodesNodes of the sampling.
[in]mapsizeSize of each layer (L^2 in FLAG).
[in]NHarmonic band-limit.
Return values
none

Definition at line 389 of file flag_spherlaguerre.c.

void flag_spherlaguerre_quadrature ( double *  roots,
double *  weights,
int  N,
int  alpha 
)

Compute Gauss-Laguerre quadrature (nodes and weights).

Parameters
[out]rootsGauss-Laguerre nodes.
[out]weightsGauss-Laguerre weights.
[in]NHarmonic band-limit.
Return values
none

Definition at line 60 of file flag_spherlaguerre.c.

double flag_spherlaguerre_Rmax ( int  N)

Compute spherical Laguerre maximum R.

Parameters
[in]NHarmonic band-limit.
Return values
RRadial limit / boundary.

Definition at line 160 of file flag_spherlaguerre.c.

void flag_spherlaguerre_sampling ( double *  nodes,
double *  weights,
double  tau,
int  N 
)

Compute spherical Laguerre sampling scheme.

Parameters
[out]nodesNodes of the sampling.
[out]weightsWeights for the SLAG quadrature.
[in]RRadial limit / boundary.
[in]NHarmonic band-limit.
Return values
none

Definition at line 236 of file flag_spherlaguerre.c.

void flag_spherlaguerre_synthesis ( double *  f,
const double *  fn,
const double *  nodes,
int  Nnodes,
double  tau,
int  N 
)

Perform spherical Laguerre synthesis.

Parameters
[out]fSynthesised dataset.
[in]fnInput SLAG coefficients.
[in]nodesNodes of the sampling.
[in]NHarmonic band-limit.
Return values
none

Definition at line 297 of file flag_spherlaguerre.c.

void flag_spherlaguerre_synthesis_gen ( double *  f,
const double *  fn,
const double *  nodes,
int  Nnodes,
double  tau,
int  N,
int  alpha 
)

Definition at line 303 of file flag_spherlaguerre.c.

double flag_spherlaguerre_tau ( double  R,
int  N 
)

Compute spherical Laguerre scaling factor tau.

Parameters
[in]RRadial limit / boundary.
[in]NHarmonic band-limit.
Return values
tauScaling factor for the SLAG sampling.

Definition at line 153 of file flag_spherlaguerre.c.