libftsh
A Fast Transform for Spherical Harmonics
|
Compute point values of P^m_n Associated Legendre Functions. More...
#include "libftsh.h"
Defines | |
#define | ENTEREXIT 0 |
#define | LNOF2 0.693147180559945309417232121458 |
Functions | |
REAL | Pmncos (int order, int index, REAL phi) |
void | Pmncos_resave_init (Pmncos_Recurrence_Save *pmn_save, REAL *node, int numpts) |
void | Pmncos_resave_destroy (Pmncos_Recurrence_Save *pmn_save) |
void | next_rtsinPmncos (REAL *out, Pmncos_Recurrence_Save *pmn_save, int halfpts, int order, int index) |
Compute point values of P^m_n Associated Legendre Functions.
Summary:
void next_rtsinPmncos | ( | REAL * | out, |
Pmncos_Recurrence_Save * | pmn_save, | ||
int | halfpts, | ||
int | order, | ||
int | index | ||
) |
Do one step in the recurrence process then output the results.
This saves on memory if we are trying to compress all associated Legendre fcns of some order. This version is super stabilized for all conditions.
INPUTS:
OUTPUTS : results are output in outfcn, above
USAGE: You must call this function for successive values of index, starting at 0. Order must remain fixed.
NOTES:
Evaluate an associated Legendre function P^m_n at any point.
This routine is super stabilized for all conditions.
INPUTS:
OUTPUTS: returns \(cP^m_n(\cos(\phi))\) with c to make L^2 normalized.
m P (cos(phi)) * const n
The constant is set so we are L^2 normalized. Since the number of points to be used is not known, we cannot adjust for the discretization.
NOTES:
void Pmncos_resave_destroy | ( | Pmncos_Recurrence_Save * | pmn_save | ) |
destroy (free) a structure Pmncos_Recurrence_Save
INPUTS: pmn_save -- the structure to free
OUTPUTS : The memory held by pmn_save is freed
void Pmncos_resave_init | ( | Pmncos_Recurrence_Save * | pmn_save, |
REAL * | node, | ||
int | numpts | ||
) |
Converts a set of nodes (often gaussian) to the initialization needed for the associated legendre function recurrence.
INPUTS:
OUTPUTS : This function creates memory for the arrays in pmn_save and initializes some values.