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

Load precomputed data for direct1 transform. More...

#include "libftsh.h"

Defines

#define ENTEREXIT   0

Functions

void direct1_fromfile (int *numpts_ptr, int *band_limit_ptr, REAL **node_ptr, REAL **weight_ptr, Pm_Direct_d **pmn_matrix_ptr, Pm_1D_Workspace *pmnwork, FILE *fp)
void load_direct1 (int *numpts_ptr, int *band_limit_ptr, REAL **node_ptr, REAL **weight_ptr, Pm_Direct_d **pmn_matrix_ptr, FILE *fp)

Detailed Description

Load precomputed data for direct1 transform.

Summary:


Function Documentation

void direct1_fromfile ( int *  numpts_ptr,
int *  band_limit_ptr,
REAL **  node_ptr,
REAL **  weight_ptr,
Pm_Direct_d **  pmn_matrix_ptr,
Pm_1D_Workspace pmnwork,
FILE *  fp 
)

This routine loads the initialization dumped by dump_direct1, interprets it and does all the set-up necessary to do the synthesis or analysis transform.

INPUTS: fp -- the objects are read from the file pointed to by fp, in binary format. The file must be opened before calling this routine.

OUTPUTS:

  • numpts -- the number of points on the full interval.
  • band_limit -- the bound on the degree of the expansion. In \(P^m_n\) notation this bounds n.
  • node -- an array of length numpts with the nodes, usually Arcsin of the usual gaussian nodes.
  • weight -- an array of length numpts with the quadrature weights
  • pmn_matrix -- an array of band_limit (==order_limit) Pm_Direct_d structures, each representing the matrix for one m.
  • pmn_work -- a structure holding workspace and other precomputed values used by the transform, independent of m

NOTES:

  • node and weight are not needed for the synthesis/analysis routines but are provided here for other uses.

Here is the call graph for this function:

void load_direct1 ( int *  numpts_ptr,
int *  band_limit_ptr,
REAL **  node_ptr,
REAL **  weight_ptr,
Pm_Direct_d **  pmn_matrix_ptr,
FILE *  fp 
)

This routine loads the initialization dumped by dump_direct1 We interpret what we read and re-align pointers and such to get things ready to use

INPUTS: fp -- the objects are read from the file pointed to by fp, in binary format. The file must be opened before calling this routine.

OUTPUTS:

  • numpts -- the number of points on the full interval.
  • band_limit -- the bound on the degree of the expansion. In P^m_n notation this bounds n.
  • node -- an array of length numpts with the nodes, usually Arcsin of the usual gaussian nodes.
  • weights -- an array of length numpts with the quadrature weights
  • pmn_matrix -- an array of band_limit (==order_limit) Pm_Direct_d structures, each representing the matrix for one m.

Here is the call graph for this function:

Here is the caller graph for this function: