From 9ea487df84606ef7b6441125f33be791b6ac71df Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marek=20Ne=C4=8Dada?= Date: Mon, 19 Aug 2019 09:29:14 +0300 Subject: [PATCH] translations.c return accidentally deleted function, remove more legacy stuff Former-commit-id: 6bb2033234a893e85a0242c10156a700bd2d3ceb --- qpms/translations.c | 17 ++++++++++++----- qpms/translations.h | 7 ------- 2 files changed, 12 insertions(+), 12 deletions(-) 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;