From 3fa3a86066a4663e145546b595de916445940881 Mon Sep 17 00:00:00 2001 From: Ian Jauslin Date: Fri, 31 Jan 2025 15:04:41 -0500 Subject: [PATCH] Bug fix --- src/lyapunov.c | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/src/lyapunov.c b/src/lyapunov.c index 6ed83f6..b496cf6 100644 --- a/src/lyapunov.c +++ b/src/lyapunov.c @@ -221,8 +221,8 @@ int lyapunov_D_step( // compute T lyapunov_T(N1,N2,fftu1,fftu2,fftu3,fftu4,ifft); // save to vect - for(lx=-K1;lx<=K1;lx++){ - for(ly=-K2;ly<=K2;ly++){ + for(lx=0;lx<=K1;lx++){ + for(ly=(lx>0 ? -K2 : 1);ly<=K2;ly++){ tmp4[klookup_sym(lx,ly,K2)]=ifft.fft[klookup(lx,ly,N1,N2)]; } } @@ -664,9 +664,6 @@ int lyapunov_init_tmps( unsigned int algorithm, unsigned int algorithm_lyapunov ){ - // velocity field - *u=calloc(USIZE,sizeof(_Complex double)); - // allocate tmp vectors for computation if(algorithm_lyapunov==ALGORITHM_RK2){ *tmp1=calloc(MATSIZE,sizeof(double));