-
Notifications
You must be signed in to change notification settings - Fork 5
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
JacobiTriangle() expansions failing in strange way #140
Comments
This follow from the type instability of global variable. From your example julia> typeof(K.(α,x,y))
BroadcastQuasiVector{Float64, typeof(K), Tuple{Float64, BroadcastQuasiVector{Float64, typeof(first), Tuple{Inclusion{SVector{2, Float64}, EuclideanUnitSimplex{2, Float64, :closed}}}}, BroadcastQuasiVector{Float64, typeof(last), Tuple{Inclusion{SVector{2, Float64}, EuclideanUnitSimplex{2, Float64, :closed}}}}}} whereas julia> typeof(K.(x,y))
BroadcastQuasiVector{Any, typeof(K), Tuple{BroadcastQuasiVector{Float64, typeof(first), Tuple{Inclusion{SVector{2, Float64}, EuclideanUnitSimplex{2, Float64, :closed}}}}, BroadcastQuasiVector{Float64, typeof(last), Tuple{Inclusion{SVector{2, Float64}, EuclideanUnitSimplex{2, Float64, :closed}}}}}} Note the const α =2.0 it works julia> T \ (@. K(x,y))
ℵ₀-blocked ℵ₀-element LazyBandedMatrices.DiagTrav{Float64, 2, LazyArrays.ApplyArray{Float64, 2, typeof(Base.setindex), Tuple{FillArrays.Zeros{Float64, 2, Tuple{InfiniteArrays.OneToInf{Int64}, InfiniteArrays.OneToInf{Int64}}}, Matrix{Float64}, Base.OneTo{Int64}, Base.OneTo{Int64}}}}:
0.1666666666666667
───────────────────────
0.06666666666666667
0.19999999999999998
───────────────────────
-0.09999999999999999
0.19999999999999993
-6.699811370772778e-18
───────────────────────
0.0
-6.148984834775253e-18
-1.6452652161292338e-18
0.0
───────────────────────
⋮ |
Note I fixed essentially the same bug back in August: JuliaApproximation/ClassicalOrthogonalPolynomials.jl@2e33f50 So I suspect something similar needs to be done here, just need to step through the transforms and see where the promotion to |
There is some strange behavior when expanding functions on triangles, apparently when it comes to globally defined variables? Here is a minimal example:
Any idea what is happening here?
The text was updated successfully, but these errors were encountered: