Bug fixes

Former-commit-id: b3b375cec2e2bb0379ab20b36e3c2fef7473f409
This commit is contained in:
Marek Nečada 2017-04-20 10:31:02 +03:00
parent da193c1450
commit 3509d4d6ac
2 changed files with 31 additions and 3 deletions

View File

@ -134,7 +134,7 @@ cdef void loop_D_iiiidddii_As_D_lllldddbl(char **args, np.npy_intp *dims, np.npy
<int>(<np.npy_bool*>ip7)[0],
<int>(<np.npy_long*>ip8)[0],
)
(<double *>op0)[0] = <double>ov0
(<cdouble *>op0)[0] = <cdouble>ov0
ip0 += steps[0]
ip1 += steps[1]
ip2 += steps[2]

View File

@ -49,9 +49,9 @@ int qpms_sph_bessel_array(qpms_bessel_t typ, int lmax, double x, complex double
if(retval) return retval;
retval = gsl_sf_bessel_yl_array(lmax, x, tmparr);
if (typ==QPMS_HANKEL_PLUS)
for (int l = 0; l <= lmax; ++l) result_array[l] *= I * tmparr[l];
for (int l = 0; l <= lmax; ++l) result_array[l] += I * tmparr[l];
else
for (int l = 0; l <= lmax; ++l) result_array[l] *=-I * tmparr[l];
for (int l = 0; l <= lmax; ++l) result_array[l] +=-I * tmparr[l];
return retval;
break;
default:
@ -171,3 +171,31 @@ complex double qpms_trans_single_B_Taylor_ext(int m, int n, int mu, int nu,
sph_t kdlj = {kdlj_r, kdlj_theta, kdlj_phi};
return qpms_trans_single_B_Taylor(m,n,mu,nu,kdlj,r_ge_d,J);
}
#if 0
typedef struct qpms_trans_calculator {
int lMax;
size_t nelem;
double **A_coeffs;
double **B_coeffs;
// TODO enum normalization
} qpms_trans_calculator;
static inline size_t qpms_mn2y(int m, int n) {
return (size_t) n * (n + 1) + m - 1;
}
static inline size_t qpms_trans_calculator__indexcalc(const qpms_trans_calculator *c,
int m, int n, int mu, int nu){
return c->nelem * qpms_mn2y(m,n) + qpms_mn2y(mu,nu);
}
struct qpms_trans_calculator
*qpms_trans_calculator_init_Taylor (int lMax) {
qpms_trans_calculator *c = malloc(sizeof(qpms_trans_calculator));
c->lMax = lMax;
c->nelem = lMax * (lMax+2);
c->A_coeffs = malloc((1+c->nelem) * sizeof(double *));
c->B_coeffs = malloc((1+c->nelem) * sizeof(double *));
#endif