We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent ab37314 commit 26c780dCopy full SHA for 26c780d
src/Flow.jl
@@ -1,6 +1,6 @@
1
@inline ∂(a,I::CartesianIndex{d},f::AbstractArray{T,d}) where {T,d} = @inbounds f[I]-f[I-δ(a,I)]
2
@inline ∂(a,I::CartesianIndex{m},u::AbstractArray{T,n}) where {T,n,m} = @inbounds u[I+δ(a,I),a]-u[I,a]
3
-@inline ϕ(a,I,f) = @inbounds (f[I]+f[I-δ(a,I)])*0.5
+@inline ϕ(a,I,f) = @inbounds (f[I]+f[I-δ(a,I)])/2
4
@fastmath quick(u,c,d) = median((5c+2d-u)/6,c,median(10c-9u,c,d))
5
@fastmath vanLeer(u,c,d) = (c≤min(u,d) || c≥max(u,d)) ? c : c+(d-c)*(c-u)/(d-u)
6
@inline ϕu(a,I,f,u,λ=quick) = @inbounds u>0 ? u*λ(f[I-2δ(a,I)],f[I-δ(a,I)],f[I]) : u*λ(f[I+δ(a,I)],f[I],f[I-δ(a,I)])
0 commit comments