@@ -65,7 +65,9 @@ function Integral(sp::Ultraspherical{<:Any,<:IntervalOrSegment}, m::Number)
65
65
ConcreteIntegral (sp,m)
66
66
else # Convert up
67
67
nsp = Ultraspherical (m,domain (sp))
68
- IntegralWrapper (ConcreteIntegral (nsp,m)* Conversion (sp,nsp),m)
68
+ Integralop = ConcreteIntegral (nsp,m)
69
+ C = Conversion (sp,nsp)
70
+ IntegralWrapper (Integralop * C, m, sp, rangespace (Integralop))
69
71
end
70
72
end
71
73
@@ -100,8 +102,10 @@ linesum(f::Fun{<:Ultraspherical{LT,DD}}) where {LT,DD<:IntervalOrSegment} =
100
102
sum (setcanonicaldomain (f))* arclength (d)/ 2
101
103
102
104
103
- rangespace (D:: ConcreteIntegral{<:Ultraspherical{LT,DD}} ) where {LT,DD<: IntervalOrSegment } =
104
- order (domainspace (D)) == 1 ? Chebyshev (domain (D)) : Ultraspherical (order (domainspace (D))- D. order,domain (D))
105
+ function rangespace (D:: ConcreteIntegral{<:Ultraspherical{LT,DD}} ) where {LT,DD<: IntervalOrSegment }
106
+ k = order (domainspace (D))- D. order
107
+ k == 0 ? Chebyshev (domain (D)) : Ultraspherical (k, domain (D))
108
+ end
105
109
106
110
function getindex (Q:: ConcreteIntegral{<:Ultraspherical{LT,DD}} ,k:: Integer ,j:: Integer ) where {LT,DD<: IntervalOrSegment }
107
111
T= eltype (Q)
@@ -112,7 +116,12 @@ function getindex(Q::ConcreteIntegral{<:Ultraspherical{LT,DD}},k::Integer,j::Int
112
116
113
117
if λ == 1 && k== j+ 1
114
118
C = complexlength (d)/ 2
115
- strictconvert (T,C./ (k- 1 ))
119
+ strictconvert (T, C/ (k- 1 ))
120
+ elseif λ == m && k == j + m
121
+ C = complexlength (d)/ 2
122
+ U1toC = C/ (k- 1 )
123
+ UmtoU1 = pochhammer (one (T)* λ,- (m- 1 ))* (complexlength (d)/ 4 )^ (m- 1 )
124
+ strictconvert (T, U1toC * UmtoU1)
116
125
elseif λ > 1 && k== j+ m
117
126
strictconvert (T,pochhammer (one (T)* λ,- m)* (complexlength (d)/ 4 )^ m)
118
127
else
300
309
301
310
# TODO : include in getindex to speed up
302
311
function Integral (sp:: Chebyshev{DD} ,m:: Integer ) where {DD<: IntervalOrSegment }
303
- IntegralWrapper (TimesOperator ([Integral (Ultraspherical (m,domain (sp)),m),
304
- Conversion (sp,Ultraspherical (m,domain (sp)))]),m)
312
+ usp = Ultraspherical (m,domain (sp))
313
+ I = Integral (usp,m)
314
+ C = Conversion (sp,usp)
315
+ T = TimesOperator (I, C)
316
+ IntegralWrapper (T, m, sp, sp)
305
317
end
306
318
307
319
0 commit comments