From a7e74d7bf4f7d61bcb1dbbc076a80d2c00d98480 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marek=20Ne=C4=8Dada?= Date: Thu, 17 May 2018 06:02:05 +0300 Subject: [PATCH] Minor tweak Former-commit-id: 3e8bcfa06b17bd6defa0a60f0f394d9ef4cf14a8 --- qpms/apps/hexlattice_ewald.c | 4 ++-- qpms/translations.c | 2 ++ 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/qpms/apps/hexlattice_ewald.c b/qpms/apps/hexlattice_ewald.c index 346bbdd..e8bc873 100644 --- a/qpms/apps/hexlattice_ewald.c +++ b/qpms/apps/hexlattice_ewald.c @@ -12,7 +12,7 @@ #include "translations.h" #define MAXOMEGACOUNT 1000 -#define MAXKCOUNT 10000 +#define MAXKCOUNT 100 const double s3 = 1.732050807568877293527446341505872366942805253810380628055; // IMPORTANT: lattice properties here @@ -177,7 +177,7 @@ int main (int argc, char **argv) { fclose(f); */ - int kcount = 1000; + int kcount = MAXKCOUNT; for (int i = 0; i < kcount; ++i) { klist[i].x = 0; klist[i].y = 2. * 4. * M_PI / 3. / LATTICE_A / kcount * i; diff --git a/qpms/translations.c b/qpms/translations.c index ae29c19..f5963b1 100644 --- a/qpms/translations.c +++ b/qpms/translations.c @@ -1091,7 +1091,9 @@ int qpms_trans_calculator_get_AB_arrays_buf(const qpms_trans_calculator *c, size_t desti = 0, srci = 0; for (int n = 1; n <= c->lMax; ++n) for (int m = -n; m <= n; ++m) { for (int nu = 1; nu <= c->lMax; ++nu) for (int mu = -nu; mu <= nu; ++mu) { +#ifndef NDEBUG size_t assertindex = qpms_trans_calculator_index_mnmunu(c,m,n,mu,nu); +#endif assert(assertindex == desti*c->nelem + srci); *(Adest + deststride * desti + srcstride * srci) = qpms_trans_calculator_get_A_precalcbuf(c,m,n,mu,nu,