From cda980f7954936142e226fa1bb8fc4742ffd50d8 Mon Sep 17 00:00:00 2001 From: Josh Date: Fri, 17 Mar 2023 17:04:55 -0400 Subject: [PATCH] fixed CorrFunc in modelB_corr --- modelB_corr.jl | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/modelB_corr.jl b/modelB_corr.jl index 872b367..85747d1 100644 --- a/modelB_corr.jl +++ b/modelB_corr.jl @@ -114,10 +114,8 @@ end function CorrFunc(ϕ, L) C = zeros(L÷2+1) - Threads.@threads for r in 1:(L÷2)+1 - for i in 1:L, j in 1:L, k in 1:L - C[r] = C[r] + ϕ[mod(i+r,L)+1,j,k]*ϕ[i,j,k] + ϕ[i,mod(j+r,L)+1,k]*ϕ[i,j,k] + ϕ[i,j,mod(k+r,L)+1]*ϕ[i,j,k] - end + for r in 0:(L÷2), i in 1:L, j in 1:L, k in 1:L + C[r+1] = C[r+1] + ϕ[mod(i+r-1,L)+1,j,k]*ϕ[i,j,k] + ϕ[i,mod(j+r-1,L)+1,k]*ϕ[i,j,k] + ϕ[i,j,mod(k+r-1,L)+1]*ϕ[i,j,k] end C end