Commit 6643bf02 authored by Nathanael Schaeffer's avatar Nathanael Schaeffer
Browse files

Fix bug in mul_ct_matrix() introduced in revision 547:32e460a2b1a3 leading to...

Fix bug in mul_ct_matrix() introduced in revision 547:32e460a2b1a3 leading to 2 wrong matrix entries.
parent ed8e01e8
......@@ -67,9 +67,13 @@ DOCUMENTATION:
CHANGE LOG:
-----------
* v2.8.1 (2 Oct 2017)
- Fixed-m Legendre transforms (without fft) support magic-layout.
- Fix bug in `mul_ct_matrix()` introduced in v2.7.
* v2.8 (10 Jul 2017)
- Regular grids are back and improved (on-the-fly + exact quadrature weights).
- merge with shtns-magic, providing optional support for the MagIC code
- Merge with shtns-magic, providing optional support for the MagIC code
with --enable-magic-layout (thanks to Bertrand Putigny)
* v2.7 (24 Feb 2017)
......
......@@ -453,14 +453,15 @@ void mul_ct_matrix(shtns_cfg shtns, double* mx)
{
long int im,l,lm;
double a_1;
mul_ct_matrix_shifted(shtns, mx);
for (int lm=2*NLM-1; lm>0; lm--) mx[lm] = mx[lm-1]; // shift back indices (copy, slow)
mx[0] = 0.0;
mul_ct_matrix_shifted(shtns, mx+1); // shift indices
for (int im=1; im<=MMAX; im++) { // remove the coeff for lmax+1 (for backward compatibility)
int lm = LiM(shtns, im*MRES, im);
mx[2*lm-1] = 0.0; mx[2*lm] = 0.0;
}
mx[NLM-1] = 0.0;
mx[2*NLM-1] = 0.0;
}
/// fill mx with the coefficients of operator sin(theta).d/dtheta
......
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