Skip to content

Commit 26c780d

Browse files
committed
Fixed type instability in ϕ
1 parent ab37314 commit 26c780d

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/Flow.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
@inline (a,I::CartesianIndex{d},f::AbstractArray{T,d}) where {T,d} = @inbounds f[I]-f[I-δ(a,I)]
22
@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
3+
@inline ϕ(a,I,f) = @inbounds (f[I]+f[I-δ(a,I)])/2
44
@fastmath quick(u,c,d) = median((5c+2d-u)/6,c,median(10c-9u,c,d))
55
@fastmath vanLeer(u,c,d) = (cmin(u,d) || cmax(u,d)) ? c : c+(d-c)*(c-u)/(d-u)
66
@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

Comments
 (0)