Skip to content

Commit

Permalink
Update diffusions.jl
Browse files Browse the repository at this point in the history
  • Loading branch information
matthieugomez committed Mar 30, 2020
1 parent daaf777 commit e757f9a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/diffusions.jl
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ function operator_second_order!(T, x, v0::AbstractVector, v1::AbstractVector, v2
fill!(T, 0)
@inbounds for i in 1:n
Δxp =x[min(i, n-1)+1] - x[min(i, n-1)]
Δxm=x[max(i-1, 1) + 1] - x[max(i-1, 1)]
Δxm = x[max(i-1, 1) + 1] - x[max(i-1, 1)]
Δx = (Δxm + Δxp) / 2
# upwinding to ensure off diagonals are posititive
if v1[i] >= 0
Expand Down

0 comments on commit e757f9a

Please sign in to comment.