new observables, ScalarObs.jl

This commit is contained in:
Guilherme telo 2021-10-19 18:23:04 +02:00
parent 42e539c9bd
commit d0c463637f
3 changed files with 113 additions and 1 deletions

View file

@ -10,7 +10,7 @@ lp = SpaceParm{4}((64,64,64,64), (4,4,4,4))
gp = GaugeParm(6.0, 1.0, (0.0,0.0), 2)
sp = ScalarParm((0.2,0.3), (1.0,0.4))
NSC = length(sp.kap)
NSC = length(sp.kap) #number of scalars = # of k coupling
println("Space Parameters: ", lp)
println("Gauge Parameters: ", gp)
println("Scalar Parameters: ", sp)
@ -38,6 +38,10 @@ println("Allocating scalar field")
Phi = nscalar_field(SCL{PREC}, NSC, lp)
fill!(Phi, zero(SCL{PREC}))
#initialize observables
watch = Obs( PREC, lp, sp, gp )
println("Initial Action: ")
@time S = gauge_action(U, lp, gp, ymws) + scalar_action(U, Phi, lp, sp, ymws)
@ -47,6 +51,10 @@ ns = 20
println("## Thermalization")
pl = Vector{Float64}()
rho2_v = Vector{Float64}()
lphi_v = Vector{Float64}()
lalpha_v = Vector{Float64}()
for i in 1:10
@time dh, acc = HMC!(U,Phi, dt,ns,lp, gp, sp, ymws, sws, noacc=true)
println("# HMC: ", acc, " ", dh)
@ -60,4 +68,9 @@ for i in 1:10
println("# HMC: ", acc, " ", dh)
push!(pl, plaquette(U,lp, gp, ymws))
println("# Plaquette: ", pl[end], "\n")
#measure
(rho2, lphi, lalpha) = updt_obs!(watch, U, Phi, sp, lp)
push!(rho2_v,rho2)
push!(lphi_v,lphi)
push!(lalpha_v,lalpha)
end