dlfivefifty / M3M6MethodsOfMathematicalPhysics

Lecture notes for M3M6 Methods of Mathematical Physics
MIT License
39 stars 11 forks source link

command Line() can work in lineintegral #1

Closed Jiaqi-knight closed 5 years ago

Jiaqi-knight commented 5 years ago

In Lecture7, code sum(Fun(f, Line())) is is not working. The error is follows:

MethodError: (::Float64, ::Interval{:closed,:closed,Float64}) is ambiguous. Candidates: (x::Union{Number, AbstractTime}, y::Interval{:closed,:closed,T} where T) in AxisArrays at C:\Users\wjq.julia\packages\AxisArrays\G6pZY\src\intervals.jl:53 (x::Real, d::IntervalSets.AbstractInterval) in DomainSets at C:\Users\wjq.julia\packages\DomainSets\CiahS\src\domains\interval.jl:181 Possible fix, define (::Real, ::Interval{:closed,:closed,T} where T)

Stacktrace: [1] scaleshiftdomain(::Fun{JacobiWeight{Chebyshev{Interval{:closed,:closed,Float64},Float64},Interval{:closed,:closed,Float64},Float64,Int64},Float64,Array{Float64,1}}, ::Float64, ::Float64) at C:\Users\wjq.julia\packages\ApproxFun\OsYW8\src\Extras\specialfunctions.jl:119 [2] /(::Int64, ::Fun{Chebyshev{ChebyshevInterval{Float64},Float64},Float64,Array{Float64,1}}) at C:\Users\wjq.julia\packages\ApproxFun\OsYW8\src\Extras\specialfunctions.jl:158 [3] /(::Int64, ::Fun{Chebyshev{ChebyshevInterval{Float64},Float64},Float64,Array{Float64,1}}) at C:\Users\wjq.julia\packages\ApproxFun\OsYW8\src\Extras\specialfunctions.jl:150 (repeats 2 times) [4] /(::Fun{Chebyshev{ChebyshevInterval{Float64},Float64},Float64,Array{Float64,1}}, ::Fun{Chebyshev{ChebyshevInterval{Float64},Float64},Float64,Array{Float64,1}}) at C:\Users\wjq.julia\packages\ApproxFun\OsYW8\src\Extras\specialfunctions.jl:104 [5] line_fromcanonicalD(::Float64, ::Float64, ::Function) at C:\Users\wjq.julia\packages\ApproxFun\OsYW8\src\Domains\Line.jl:93 [6] fromcanonicalD at C:\Users\wjq.julia\packages\ApproxFun\OsYW8\src\Domains\Line.jl:121 [inlined] [7] fromcanonicalD(::Line{false,Float64}) at C:\Users\wjq.julia\packages\ApproxFun\OsYW8\src\Fun\Fun.jl:190 [8] fromcanonicalD at C:\Users\wjq.julia\packages\ApproxFun\OsYW8\src\Fun\Space.jl:138 [inlined] [9] DefiniteLineIntegral(::Chebyshev{Line{false,Float64},Float64}) at C:\Users\wjq.julia\packages\ApproxFun\OsYW8\src\Operators\functionals\CalculusFunctional.jl:80 [10] DefiniteLineIntegral(::Line{false,Float64}) at C:\Users\wjq.julia\packages\ApproxFun\OsYW8\src\Operators\functionals\CalculusFunctional.jl:29

Jiaqi-knight commented 5 years ago

I have to use -500 .. 500 instead

dlfivefifty commented 5 years ago

Thanks, this looks like a bug in DomainSets.jl, I'll move the issue there.

dlfivefifty commented 5 years ago

Ah, it's fixed on master https://github.com/JuliaApproximation/DomainSets.jl/issues/34

I'll get them to tag a new version.