libftsh
A Fast Transform for Spherical Harmonics
 All Data Structures Files Functions Variables Defines
Defines | Functions
mk_gnode_gweight.c File Reference

Construct the Gaussian nodes and weights. More...

#include "libftsh.h"

Defines

#define ENTEREXIT   0
#define LNOF2   0.693147180559945309417232121458

Functions

void mk_gnode_gweight (REAL *gnode, REAL *gweight, REAL epsilon, int numpts)
void mk_cosi_gnode (REAL *gnode, REAL epsilon, int numpts)
void cosi_gnode_to_gweight (REAL *gweight, REAL *gnode, int numpts)

Detailed Description

Construct the Gaussian nodes and weights.

Summary:


Function Documentation

void cosi_gnode_to_gweight ( REAL gweight,
REAL gnode,
int  numpts 
)

This routine computes the gaussian weights that go with a set of gaussian nodes.

The nodes input here are \(\cos^{-1}(\text{the usual nodes} )\).

INPUTS:

  • gweight -- the array in which to put the gaussian weights. Memory must already be allocated.
  • gnode -- the gausian nodes, theta values between 0 and PI This is \(\cos^{-1}(\text{the usual nodes} )\).
  • numpts -- the order of the weights we compute this is the length of gnode and gweight.

OUTPUTS: numpts values of gweight are filled in

NOTES:

  • We use the Christoffel function method, mainly because we can avoid derivatives.
  • Do I use normalized Pmn?

Here is the caller graph for this function:

void mk_gnode_gweight ( REAL gnode,
REAL gweight,
REAL  epsilon,
int  numpts 
)

This routine constructs the gaussian nodes and weights.

We make cosine inverse of the ordinary gaussian nodes.

INPUTS:

  • gnode -- the array of length numpts in which to put the gaussian nodes. Memory must already be allocated.
  • gweight -- the array in which to put the gaussian weights. Memory must already be allocated.
  • epsilon -- the precision to which to compute the gaussian nodes.
  • numpts -- the order of the nodes and weights we compute this is the length of gnode and gweight.

OUTPUTS:

  • gnode -- the numpts gaussian node values are written on gnode We make cosine inverse of the ordinary gaussian nodes.
  • gweight -- numpts values of gweight are filled in

Here is the call graph for this function:

Here is the caller graph for this function: