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

Perform the fast1 spherical harmonic transform. More...

#include "libftsh.h"

Defines

#define ENTEREXIT   0

Functions

void Pm_1d_analyse (REAL *outcoef, Pm_1D *inmat, REAL *infcn, Pm_1D_Workspace *pmnwork)
void Pm_1d_synthesize (REAL *outfcn, Pm_1D *inmat, REAL *incoef, Pm_1D_Workspace *pmnwork)

Detailed Description

Perform the fast1 spherical harmonic transform.

Summary:


Function Documentation

void Pm_1d_analyse ( REAL outcoef,
Pm_1D inmat,
REAL infcn,
Pm_1D_Workspace pmnwork 
)

Expands (analyses) a function into spherical harmonic coefficients.

This routine only does one order (m) so it is really only an Associaded Legendre Function analyser.

INPUTS:

  • inmat -- The precomuted matrix of Associated Legendre functions of the desired order in compressed Pm_1D format
  • infcn -- an array of REALs to hold the function to expand. Its length is encoded in the number of columns in inmat.
  • pmnwork -- a structure that holds workspace and a few global precomputed values.

OUTPUTS: outcoef -- an array of the coefficients computed. The information on how many of these to compute is encoded by the number of rows in inmat.

NOTES:

  • We could check that (numbas[0]==numbas[1])||(numbas[0]==numbas[1]+1)
  • ?UNROLL the parity LOOP ONCE DEBUGGED?

Here is the call graph for this function:

void Pm_1d_synthesize ( REAL outfcn,
Pm_1D inmat,
REAL incoef,
Pm_1D_Workspace pmnwork 
)

Evaluates (synthesizes) a function from spherical harmonic coefficients.

This routine only does one order (m) so it is really only an Associaded Legendre Function synthesizer.

INPUTS:

  • inmat -- The precomuted matrix of Associated Legendre functions of the desired order in compressed Pm_1D format
  • incoef -- an array of the coefficients to use. The information on how many of these to use is encoded by the number of rows in inmat.
  • pmnwork -- a structure that holds workspace and a few global precomputed values

OUTPUTS: outfcn -- an array of REALs to hold the computed function. Its length is encoded in the number of columns in inmat.

NOTES:

  • we could check that (numbas[0]==numbas[1])||(numbas[0]==numbas[1]+1)

Here is the call graph for this function: