Skip to content

Commit

Permalink
typo fix
Browse files Browse the repository at this point in the history
  • Loading branch information
zjwegert committed Apr 6, 2024
1 parent dbb13b0 commit 7253fc4
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/Advection.jl
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ function reinit!(::FirstOrderStencil{2,T},φ_new,φ,vel,Δt,Δx,isperiodic,cache
# Sign approximation
∇⁺ .= @. (D⁺ʸ - D⁻ʸ)/(2Δy); ~yperiodic ? ∇⁺[:,[1,end]] .= zero(T) : 0;
∇⁻ .= @. (D⁺ˣ - D⁻ˣ)/(2Δx); ~xperiodic ? ∇⁻[[1,end],:] .= zero(T) : 0;
ϵₛ = maximum((Δx,Δy))
ϵₛ = minimum((Δx,Δy))
vel .= @. φ/sqrt^2 + ϵₛ^2*(∇⁺^2+∇⁻^2))
# Forward (+) & Backward (-)
D⁺ʸ .= @. (D⁺ʸ - φ)/Δy; ~yperiodic ? D⁺ʸ[:,end] .= zero(T) : 0;
Expand Down Expand Up @@ -129,7 +129,7 @@ function reinit!(::FirstOrderStencil{3,T},φ_new,φ,vel,Δt,Δx,isperiodic,cache
∇⁻ .= @. (D⁺ˣ - D⁻ˣ)/(2Δx); ~xperiodic ? ∇⁻[[1,end],:,:] .= zero(T) : 0;
∇⁺ .= @. ∇⁺^2+∇⁻^2 # |∇φ|² (partially computed)
∇⁻ .= @. (D⁺ᶻ - D⁻ᶻ)/(2Δz); ~xperiodic ? ∇⁻[:,:,[1,end]] .= zero(T) : 0;
ϵₛ = maximum((Δx,Δy))
ϵₛ = minimum((Δx,Δy,Δz))
vel .= @. φ/sqrt^2 + ϵₛ^2*(∇⁺+∇⁻^2))
# Forward (+) & Backward (-)
D⁺ʸ .= (D⁺ʸ - φ)/Δy; ~yperiodic ? D⁺ʸ[:,end,:] .= zero(T) : 0;
Expand Down

0 comments on commit 7253fc4

Please sign in to comment.