Skip to content

Commit

Permalink
Try #1512:
Browse files Browse the repository at this point in the history
  • Loading branch information
bors[bot] authored Oct 23, 2023
2 parents 9c22047 + 586e755 commit 5cf7e98
Showing 1 changed file with 12 additions and 11 deletions.
23 changes: 12 additions & 11 deletions src/Remapping/interpolate_array.jl
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,15 @@ function interpolate_slab(
(I1,)::Tuple{<:AbstractArray},
)
space = axes(field)
x = zero(eltype(field))
QS = Spaces.quadrature_style(space)
Nq = Spaces.Quadratures.degrees_of_freedom(QS)

for i in 1:Nq
ij = CartesianIndex((i,))
x += I1[i] * Operators.get_node(space, field, ij, slabidx)
end
return x
nodes = [
Operators.get_node(space, field, CartesianIndex((i,)), slabidx) for
i in 1:Nq
]

return I1 nodes
end

function interpolate_slab(
Expand All @@ -21,14 +21,15 @@ function interpolate_slab(
(I1, I2)::Tuple{<:AbstractArray, <:AbstractArray},
)
space = axes(field)
x = zero(eltype(field))
QS = Spaces.quadrature_style(space)
Nq = Spaces.Quadratures.degrees_of_freedom(QS)

for j in 1:Nq, i in 1:Nq
ij = CartesianIndex((i, j))
x += I1[i] * I2[j] * Operators.get_node(space, field, ij, slabidx)
end
nodes = [
Operators.get_node(space, field, CartesianIndex((i, j)), slabidx)
for i in 1:Nq, j in 1:Nq
]

x = (I1 * nodes) I2
return x
end

Expand Down

0 comments on commit 5cf7e98

Please sign in to comment.