mirror of
https://igit.ific.uv.es/alramos/latticegpu.jl.git
synced 2025-05-15 03:33:42 +02:00
Non-seg-fault HMC. Energy not conserved.
This commit is contained in:
parent
5bb4f28c8b
commit
f296fd9768
8 changed files with 172 additions and 40 deletions
36
src/YM/YM.jl
36
src/YM/YM.jl
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue