Commit 7aac636e authored by Nathanael Schaeffer's avatar Nathanael Schaeffer
Browse files

Fix some documentation and comments (thanks to PW Schuck).

parent 86e95cf9
......@@ -68,6 +68,7 @@ program SHT_example
l = 1
m = 0
lm = shtns_lmidx(shtns_c,l,m)
!-- Set the l=1, m=0 mode to 1.0
Slm(lm)=(1.0_dp,0.0_dp)
!-- Get (l,m) from lm
......@@ -84,6 +85,7 @@ program SHT_example
!-- Spat -> Spec
call spat_to_SH(shtns_c, Sh, Slm)
!-- print S(1,0) to check it 1.0 is recovered.
print*, 'S(1,0)', Slm(lm)
!-- Legendre only for m=0
......
......@@ -1813,8 +1813,8 @@ int shtns_set_grid_auto(shtns_cfg shtns, enum shtns_type flags, double eps, int
* \param shtns is the config created by shtns_create for which the grid will be set.
* \param flags allows to choose the type of transform (see \ref shtns_type) and the spatial data layout (see \ref spat)
* \param eps polar optimization threshold : polar values of Legendre Polynomials below that threshold are neglected (for high m), leading to increased performance (a few percents)
* \param nlat,nphi respectively the number of latitudinal and longitudinal grid points.
* 0 = no polar optimization; 1.e-14 = VERY safe; 1.e-10 = safe; 1.e-6 = aggresive, but still good accuracy.
* \param nlat,nphi respectively the number of latitudinal and longitudinal grid points.
*/
int shtns_set_grid(shtns_cfg shtns, enum shtns_type flags, double eps, int nlat, int nphi)
{
......
......@@ -288,10 +288,10 @@ void SHsphtor_to_spat_cplx(shtns_cfg, cplx *Slm, cplx *Tlm, cplx *Vt, cplx *Vp);
/// \name 3D transforms (combine scalar and vector)
//@{
/// 3D vector transform from spherical coordinates to radial-spheroidal-toroidal spectral components (see \ref vsh_def).
/// They should be prefered over separate calls to scalar and 2D vector transforms as they are often significantly faster.
/// They should be prefered over separate calls to scalar and 2D vector transforms as they can be significantly faster.
void spat_to_SHqst(shtns_cfg, double *Vr, double *Vt, double *Vp, cplx *Qlm, cplx *Slm, cplx *Tlm);
/// 3D vector transform from spherical coordinates to radial-spheroidal-toroidal spectral components (see \ref vsh_def).
/// They should be prefered over separate calls to scalar and 2D vector transforms as they are often significantly faster.
/// 3D vector transform from radial-spheroidal-toroidal spectral components (see \ref vsh_def) to spherical coordinates.
/// They should be prefered over separate calls to scalar and 2D vector transforms as they can be significantly faster.
void SHqst_to_spat(shtns_cfg, cplx *Qlm, cplx *Slm, cplx *Tlm, double *Vr, double *Vt, double *Vp);
void spat_cplx_to_SHqst(shtns_cfg, cplx *Vr, cplx *Vt, cplx *Vp, cplx *Qlm, cplx *Slm, cplx *Tlm);
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment