Skip to content

Commit

Permalink
Bug fix
Browse files Browse the repository at this point in the history
  • Loading branch information
sriharshakandala committed Jul 19, 2023
1 parent b15fe7d commit 37a22f1
Showing 1 changed file with 4 additions and 11 deletions.
15 changes: 4 additions & 11 deletions src/Operators/finitedifference.jl
Original file line number Diff line number Diff line change
Expand Up @@ -3458,12 +3458,14 @@ function Base.copyto!(
strip_space(bc, space),
axes(out),
bounds,
Nq,
Nh,
)
#--------------------------------
return out
end

function copyto_stencil_kernel!(out, bc, space, bds)
function copyto_stencil_kernel!(out, bc, space, bds, Nq, Nh)
#=
i = threadIdx().x
j = threadIdx().y
Expand All @@ -3475,17 +3477,8 @@ function copyto_stencil_kernel!(out, bc, space, bds)
bid = blockIdx().x
nthreads = blockDim().x # # of threads per block
gid = tid + (bid - 1) * nthreads
#TODO pass in (Nq, Nh)!
Nq = 1
Nh = 1
space = axes(out)
if space isa Spaces.ExtrudedFiniteDifferenceSpace
QS = Spaces.quadrature_style(space)
Nq = Quadratures.degrees_of_freedom(QS)
Nh = Topologies.nlocalelems(Spaces.topology(space))
end
nitems = Nq * Nq * Nh
if gid < nitems
if gid nitems
h = cld(gid, Nq * Nq)
j = cld(gid - (h - 1) * Nq * Nq, Nq)
i = gid - (h - 1) * Nq * Nq - (j - 1) * Nq
Expand Down

0 comments on commit 37a22f1

Please sign in to comment.