First attempt for OBC

parent 8d880e20
......@@ -3,24 +3,26 @@ user = "Lattice_user"
name = "Run1L32"
[Space]
bc = OPEN # Either OPEN, PERIODIC, SF_AFWB or SF_ORBI
size = [32,32,32,32]
blocks = [4,4,4,4]
[HMC]
nth = 5000
beta = 6.0
c0 = 1.0
cG = 1.0
dmeas = 5
eps = 0.01
ns = 30
[Fermion]
beta = 6.0
kappa = 0.1348
theta = 0.0
theta_t= 3.1415926535897
theta_t = 3.1415926535897
csw = 1.76923076923077
ct = 9.8718528389891003e-01
Cfl = 0.5734
tsource = 16
[Measurements]
N_noise = 12
......
......@@ -55,9 +55,9 @@ Stores in global variables the needed structures, i.e. lp, gp, dpar, dws, ymws
function load_structs()
CUDA.device!(parsed_args["G"])
global lp = SpaceParm{4}(tuple(params["Space"]["size"]...), tuple(params["Space"]["blocks"]...),0, (0,0,0,0,0,0))
global gp = GaugeParm{Float64}(SU3{Float64},params["Fermion"]["beta"],1.0,(0.0,0.0),(0.0,0.0),lp.iL);
global dpar = DiracParam{Float64}(SU3fund,(1/(2*params["Fermion"]["kappa"])) - 4,params["Fermion"]["csw"],ntuple(i -> exp(((i!=4)*im*params["Fermion"]["theta"]/lp.iL[i]) + ((i==4)*im*params["Fermion"]["theta_t"]/lp.iL[i])),4),1.0);
global lp = SpaceParm{4}(tuple(params["Space"]["size"]...), tuple(params["Space"]["blocks"]...),"BC_"*params["Space"]["bc"], (0,0,0,0,0,0))
global gp = GaugeParm{Float64}(SU3{Float64},params["HMC"]["beta"],params["HMC"]["c0"],(params["HMC"]["cG"],0.0),(0.0,0.0),lp.iL);
global dpar = DiracParam{Float64}(SU3fund,(1/(2*params["Fermion"]["kappa"])) - 4,params["Fermion"]["csw"],ntuple(i -> exp(((i!=4)*im*params["Fermion"]["theta"]/lp.iL[i]) + ((i==4)*im*params["Fermion"]["theta_t"]/lp.iL[i])),4),0.0,params["Fermion"]["ct"]);
global dws = DiracWorkspace(SU3fund,Float64,lp);
global ymws = YMworkspace(SU3,Float64,lp);
global int = wfl_rk3(Float64, 0.1, 1.0)
......
......@@ -91,7 +91,7 @@ function load_gauge_field()
global U,_ = read_cnfg(CONFIG_LIST[MCid])
else
println(log_file,"\nReading gauge field with CERN convention: ", CONFIG_LIST[MCid], "...")
global U = read_cnfg_cern(CONFIG_LIST[MCid],lp)
global U = import_cern64(CONFIG_LIST[MCid],0,lp,log=false)
end
println(log_file,"Updated to Gauge configuration n"*string(MCid))
......
......@@ -39,14 +39,16 @@ function two_pt()
println(log_file,"Measuring 2pt...")
flush(log_file)
Eoft[1] = Eoft_plaq(U, gp, lp, ymws) : nothing
for noi in 1:N_noise
propagator!(psi,U, dpar, dws, lp,params["Measurements"]["maxiter"], params["Measurements"]["tolerance"],1)
propagator!(psi,U, dpar, dws, lp,params["Measurements"]["maxiter"], params["Measurements"]["tolerance"],params["Fermion"]["tsource"])
pp_density .= Array(norm2.(psi))
ap_density .= Array(dot.(psi,dmul.(Gamma{4},psi)))
noi == 1 ? Eoft[1] = Eoft_plaq(U, gp, lp, ymws) : nothing
pp_corr_t0[:,noi] .= zero(Float64)
ap_corr_t0[:,noi] .= zero(ComplexF64)
......
......@@ -32,6 +32,7 @@ function read_ff(name::String)
TvecC = Vector{ComplexF64}(undef,iL[4]);
CN = Vector{ComplexF64}(undef,1);
RN = Vector{Float64}(undef,1);
ET = Vector{ComplexF64}(undef,nflow+1);
pp_corr = Array{Float64}(undef,1,iL[4],N_noise);
ap_corr = Array{ComplexF64}(undef,1,iL[4],N_noise);
......@@ -40,7 +41,7 @@ function read_ff(name::String)
Sigma = Array{ComplexF64}(undef,1,N_noise,nflow);
Phat_t = Array{Float64}(undef,1,N_noise,nflow);
Sigma_cfl = Array{ComplexF64}(undef,1,N_noise,nflow);
Eoft = Array{Complex{Float64}}(undef,1+nflow);
Eoft = Array{Complex{Float64}}(undef,1,1+nflow);
pp_corr_mc = Array{Float64}(undef,0,iL[4],N_noise);
ap_corr_mc = Array{ComplexF64}(undef,0,iL[4],N_noise);
......@@ -79,7 +80,8 @@ function read_ff(name::String)
Phat_t[1,noi,fl]= RN[1]
end
end
BDIO_read(file,Eoft)
BDIO_read(file,ET)
Eoft[1,:] .= ET
Eoft_mc=[Eoft_mc;Eoft]
pp_corr_mc=[pp_corr_mc;pp_corr]
......@@ -103,7 +105,7 @@ end
"""
function uwff(file::String)
Loads in the variables 'Epft', 'pp_corr', 'ap_corr', 'pp_corr_t','ap_corr_t', 'Sigma' and 'Sigma_cfl' the corresponding
Loads in the variables 'Eoft', 'pp_corr', 'ap_corr', 'pp_corr_t','ap_corr_t', 'Sigma' and 'Sigma_cfl' the corresponding
'uwreal' quantities. The indices are, when corresponding, eucliden time and flow times
"""
function uwff(file::String)
......@@ -114,7 +116,7 @@ function uwff(file::String)
Ns = size(pp_corr_mc)[3]
Nfl = size(pp_corr_t_mc)[4]
global Eoft = [uwreal(real.(Eoft_mc[:,i]),runame) for i in 1:T+1]
global Eoft = [uwreal(real.(Eoft_mc[:,i]),runame) for i in 1:Nfl+1]
global pp_corr = [uwreal(sum(pp_corr_mc,dims = 3)[:,i,1]./Ns,runame) for i in 1:T]
global ap_corr = [uwreal(real.(sum(ap_corr_mc,dims = 3)[:,i,1]./Ns),runame) for i in 1:T]
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment