SHTns 3.6.1
Functions
Special operators

Apply special operators in spectral space: multiplication by cos(theta), sin(theta).d/dtheta. More...

Functions

void mul_ct_matrix (shtns_cfg shtns, double *mx)
 fill mx with the coefficients for multiplication by cos(theta)
 
void st_dt_matrix (shtns_cfg shtns, double *mx)
 fill mx with the coefficients of operator sin(theta).d/dtheta
 
void SH_mul_mx (shtns_cfg shtns, double *mx, cplx *Qlm, cplx *Rlm)
 Multiplication of Qlm by a matrix involving l+1 and l-1 only.
 

Detailed Description

Apply special operators in spectral space: multiplication by cos(theta), sin(theta).d/dtheta.

Function Documentation

◆ mul_ct_matrix()

void mul_ct_matrix ( shtns_cfg  shtns,
double *  mx 
)

fill mx with the coefficients for multiplication by cos(theta)

compute the matrix (stored in mx, a double array of size 2*NLM) required to multiply an SH representation by cos(theta) using SH_mul_mx.

Parameters
mx: an array of 2*NLM double that will be filled with the matrix coefficients. xq[lm] = mx[2*lm] * q[lm-1] + mx[2*lm+1] * q[lm+1];

◆ SH_mul_mx()

void SH_mul_mx ( shtns_cfg  shtns,
double *  mx,
cplx Qlm,
cplx Rlm 
)

Multiplication of Qlm by a matrix involving l+1 and l-1 only.

Apply a matrix involving l+1 and l-1 to an SH representation Qlm. Result stored in Rlm (must be different from Qlm).

The result is stored in Rlm, which MUST be different from Qlm. mx is an array of 2*NLM values as returned by mul_ct_matrix or st_dt_matrix compute: Rlm[lm] = mx[2*lm] * Qlm[lm-1] + mx[2*lm+1] * Qlm[lm+1];

◆ st_dt_matrix()

void st_dt_matrix ( shtns_cfg  shtns,
double *  mx 
)

fill mx with the coefficients of operator sin(theta).d/dtheta

compute the matrix (stored in mx, a double array of size 2*NLM) required to apply sin(theta)*d/dtheta to an SH representation using SH_mul_mx.

Parameters
mx: an array of 2*NLM double that will be filled with the matrix coefficients. stdq[lm] = mx[2*lm] * q[lm-1] + mx[2*lm+1] * q[lm+1];