Fix missing import in finiterectlat-scatter.py
[qpms.git] / qpms / tests / s1_constfacs.c
blobfb01bd5a15004d30b364abc74c99c2c777c7515b
1 #include <qpms/ewald.h>
2 #include <qpms/indexing.h>
3 #include <assert.h>
4 #include <stdio.h>
5 #define LMAX 10
7 int main()
9 qpms_ewald32_constants_t *c = qpms_ewald32_constants_init(LMAX);
10 for (qpms_l_t l = 1; l <= LMAX; ++l)
11 for (qpms_m_t m = -l; m <= l; ++m) {
12 printf("%d %d: (", l, m);
13 qpms_y_t y = qpms_mn2y(m, l);
14 if (0 == (l+m)%2) {
15 for (int j = 0; j <= c->s1_jMaxes[y]; ++j)
16 printf("%.16g %+.16gj, ", creal(c->s1_constfacs[y][j]),
17 cimag(c->s1_constfacs[y][j]));
19 else assert(c->s1_constfacs[y] == NULL);
20 printf(")\n");
22 return 0;