diff --git a/qpms/translations.c b/qpms/translations.c index c8733e4..87cdd9a 100644 --- a/qpms/translations.c +++ b/qpms/translations.c @@ -290,6 +290,18 @@ complex double qpms_trans_single_B(qpms_normalisation_t norm, return presum * sum; } +void qpms_trans_calculator_free(qpms_trans_calculator *c) { + free(c->A_multipliers[0]); + free(c->A_multipliers); + free(c->B_multipliers[0]); + free(c->B_multipliers); +#ifdef LATTICESUMS + qpms_ewald3_constants_free(e3c); +#endif + free(c->legendre0); + free(c); +} + static inline size_t qpms_trans_calculator_index_mnmunu(const qpms_trans_calculator *c, int m, int n, int mu, int nu){ return c->nelem * qpms_mn2y(m,n) + qpms_mn2y(mu,nu); @@ -380,8 +392,6 @@ void qpms_trans_calculator_multipliers_B( // This is according to the Cruzan-type formula [Xu](59) assert(Qmax == gauntB_Q_max(-m,n,mu,nu)); - - double normlogfac= qpms_trans_normlogfac(norm,m,n,mu,nu); double normfac = qpms_trans_normfac(norm,m,n,mu,nu); /// N<-M type coefficients w.r.t. Kristensson's convention. Csphase has been already taken into acct ^^^. @@ -495,9 +505,6 @@ qpms_trans_calculator } free(qmaxes); -#ifdef LATTICESUMS_OLD - c->hct = hankelcoefftable_init(2*lMax+1); -#endif #ifdef LATTICESUMS32 c->e3c = qpms_ewald3_constants_init(2 * lMax + 1, /*csphase*/ qpms_normalisation_t_csphase(normalisation)); #endif diff --git a/qpms/translations.h b/qpms/translations.h index 893864f..55c4bd3 100644 --- a/qpms/translations.h +++ b/qpms/translations.h @@ -32,10 +32,6 @@ #include #include -#ifdef LATTICESUMS_OLD -#include "bessels.h" -#endif - #if defined LATTICESUMS32 || defined LATTICESUMS31 #include "ewald.h" #endif @@ -83,9 +79,6 @@ typedef struct qpms_trans_calculator { #if defined LATTICESUMS32 || defined LATTICESUMS31 qpms_ewald3_constants_t *e3c; -#endif -#ifdef LATTICESUMS_OLD - complex double *hct; // Hankel function coefficient table #endif double *legendre0; // Zero-argument Legendre functions – this might go outside #ifdef in the end... } qpms_trans_calculator;