Non-seg-fault HMC. Energy not conserved.

This commit is contained in:
Alberto Ramos 2021-07-17 18:43:33 +02:00
parent 5bb4f28c8b
commit f296fd9768
8 changed files with 172 additions and 40 deletions

View file

@ -12,14 +12,46 @@
module YM
using CUDA, Random, StructArrays
using ..Space
using ..Groups
struct GaugeParm
beta::Float64
cG::Tuple{Float64,Float64}
ng::Int32
end
export GaugeParm
include("YMact.jl")
export krnl_plaq!
include("YMfields.jl")
export field, randomn!, zero!, norm2
struct YMworkspace
frc1
frc2
mom
U1
cm # complex of volume
function YMworkspace(::Type{T}, lp::SpaceParm) where {T <: Union{Group,Algebra}}
if (T == SU2)
f1 = field(SU2alg, lp)
f2 = field(SU2alg, lp)
mm = field(SU2alg, lp)
u1 = field(SU2, lp)
cs = zeros(ComplexF64,lp.iL...)
rs = zeros(Float64, lp.iL...)
return new(f1, f2, mm, u1, replace_storage(CuArray, cs))
end
return nothing
end
end
export YMworkspace
include("YMact.jl")
export krnl_plaq!, force0_wilson!
include("YMhmc.jl")
export gauge_action, hamiltonian, HMC!, OMF4!
end