Skip to content

Commit

Permalink
refactor: replace second sinpi
Browse files Browse the repository at this point in the history
  • Loading branch information
agdestein committed Sep 24, 2024
1 parent 0d374a6 commit 42a458b
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions src/pressure.jl
Original file line number Diff line number Diff line change
Expand Up @@ -319,9 +319,8 @@ function psolver_spectral(setup)
k = ntuple(d -> reshape(0:Np[d]-1, ntuple(Returns(1), d - 1)..., :), D)

Ahat = fill!(similar(x[1], Complex{T}, Np), 0)
= T(π) # CUDA doesn't like pi
for d = 1:D
@. Ahat += sin(k[d] * / Np[d])^2 / Δx[d]^2
@. Ahat += sinpi(k[d] / Np[d])^2 / Δx[d]^2
end

# Scale with Δx*Δy*Δz, since we solve the PDE in integrated form
Expand Down

0 comments on commit 42a458b

Please sign in to comment.