mirror of
https://igit.ific.uv.es/alramos/latticegpu.jl.git
synced 2025-08-23 07:54:41 +02:00
Merge branch 'master' into 'master'
Master See merge request alramos/latticegpu.jl!8
This commit is contained in:
commit
0abdfa6904
3 changed files with 18 additions and 13 deletions
|
@ -21,7 +21,7 @@ function flw(U, psi, int::FlowIntr{NI,T}, ns::Int64, eps, gp::GaugeParm, dpar::D
|
||||||
force_gauge(ymws, U, int.c0, 1, gp, lp)
|
force_gauge(ymws, U, int.c0, 1, gp, lp)
|
||||||
|
|
||||||
if int.add_zth
|
if int.add_zth
|
||||||
add_zth_term(ymws::YMworkspace, U, lp)
|
YM.add_zth_term(ymws::YMworkspace, U, lp)
|
||||||
end
|
end
|
||||||
|
|
||||||
Nablanabla!(dws.sAp, U, psi, dpar, dws, lp)
|
Nablanabla!(dws.sAp, U, psi, dpar, dws, lp)
|
||||||
|
@ -34,7 +34,7 @@ function flw(U, psi, int::FlowIntr{NI,T}, ns::Int64, eps, gp::GaugeParm, dpar::D
|
||||||
force_gauge(ymws, U, int.c0, 1, gp, lp)
|
force_gauge(ymws, U, int.c0, 1, gp, lp)
|
||||||
|
|
||||||
if int.add_zth
|
if int.add_zth
|
||||||
add_zth_term(ymws::YMworkspace, U, lp)
|
YM.add_zth_term(ymws::YMworkspace, U, lp)
|
||||||
end
|
end
|
||||||
|
|
||||||
Nablanabla!(dws.sp, U, psi, dpar, dws, lp)
|
Nablanabla!(dws.sp, U, psi, dpar, dws, lp)
|
||||||
|
@ -57,7 +57,7 @@ function flw(U, psi, int::FlowIntr{NI,T}, ns::Int64, eps, gp::GaugeParm, dpar::D
|
||||||
force_gauge(ymws, U, int.c0, 1, gp, lp)
|
force_gauge(ymws, U, int.c0, 1, gp, lp)
|
||||||
|
|
||||||
if int.add_zth
|
if int.add_zth
|
||||||
add_zth_term(ymws::YMworkspace, U, lp)
|
YM.add_zth_term(ymws::YMworkspace, U, lp)
|
||||||
end
|
end
|
||||||
rescale_bnd(ymws, lp)
|
rescale_bnd(ymws, lp)
|
||||||
|
|
||||||
|
@ -71,7 +71,7 @@ function flw(U, psi, int::FlowIntr{NI,T}, ns::Int64, eps, gp::GaugeParm, dpar::D
|
||||||
force_gauge(ymws, U, int.c0, 1, gp, lp)
|
force_gauge(ymws, U, int.c0, 1, gp, lp)
|
||||||
|
|
||||||
if int.add_zth
|
if int.add_zth
|
||||||
add_zth_term(ymws::YMworkspace, U, lp)
|
YM.add_zth_term(ymws::YMworkspace, U, lp)
|
||||||
end
|
end
|
||||||
rescale_bnd(ymws, lp)
|
rescale_bnd(ymws, lp)
|
||||||
|
|
||||||
|
@ -162,7 +162,7 @@ function bflw_step!(psi, U, eps, int::FlowIntr, gp::GaugeParm, dpar::DiracParam
|
||||||
force_gauge(ymws, U, int.c0, 1, gp, lp)
|
force_gauge(ymws, U, int.c0, 1, gp, lp)
|
||||||
|
|
||||||
if int.add_zth
|
if int.add_zth
|
||||||
add_zth_term(ymws::YMworkspace, U, lp)
|
YM.add_zth_term(ymws::YMworkspace, U, lp)
|
||||||
end
|
end
|
||||||
|
|
||||||
ymws.mom .= ymws.frc1
|
ymws.mom .= ymws.frc1
|
||||||
|
@ -171,7 +171,7 @@ function bflw_step!(psi, U, eps, int::FlowIntr, gp::GaugeParm, dpar::DiracParam
|
||||||
force_gauge(ymws, U, int.c0, 1, gp, lp)
|
force_gauge(ymws, U, int.c0, 1, gp, lp)
|
||||||
|
|
||||||
if int.add_zth
|
if int.add_zth
|
||||||
add_zth_term(ymws::YMworkspace, U, lp)
|
YM.add_zth_term(ymws::YMworkspace, U, lp)
|
||||||
end
|
end
|
||||||
|
|
||||||
ymws.mom .= int.e0[1].*ymws.mom .+ int.e1[1].*ymws.frc1
|
ymws.mom .= int.e0[1].*ymws.mom .+ int.e1[1].*ymws.frc1
|
||||||
|
@ -184,7 +184,7 @@ function bflw_step!(psi, U, eps, int::FlowIntr, gp::GaugeParm, dpar::DiracParam
|
||||||
force_gauge(ymws, U, int.c0, 1, gp, lp)
|
force_gauge(ymws, U, int.c0, 1, gp, lp)
|
||||||
|
|
||||||
if int.add_zth
|
if int.add_zth
|
||||||
add_zth_term(ymws::YMworkspace, U, lp)
|
YM.add_zth_term(ymws::YMworkspace, U, lp)
|
||||||
end
|
end
|
||||||
|
|
||||||
U .= expm.(U, ymws.frc1, 2*eps*int.r)
|
U .= expm.(U, ymws.frc1, 2*eps*int.r)
|
||||||
|
@ -210,7 +210,7 @@ function bflw_step!(psi, U, eps, int::FlowIntr, gp::GaugeParm, dpar::DiracParam
|
||||||
|
|
||||||
force_gauge(ymws, U, int.c0, 1, gp, lp)
|
force_gauge(ymws, U, int.c0, 1, gp, lp)
|
||||||
if int.add_zth
|
if int.add_zth
|
||||||
add_zth_term(ymws::YMworkspace, U, lp)
|
YM.add_zth_term(ymws::YMworkspace, U, lp)
|
||||||
end
|
end
|
||||||
rescale_bnd(ymws, lp)
|
rescale_bnd(ymws, lp)
|
||||||
|
|
||||||
|
@ -219,7 +219,7 @@ function bflw_step!(psi, U, eps, int::FlowIntr, gp::GaugeParm, dpar::DiracParam
|
||||||
|
|
||||||
force_gaugew(ymws, U, int.c0, 1, gp, lp)
|
force_gaugew(ymws, U, int.c0, 1, gp, lp)
|
||||||
if int.add_zth
|
if int.add_zth
|
||||||
add_zth_term(ymws::YMworkspace, U, lp)
|
YM.add_zth_term(ymws::YMworkspace, U, lp)
|
||||||
end
|
end
|
||||||
rescale_bnd(ymws, lp)
|
rescale_bnd(ymws, lp)
|
||||||
|
|
||||||
|
@ -232,7 +232,7 @@ function bflw_step!(psi, U, eps, int::FlowIntr, gp::GaugeParm, dpar::DiracParam
|
||||||
|
|
||||||
force_gauge(ymws, U, int.c0, 1, gp, lp)
|
force_gauge(ymws, U, int.c0, 1, gp, lp)
|
||||||
if int.add_zth
|
if int.add_zth
|
||||||
add_zth_term(ymws::YMworkspace, U, lp)
|
YM.add_zth_term(ymws::YMworkspace, U, lp)
|
||||||
end
|
end
|
||||||
rescale_bnd(ymws, lp)
|
rescale_bnd(ymws, lp)
|
||||||
|
|
||||||
|
|
|
@ -43,7 +43,7 @@ function propagator!(pro, U, dpar::DiracParam{T}, dws::DiracWorkspace, lp::Space
|
||||||
return niter
|
return niter
|
||||||
end
|
end
|
||||||
|
|
||||||
function propagator!(pro, U, dpar::DiracParam{T}, dws::DiracWorkspace, lp::SpaceParm, maxiter::Int64, tol::Float64, time::Int64) where {T}
|
function propagator!(pro, U, dpar::DiracParam{T}, dws::DiracWorkspace, lp::SpaceParm, maxiter::Int64, tol::Float64, time::Int64, psi0 = nothing) where {T}
|
||||||
|
|
||||||
function krnlg5!(src)
|
function krnlg5!(src)
|
||||||
b=Int64(CUDA.threadIdx().x)
|
b=Int64(CUDA.threadIdx().x)
|
||||||
|
@ -57,6 +57,10 @@ function propagator!(pro, U, dpar::DiracParam{T}, dws::DiracWorkspace, lp::Space
|
||||||
|
|
||||||
pfrandomize!(dws.sp,lp,time)
|
pfrandomize!(dws.sp,lp,time)
|
||||||
|
|
||||||
|
if !isnothing(psi0)
|
||||||
|
psi0 .= Array(dws.sp)
|
||||||
|
end
|
||||||
|
|
||||||
CUDA.@sync begin
|
CUDA.@sync begin
|
||||||
CUDA.@cuda threads=lp.bsz blocks=lp.rsz krnlg5!(dws.sp)
|
CUDA.@cuda threads=lp.bsz blocks=lp.rsz krnlg5!(dws.sp)
|
||||||
end
|
end
|
||||||
|
|
|
@ -1165,11 +1165,12 @@ Computes the force for the gauge flow with Open Boundaries. An aditional factor
|
||||||
is included, see
|
is included, see
|
||||||
|
|
||||||
M. Luescher, S. Schaefer: "Lattice QCD with open boundary conditions and twisted-mass reweighting", Comput.Phys.Commun. 184 (2013) 519,
|
M. Luescher, S. Schaefer: "Lattice QCD with open boundary conditions and twisted-mass reweighting", Comput.Phys.Commun. 184 (2013) 519,
|
||||||
|
|
||||||
for more details.
|
for more details.
|
||||||
|
|
||||||
|
This function is not called inside the code, instead the function rescale_bnd() is called after computing the forces.
|
||||||
|
|
||||||
"""
|
"""
|
||||||
function force_gauge_flw(ymws::YMworkspace, U, c0, cG, gp::GaugeParm, lp::SpaceParm{N,M,BC_OPEN,D}) where {NI,N,M,D}
|
function force_gauge_flw(ymws::YMworkspace, U, c0, cG, gp::GaugeParm, lp::SpaceParm{N,M,BC_OPEN,D}) where {N,M,D}
|
||||||
|
|
||||||
ztw = ztwist(gp, lp)
|
ztw = ztwist(gp, lp)
|
||||||
if abs(c0-1) < 1.0E-10
|
if abs(c0-1) < 1.0E-10
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue