Randomizes the SU2fund / SU3fund fermion field. If the argument t is present, it only randomizes that time-slice.
"""
function pfrandomize!(f::AbstractArray{Spinor{4,SU3fund{T,2}}},lp::SpaceParm{4,6,BC_PERIODIC,D},t::Int64=0)where{T,D}
function pfrandomize!(f::AbstractArray{Spinor{4,SU3fund{T,N}}},lp::SpaceParm{4,6,BC_PERIODIC,D},t::Int64=0)where{T,D,N}
@timeit"Randomize pseudofermion field"begin
p=ntuple(i->CUDA.randn(Complex{T},lp.bsz,3,lp.rsz),4)# complex generation not suported for Julia 1.5.4
...
...
@@ -143,7 +143,7 @@ function pfrandomize!(f::AbstractArray{Spinor{4, SU3fund{T,2}}}, lp::SpaceParm{4
returnnothing
end
function pfrandomize!(f::AbstractArray{Spinor{4,SU3fund{T,2}}},lp::Union{SpaceParm{4,6,BC_SF_ORBI,D},SpaceParm{4,6,BC_SF_AFWB,D},SpaceParm{4,6,BC_OPEN,D}},t::Int64=0)where{T,D}
function pfrandomize!(f::AbstractArray{Spinor{4,SU3fund{T,N}}},lp::Union{SpaceParm{4,6,BC_SF_ORBI,D},SpaceParm{4,6,BC_SF_AFWB,D},SpaceParm{4,6,BC_OPEN,D}},t::Int64=0)where{T,D,N}
@timeit"Randomize pseudofermion field"begin
p=ntuple(i->CUDA.randn(Complex{T},lp.bsz,3,lp.rsz),4)# complex generation not suported for Julia 1.5.4
...
...
@@ -156,20 +156,20 @@ function pfrandomize!(f::AbstractArray{Spinor{4, SU3fund{T,2}}}, lp::Union{Space
returnnothing
end
function krnl_assign_pf_su3!(f::AbstractArray{Spinor{4,SU3fund{T,2}}},p,lp::SpaceParm,t::Int64)where{T}
function krnl_assign_pf_su3!(f::AbstractArray{Spinor{4,SU3fund{T,N}}},p,lp::SpaceParm,t::Int64)where{T,N}
# Base.zero(::Type{SU3fund{T,2}}) where T <: AbstractFloat = SU3fund{T,2}(Series{Complex{T},2}((zero(Complex{T}),zero(Complex{T}))),Series{Complex{T},2}((zero(Complex{T}),zero(Complex{T}))),Series{Complex{T},2}((zero(Complex{T}),zero(Complex{T}))))
@@ -18,7 +18,7 @@ Saves the fermionic progapator in pro for a source at point `y` with color `c` a
by a random source in spin and color at t = `time`. Returns the number of iterations.
"""
function propagator!(pro,U,dpar::DiracParam{T,SU3fund{T,2}},dws::DiracWorkspace,lp::SpaceParm,maxiter::Int64,tol::Float64,y::NTuple{4,Int64},c::Int64,s::Int64)where{T}
function propagator!(pro,U,dpar::DiracParam{T,SU3fund{T,N},N},dws::DiracWorkspace,lp::SpaceParm,maxiter::Int64,tol::Float64,y::NTuple{4,Int64},c::Int64,s::Int64)where{T,N}
function krnlg5!(src)
b=Int64(CUDA.threadIdx().x)
...
...
@@ -29,9 +29,9 @@ function propagator!(pro, U, dpar::DiracParam{T,SU3fund{T,2}}, dws::DiracWorkspa
@@ -45,7 +45,7 @@ function propagator!(pro, U, dpar::DiracParam{T,SU3fund{T,2}}, dws::DiracWorkspa
returnniter
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,SU3fund{T,N},N},dws::DiracWorkspace,lp::SpaceParm,maxiter::Int64,tol::Float64,time::Int64)where{T,N}
function krnlg5!(src)
b=Int64(CUDA.threadIdx().x)
...
...
@@ -55,7 +55,7 @@ function propagator!(pro, U, dpar::DiracParam{T}, dws::DiracWorkspace, lp::Space
end
@timeit"Propagator computation"begin
fill!(dws.sp,zero(Spinor{4,SU3fund{T,2}}))
fill!(dws.sp,zero(Spinor{4,SU3fund{T,N}}))
pfrandomize!(dws.sp,lp,time)
...
...
@@ -79,7 +79,7 @@ Saves the propagator from the t=0 boundary to the bulk for the SF boundary condi
For the propagator from T to the bulk, use the function Tbndpropagator(U, dpar::DiracParam{T}, dws::DiracWorkspace, lp::SpaceParm{4,6,1,D}, maxiter::Int64, tol::Float64, c::Int64, s::Int64). Returns the number of iterations.
"""
function bndpropagator!(pro,U,dpar::DiracParam{T},dws::DiracWorkspace,lp::SpaceParm{4,6,1,D},maxiter::Int64,tol::Float64,c::Int64,s::Int64)where{T,D}
function bndpropagator!(pro,U,dpar::DiracParam{T,SU3fund{T,N},N},dws::DiracWorkspace,lp::SpaceParm{4,6,1,D},maxiter::Int64,tol::Float64,c::Int64,s::Int64)where{T,D,N}
function krnlg5!(src)
b=Int64(CUDA.threadIdx().x)
...
...
@@ -94,7 +94,7 @@ function bndpropagator!(pro, U, dpar::DiracParam{T}, dws::DiracWorkspace, lp::Sp
@@ -128,7 +128,7 @@ Returns the propagator from the t=T boundary to the bulk for the SF boundary con
For the propagator from t=0 to the bulk, use the function bndpropagator(U, dpar::DiracParam{T}, dws::DiracWorkspace, lp::SpaceParm{4,6,1,D}, maxiter::Int64, tol::Float64, c::Int64, s::Int64). Returns the number of iterations.
"""
function Tbndpropagator!(pro,U,dpar::DiracParam{T},dws::DiracWorkspace,lp::SpaceParm{4,6,1,D},maxiter::Int64,tol::Float64,c::Int64,s::Int64)where{T,D}
function Tbndpropagator!(pro,U,dpar::DiracParam{T,SU3fund{T,N},N},dws::DiracWorkspace,lp::SpaceParm{4,6,1,D},maxiter::Int64,tol::Float64,c::Int64,s::Int64)where{T,D,N}
function krnlg5!(src)
b=Int64(CUDA.threadIdx().x)
...
...
@@ -142,14 +142,14 @@ function Tbndpropagator!(pro, U, dpar::DiracParam{T}, dws::DiracWorkspace, lp::S