diff --git a/src/corr.jl b/src/corr.jl index 3a87321..9427a6f 100644 --- a/src/corr.jl +++ b/src/corr.jl @@ -11,7 +11,7 @@ using BenchmarkTools function fP_fun() cf = Vector{Complex{Float64}}(undef,lp.iL[4]) for t in 1:lp.iL[4] - fP[t] = 0.0 + cf[t] = 0.0 for i in 1:lp.iL[1] for j in 1:lp.iL[2] for k in 1:lp.iL[3] b,r = point_index(CartesianIndex{lp.ndim}((i,j,k,t)),lp) cf[t] += (norm2(A11[b,r]) + norm2(A21[b,r]) + norm2(A31[b,r]) + norm2(A12[b,r]) + norm2(A22[b,r]) + norm2(A32[b,r]))/prod(lp.iL[1:3]) @@ -48,7 +48,7 @@ function gP_fun() end -function ga_fun() +function gA_fun() cf = Vector{Complex{Float64}}(undef,lp.iL[4]) for t in 1:lp.iL[4] cf[t] = 0.0 @@ -61,7 +61,7 @@ function ga_fun() return cf end -function kv_fun() +function kV_fun() cf = Vector{Complex{Float64}}(undef,lp.iL[4]) for t in 1:lp.iL[4] cf[t] = 0.0 @@ -79,7 +79,7 @@ function kv_fun() end -function lv_fun() +function lV_fun() cf = Vector{Complex{Float64}}(undef,lp.iL[4]) for t in 1:lp.iL[4] cf[t] = 0.0 @@ -97,7 +97,7 @@ function lv_fun() end -function kt_fun() +function kT_fun() cf = Vector{Complex{Float64}}(undef,lp.iL[4]) for t in 1:lp.iL[4] cf[t] = 0.0 @@ -115,7 +115,7 @@ function kt_fun() end -function lt_fun() +function lT_fun() cf = Vector{Complex{Float64}}(undef,lp.iL[4]) for t in 1:lp.iL[4] cf[t] = 0.0 @@ -150,63 +150,70 @@ function compute_correlators() println("Computing f1...") file = open("./output/"*basename(parsed_args["c"])*".f1","w+") global f1 = f1_fun() - println(file," ",f1) + println(file,f1) flush(file) close(file) println("Computing k1...") file = open("./output/"*basename(parsed_args["c"])*".k1","w+") global k1 = k1_fun() - println(file," ",k1) + println(file,k1) flush(file) close(file) println("Computing fP...") file = open("./output/"*basename(parsed_args["c"])*".fP","w+") global fP = fP_fun() - println(file," ",fP) + println(file,fP) flush(file) close(file) println("Computing fA...") file = open("./output/"*basename(parsed_args["c"])*".fA","w+") global fA = fA_fun() + println(file,fA) flush(file) close(file) println("Computing gP...") file = open("./output/"*basename(parsed_args["c"])*".gP","w+") - global gP = gp_fun() + global gP = gP_fun() + println(file,gP) flush(file) close(file) println("Computing gA...") file = open("./output/"*basename(parsed_args["c"])*".gA","w+") - global gA = ga_fun() + global gA = gA_fun() + println(file,gA) flush(file) close(file) println("Computing kV...") file = open("./output/"*basename(parsed_args["c"])*".kV","w+") - global kv = kv_fun() + global kV = kV_fun() + println(file,kV) flush(file) close(file) println("Computing lV...") file = open("./output/"*basename(parsed_args["c"])*".lV","w+") - global lv = lv_fun() + global lV = lV_fun() + println(file,lV) flush(file) close(file) println("Computing kT...") file = open("./output/"*basename(parsed_args["c"])*".kT","w+") - global kt = kt_fun() + global kT = kT_fun() + println(file,kT) flush(file) close(file) println("Computing lT...") file = open("./output/"*basename(parsed_args["c"])*".lT","w+") - global lt = lt_fun() + global lT = lT_fun() + println(file,lT) flush(file) close(file)