mirror of
https://igit.ific.uv.es/alramos/latticegpu.jl.git
synced 2025-05-15 03:33:42 +02:00
More work in Scalar models
This commit is contained in:
parent
ae95a278cb
commit
d62fd9fa60
4 changed files with 36 additions and 5 deletions
|
@ -25,10 +25,10 @@ using .Space
|
||||||
export SpaceParm
|
export SpaceParm
|
||||||
export up, dw, updw, global_point
|
export up, dw, updw, global_point
|
||||||
|
|
||||||
include("Fields/Fields.kl")
|
include("Fields/Fields.jl")
|
||||||
|
using .Fields
|
||||||
export vector_field, scalar_field, nscalar_field
|
export vector_field, scalar_field, nscalar_field
|
||||||
|
|
||||||
|
|
||||||
include("YM/YM.jl")
|
include("YM/YM.jl")
|
||||||
|
|
||||||
using .YM
|
using .YM
|
||||||
|
@ -38,5 +38,7 @@ export wfl_euler, wfl_rk3, zfl_euler, zfl_rk3
|
||||||
|
|
||||||
include("Scalar/Scalar.jl")
|
include("Scalar/Scalar.jl")
|
||||||
using .Scalar
|
using .Scalar
|
||||||
|
export ScalarParam, ScalarWorkspace
|
||||||
|
export scalar_action, force_scalar
|
||||||
|
|
||||||
end # module
|
end # module
|
||||||
|
|
|
@ -19,8 +19,8 @@ using ..YM
|
||||||
import Base.show
|
import Base.show
|
||||||
|
|
||||||
struct ScalarParam{N,T}
|
struct ScalarParam{N,T}
|
||||||
kap::Ntuple{N,T}
|
kap::NTuple{N,T}
|
||||||
eta::Ntuple{N,T}
|
eta::NTuple{N,T}
|
||||||
end
|
end
|
||||||
function Base.show(io::IO, sp::ScalarParam{N,T}) where {N,T}
|
function Base.show(io::IO, sp::ScalarParam{N,T}) where {N,T}
|
||||||
|
|
||||||
|
@ -36,3 +36,22 @@ function Base.show(io::IO, sp::ScalarParam{N,T}) where {N,T}
|
||||||
println("\n")
|
println("\n")
|
||||||
|
|
||||||
end
|
end
|
||||||
|
|
||||||
|
struct ScalarWorkspace{T}
|
||||||
|
frc1
|
||||||
|
mom
|
||||||
|
function ScalarWorkspace(::Type{T}, lp::SpaceParm) where {T <: AbstractFloat}
|
||||||
|
|
||||||
|
return ScalarWorkspace(vector_field(SU2fund{T}, lp),
|
||||||
|
vector_field(SU2fund{T}, lp))
|
||||||
|
end
|
||||||
|
end
|
||||||
|
export ScalarWorkspace
|
||||||
|
|
||||||
|
include("ScalarAction.jl")
|
||||||
|
export scalar_action
|
||||||
|
|
||||||
|
include("ScalarForce.jl")
|
||||||
|
export force_scalar
|
||||||
|
|
||||||
|
end
|
||||||
|
|
|
@ -9,7 +9,7 @@
|
||||||
### created: Tue Oct 5 11:53:49 2021
|
### created: Tue Oct 5 11:53:49 2021
|
||||||
###
|
###
|
||||||
|
|
||||||
function scalar_action(U, Phi, lp::SpaceParm, sp::ScalarParm, gp::GaugeParm{T}, ymws::YMworkspace{T})
|
function scalar_action(U, Phi, lp::SpaceParm, sp::ScalarParam, ymws::YMworkspace{T}) where {T <: AbstractFloat}
|
||||||
|
|
||||||
CUDA.@sync begin
|
CUDA.@sync begin
|
||||||
CUDA.@cuda threads=lp.bsz blocks=lp.rsz krnl_act!(ymws.rm, U, Phi, sp, lp)
|
CUDA.@cuda threads=lp.bsz blocks=lp.rsz krnl_act!(ymws.rm, U, Phi, sp, lp)
|
||||||
|
|
|
@ -9,6 +9,16 @@
|
||||||
### created: Wed Oct 6 15:39:07 2021
|
### created: Wed Oct 6 15:39:07 2021
|
||||||
###
|
###
|
||||||
|
|
||||||
|
function force_scalar(ymws::YMworkspace, sws::ScalarWorkspace, U, Phi, sp::ScalarParam, lp::SpaceParm)
|
||||||
|
|
||||||
|
CUDA.@sync begin
|
||||||
|
CUDA.@cuda threads=lp.bsz blocks=lp.rsz krnl_force_scalar!(ymws.frc1,sws.frc,U,Phi,sp,lp)
|
||||||
|
end
|
||||||
|
|
||||||
|
|
||||||
|
return nothing
|
||||||
|
end
|
||||||
|
|
||||||
function krnl_force_scalar!(fgauge, fscalar, U::AbstractArray{TG}, Phi::AbstractArray{TS}, sp::ScalarParam{NP,T}, lp::SpaceParm{N,M,D}) where {TG,TS,NP,T,N,M,D}
|
function krnl_force_scalar!(fgauge, fscalar, U::AbstractArray{TG}, Phi::AbstractArray{TS}, sp::ScalarParam{NP,T}, lp::SpaceParm{N,M,D}) where {TG,TS,NP,T,N,M,D}
|
||||||
|
|
||||||
b, r = CUDA.threadIdx().x, CUDA.blockIdx().x
|
b, r = CUDA.threadIdx().x, CUDA.blockIdx().x
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue