mirror of
https://igit.ific.uv.es/alramos/latticegpu.jl.git
synced 2025-05-14 19:23:42 +02:00
Added zeuthen term for SF AFW-B boundary conditions
This commit is contained in:
parent
5336189ad5
commit
e9670762f8
1 changed files with 16 additions and 3 deletions
|
@ -28,6 +28,9 @@ end
|
||||||
function krnl_add_zth!(frc, frc2::AbstractArray{TA}, U::AbstractArray{TG}, lp::SpaceParm{N,M,B,D}) where {TA,TG,N,M,B,D}
|
function krnl_add_zth!(frc, frc2::AbstractArray{TA}, U::AbstractArray{TG}, lp::SpaceParm{N,M,B,D}) where {TA,TG,N,M,B,D}
|
||||||
|
|
||||||
b, r = CUDA.threadIdx().x, CUDA.blockIdx().x
|
b, r = CUDA.threadIdx().x, CUDA.blockIdx().x
|
||||||
|
it = point_time((b, r), lp)
|
||||||
|
|
||||||
|
SFBC = ((B == BC_SF_AFWB) || (B == BC_SF_ORBI) )
|
||||||
|
|
||||||
Ush = @cuStaticSharedMem(TG, D)
|
Ush = @cuStaticSharedMem(TG, D)
|
||||||
Fsh = @cuStaticSharedMem(TA, D)
|
Fsh = @cuStaticSharedMem(TA, D)
|
||||||
|
@ -52,9 +55,19 @@ function krnl_add_zth!(frc, frc2::AbstractArray{TA}, U::AbstractArray{TG}, lp::S
|
||||||
Y = frc[bd,id,rd]
|
Y = frc[bd,id,rd]
|
||||||
Ud = U[bd,id,rd]
|
Ud = U[bd,id,rd]
|
||||||
end
|
end
|
||||||
|
|
||||||
frc2[b,id,r] = (5/6)*Fsh[b] + (1/6)*(projalg(Ud\Y*Ud) +
|
if SFBC
|
||||||
projalg(Ush[b]*X/Ush[b]))
|
if (it > 1) && (it < lp.iL[end])
|
||||||
|
frc2[b,id,r] = (5/6)*Fsh[b] + (1/6)*(projalg(Ud\Y*Ud) +
|
||||||
|
projalg(Ush[b]*X/Ush[b]))
|
||||||
|
elseif (it == lp.iL[end]) && (id < N)
|
||||||
|
frc2[b,id,r] = (5/6)*Fsh[b] + (1/6)*(projalg(Ud\Y*Ud) +
|
||||||
|
projalg(Ush[b]*X/Ush[b]))
|
||||||
|
end
|
||||||
|
else
|
||||||
|
frc2[b,id,r] = (5/6)*Fsh[b] + (1/6)*(projalg(Ud\Y*Ud) +
|
||||||
|
projalg(Ush[b]*X/Ush[b]))
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
return nothing
|
return nothing
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue