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

Perform the direct1 spherical harmonic transform. More...

#include "libftsh.h"

Defines

#define ENTEREXIT   0

Functions

void Pm_direct1_analyse (REAL *outcoef, Pm_Direct_d *inmat, REAL *infcn, Pm_1D_Workspace *pmnwork)
void Pm_direct1_synthesize (REAL *outfcn, Pm_Direct_d *inmat, REAL *incoef, Pm_1D_Workspace *pmnwork)

Detailed Description

Perform the direct1 spherical harmonic transform.

Summary:


Function Documentation

void Pm_direct1_analyse ( REAL outcoef,
Pm_Direct_d inmat,
REAL infcn,
Pm_1D_Workspace pmnwork 
)

Expand (analyses) a function into spherical harmonic coefficients.

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

INPUTS:

  • inmat -- The precomuted matrix of Associated Legendre functions of the desired order in Pm_Direct_d 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_direct1_synthesize ( REAL outfcn,
Pm_Direct_d 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 Pm_Direct_d 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: