Skip to content
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

Ultraspherical{BigFloat} expansion broken #54

Open
dlfivefifty opened this issue Jul 28, 2021 · 0 comments
Open

Ultraspherical{BigFloat} expansion broken #54

dlfivefifty opened this issue Jul 28, 2021 · 0 comments

Comments

@dlfivefifty
Copy link
Member

Solutions:

  1. Use GenericLinearAlgebra.jl
  2. Use Chebyshev->Ultraspherical transform
julia> C = Ultraspherical{BigFloat}(2)
Ultraspherical{BigFloat, Int64}

julia> x = axes(C,2)
OneToInf()

julia> C \ exp.(x)^C

julia> x = axes(C,1)
Inclusion(-1.0..1.0 (Chebyshev))

julia> C \ exp.(x)
ERROR: MethodError: no method matching eigen!(::SymTridiagonal{BigFloat, Vector{BigFloat}})
Closest candidates are:
  eigen!(::StridedMatrix{T}; permute, scale, sortby) where T<:Union{Float32, Float64} at /Users/sheehanolver/Projects/julia-1.6/usr/share/julia/stdlib/v1.6/LinearAlgebra/src/eigen.jl:148
  eigen!(::StridedMatrix{T}; permute, scale, sortby) where T<:Union{ComplexF32, ComplexF64} at /Users/sheehanolver/Projects/julia-1.6/usr/share/julia/stdlib/v1.6/LinearAlgebra/src/eigen.jl:171
  eigen!(::StridedMatrix{T}, ::StridedMatrix{T}; sortby) where T<:Union{Float32, Float64} at /Users/sheehanolver/Projects/julia-1.6/usr/share/julia/stdlib/v1.6/LinearAlgebra/src/eigen.jl:427
  ...
Stacktrace:
  [1] eigen(A::SymTridiagonal{BigFloat, Vector{BigFloat}})
    @ LinearAlgebra ~/Projects/julia-1.6/usr/share/julia/stdlib/v1.6/LinearAlgebra/src/tridiag.jl:281
  [2] eigen(A::LazyBandedMatrices.SymTridiagonal{BigFloat, FillArrays.Zeros{BigFloat, 1, Tuple{Base.OneTo{Int64}}}, Vector{BigFloat}})
    @ LazyBandedMatrices ~/.julia/packages/LazyBandedMatrices/IX6Zy/src/tridiag.jl:723
  [3] golubwelsch(X::LazyBandedMatrices.Tridiagonal{BigFloat, Vector{BigFloat}, FillArrays.Zeros{BigFloat, 1, Tuple{Base.OneTo{Int64}}}, Vector{BigFloat}})
    @ ClassicalOrthogonalPolynomials ~/Projects/ClassicalOrthogonalPolynomials.jl/src/ClassicalOrthogonalPolynomials.jl:287
  [4] golubwelsch(V::QuasiArrays.SubQuasiArray{BigFloat, 2, Ultraspherical{BigFloat, Int64}, Tuple{Inclusion{BigFloat, ChebyshevInterval{BigFloat}}, Base.OneTo{Int64}}, false})
    @ ClassicalOrthogonalPolynomials ~/Projects/ClassicalOrthogonalPolynomials.jl/src/ClassicalOrthogonalPolynomials.jl:292
  [5] factorize(L::QuasiArrays.SubQuasiArray{BigFloat, 2, Ultraspherical{BigFloat, Int64}, Tuple{Inclusion{BigFloat, ChebyshevInterval{BigFloat}}, Base.OneTo{Int64}}, false})
    @ ClassicalOrthogonalPolynomials ~/Projects/ClassicalOrthogonalPolynomials.jl/src/ClassicalOrthogonalPolynomials.jl:304
  [6] transform_ldiv(A::QuasiArrays.SubQuasiArray{BigFloat, 2, Ultraspherical{BigFloat, Int64}, Tuple{Inclusion{BigFloat, ChebyshevInterval{BigFloat}}, Base.OneTo{Int64}}, false}, B::QuasiArrays.BroadcastQuasiVector{BigFloat, typeof(exp), Tuple{Inclusion{BigFloat, ChebyshevInterval{BigFloat}}}}, #unused#::Tuple{Infinities.InfiniteCardinal{1}, Int64})
    @ ContinuumArrays ~/Projects/ContinuumArrays.jl/src/bases/bases.jl:255
  [7] transform_ldiv(A::QuasiArrays.SubQuasiArray{BigFloat, 2, Ultraspherical{BigFloat, Int64}, Tuple{Inclusion{BigFloat, ChebyshevInterval{BigFloat}}, Base.OneTo{Int64}}, false}, B::QuasiArrays.BroadcastQuasiVector{BigFloat, typeof(exp), Tuple{Inclusion{BigFloat, ChebyshevInterval{BigFloat}}}})
    @ ContinuumArrays ~/Projects/ContinuumArrays.jl/src/bases/bases.jl:256
  [8] copy(L::ArrayLayouts.Ldiv{ContinuumArrays.SubBasisLayout, LazyArrays.BroadcastLayout{typeof(exp)}, QuasiArrays.SubQuasiArray{BigFloat, 2, Ultraspherical{BigFloat, Int64}, Tuple{Inclusion{BigFloat, ChebyshevInterval{BigFloat}}, Base.OneTo{Int64}}, false}, QuasiArrays.BroadcastQuasiVector{BigFloat, typeof(exp), Tuple{Inclusion{BigFloat, ChebyshevInterval{BigFloat}}}}})
    @ ContinuumArrays ~/Projects/ContinuumArrays.jl/src/bases/bases.jl:262
  [9] materialize
    @ ~/.julia/packages/ArrayLayouts/3lnt1/src/ldiv.jl:22 [inlined]
 [10] ldiv
    @ ~/.julia/packages/ArrayLayouts/3lnt1/src/ldiv.jl:86 [inlined]
 [11] \
    @ ~/Projects/QuasiArrays.jl/src/matmul.jl:34 [inlined]
 [12] adaptivetransform_ldiv(A::Ultraspherical{BigFloat, Int64}, f::QuasiArrays.BroadcastQuasiVector{BigFloat, typeof(exp), Tuple{Inclusion{BigFloat, ChebyshevInterval{BigFloat}}}})
    @ ClassicalOrthogonalPolynomials ~/Projects/ClassicalOrthogonalPolynomials.jl/src/ClassicalOrthogonalPolynomials.jl:92
 [13] transform_ldiv(A::Ultraspherical{BigFloat, Int64}, f::QuasiArrays.BroadcastQuasiVector{BigFloat, typeof(exp), Tuple{Inclusion{BigFloat, ChebyshevInterval{BigFloat}}}}, #unused#::Tuple{Infinities.InfiniteCardinal{1}, Infinities.InfiniteCardinal{0}})
    @ ClassicalOrthogonalPolynomials ~/Projects/ClassicalOrthogonalPolynomials.jl/src/ClassicalOrthogonalPolynomials.jl:62
 [14] transform_ldiv(A::Ultraspherical{BigFloat, Int64}, B::QuasiArrays.BroadcastQuasiVector{BigFloat, typeof(exp), Tuple{Inclusion{BigFloat, ChebyshevInterval{BigFloat}}}})
    @ ContinuumArrays ~/Projects/ContinuumArrays.jl/src/bases/bases.jl:256
 [15] copy(L::ArrayLayouts.Ldiv{ContinuumArrays.BasisLayout, LazyArrays.BroadcastLayout{typeof(exp)}, Ultraspherical{BigFloat, Int64}, QuasiArrays.BroadcastQuasiVector{BigFloat, typeof(exp), Tuple{Inclusion{BigFloat, ChebyshevInterval{BigFloat}}}}})
    @ ContinuumArrays ~/Projects/ContinuumArrays.jl/src/bases/bases.jl:262
 [16] materialize(M::ArrayLayouts.Ldiv{ContinuumArrays.BasisLayout, LazyArrays.BroadcastLayout{typeof(exp)}, Ultraspherical{BigFloat, Int64}, QuasiArrays.BroadcastQuasiVector{BigFloat, typeof(exp), Tuple{Inclusion{BigFloat, ChebyshevInterval{BigFloat}}}}})
    @ ArrayLayouts ~/.julia/packages/ArrayLayouts/3lnt1/src/ldiv.jl:22
 [17] ldiv
    @ ~/.julia/packages/ArrayLayouts/3lnt1/src/ldiv.jl:86 [inlined]
 [18] \(A::Ultraspherical{BigFloat, Int64}, B::QuasiArrays.BroadcastQuasiVector{BigFloat, typeof(exp), Tuple{Inclusion{BigFloat, ChebyshevInterval{BigFloat}}}})
    @ QuasiArrays ~/Projects/QuasiArrays.jl/src/matmul.jl:34
 [19] top-level scope
    @ REPL[130]:1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant