From ba0d56c36468e614d0eceb99afc5c878b94eda67 Mon Sep 17 00:00:00 2001 From: Thomas White Date: Wed, 25 Nov 2009 13:42:04 +0100 Subject: Make cache for f1f2 work --- src/sfac.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/src/sfac.c b/src/sfac.c index 0c82eb2f..a53b97d1 100644 --- a/src/sfac.c +++ b/src/sfac.c @@ -32,13 +32,16 @@ static double complex get_f1f2(const char *n, double en) char *rval; double last_E, last_f1, last_f2; static char *memo_n[N_MEMO]; - static double memo_en[N_MEMO]; + static int memo_eV[N_MEMO]; static double complex memo_res[N_MEMO]; static int n_memo = 0; + int eV; int i; + eV = (int)rint(J_to_eV(en)); + for ( i=0; i