Skip to content

Commit

Permalink
fixed CorrFunc in modelB_corr
Browse files Browse the repository at this point in the history
  • Loading branch information
joott committed Mar 17, 2023
1 parent 19e3715 commit cda980f
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions modelB_corr.jl
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit cda980f

Please sign in to comment.