From 849f18b5fa84ef4aae3464ee1853b2082cb92cd7 Mon Sep 17 00:00:00 2001 From: sriharshakandala Date: Tue, 18 Jul 2023 17:06:50 -0700 Subject: [PATCH] Bug fix --- src/Operators/finitedifference.jl | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/Operators/finitedifference.jl b/src/Operators/finitedifference.jl index a03c075612..a1489470ef 100644 --- a/src/Operators/finitedifference.jl +++ b/src/Operators/finitedifference.jl @@ -3478,14 +3478,14 @@ function copyto_stencil_kernel!(out, bc, space, bds) #TODO pass in (Nq, Nh)! Nq = 1 Nh = 1 - space = axes(out) - if space isa Spaces.ExtrudedFiniteDifferenceSpace - QS = Spaces.quadrature_style(space) + spaceout = axes(out) + if spaceout isa Spaces.ExtrudedFiniteDifferenceSpace + QS = Spaces.quadrature_style(spaceout) Nq = Quadratures.degrees_of_freedom(QS) - Nh = Topologies.nlocalelems(Spaces.topology(space)) + Nh = Topologies.nlocalelems(Spaces.topology(spaceout)) 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