Commit c6ef0917 authored by Alberto Ramos's avatar Alberto Ramos

Added main program to read lex confs and analyze them

parent 4d2d7ff9
###
### "THE BEER-WARE LICENSE":
### Alberto Ramos wrote this file. As long as you retain this
### notice you can do whatever you want with this stuff. If we meet some
### day, and you think this stuff is worth it, you can buy me a beer in
### return. <alberto.ramos@cern.ch>
###
### file: sfwfl.jl
### created: Sat Nov 13 23:14:40 2021
###
using LatticeGPU, ArgParse, Printf
function parse_commandline()
s = ArgParseSettings()
@add_arg_table s begin
"-c"
help = "configuration"
required = true
arg_type = String
end
@add_arg_table s begin
"-L"
help = "L/a"
required = true
arg_type = Int64
end
@add_arg_table s begin
"-T"
help = "T/a"
required = true
arg_type = Int64
end
return parse_args(s)
end
parsed_args = parse_commandline()
fconf = parsed_args["c"]
parsed_args = parse_commandline()
l = parsed_args["L"]
t = parsed_args["T"]
println(" ## Analizing configuration: ", fconf)
lp = SpaceParm{4}((l,l,l,t), (4,4,4,4), BC_SF_AFWB, (0 for i in 1:6))
println(lp)
U, Ubnd = import_lex64(fconf, lp)
gp = GaugeParm{Float64, SU3, 3}(6.0, 0.0, (1.0,1.0), 3, Ubnd)
println(gp)
wflw = wfl_rk3(Float64, 0.01, 1.0E-7)
zflw = zfl_rk3(Float64, 0.01, 1.0E-7)
println(zflw)
println(" ## ")
ymws = YMworkspace(SU3, Float64, lp)
println(" # Plaquette: ", plaquette(U, lp, gp, ymws))
flw_ns = round((0.3*l)^2/(8*wflw.eps)/10)
Ecl = Array{Float64, 2}(undef, lp.iL[end], 6)
Epl = Array{Float64, 2}(undef, lp.iL[end], 6)
Qt = Vector{Float64}(undef, lp.iL[end])
println(wflw)
ymws.U1 .= U
for j in 1:flw_ns
Eoft_plaq(Epl, U, gp, lp, ymws)
Eoft_clover(Ecl, U, gp, lp, ymws)
Qtop(Qt, U, gp, lp, ymws)
t = j*wflw.eps
@printf(" FLOW t=%8.4f: %20.12e %20.12e %10.4e \n",
t, t^2*sum(Epl), t^2*sum(Ecl), sum(Qt))
flw(U, wflw, 10, gp, lp, ymws)
end
U = ymws.U1
println(zflw)
ymws.U1 .= U
for j in 1:flw_ns
Eoft_plaq(Epl, U, gp, lp, ymws)
Eoft_clover(Ecl, U, gp, lp, ymws)
Qtop(Qt, U, gp, lp, ymws)
t = j*zflw.eps
@printf(" FLOW t=%8.4f: %20.12e %20.12e %10.4e \n",
t, t^2*sum(Epl), t^2*sum(Ecl), sum(Qt))
flw(U, zflw, 10, gp, lp, ymws)
end
U = ymws.U1
println(" # Plaquette: ", plaquette(U, lp, gp, ymws))
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