Skip to content

Commit 252dbcd

Browse files
authored
ConstantOperator in jacobiweightDerivative (#91)
1 parent ace0678 commit 252dbcd

File tree

1 file changed

+11
-9
lines changed

1 file changed

+11
-9
lines changed

src/JacobiWeightOperators.jl

Lines changed: 11 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -163,27 +163,29 @@ function jacobiweightDerivative(S::JacobiWeight{<:Any,<:ChebyshevInterval})
163163
oneT = oneunit(zeroT)
164164
DSsp = Derivative(S.space)
165165

166-
if S.β == S.α == 0
166+
Sβ, Sα = S.β, S.α
167+
168+
if==== 0
167169
DerivativeWrapper(SpaceOperator(DSsp,S,
168170
JacobiWeight(zeroT,zeroT,rangespace(DSsp))),1)
169-
elseif S.β == 0
171+
elseif == 0
170172
w = Fun(JacobiWeight(zeroT,oneT,ConstantSpace(d)),[1.0])
171173

172-
DDβ0 = -S.α + w*DSsp
173-
rsβ0 = JacobiWeight(zeroT,S.α-1,rangespace(DDβ0))
174+
DDβ0 = ConstantOperator(-Sα) + w*DSsp
175+
rsβ0 = JacobiWeight(zeroT,-1,rangespace(DDβ0))
174176
DerivativeWrapper(SpaceOperator(DDβ0,S,rsβ0),1)
175-
elseif S.α == 0
177+
elseif == 0
176178
w = Fun(JacobiWeight(oneT,zeroT,ConstantSpace(d)),[1.0])
177179

178-
DDα0 = S.β + w*DSsp
179-
rsα0 = JacobiWeight(S.β-1,zeroT,rangespace(DDα0))
180+
DDα0 = ConstantOperator(Sβ) + w*DSsp
181+
rsα0 = JacobiWeight(-1,zeroT,rangespace(DDα0))
180182
DerivativeWrapper(SpaceOperator(DDα0,S,rsα0),1)
181183
else
182184
w = Fun(JacobiWeight(oneT,oneT,ConstantSpace(d)),[1.0])
183185
x=Fun()
184186

185-
DD = S.β*(1-x) - S.α*(1+x) + w*DSsp
186-
rs = JacobiWeight(S.β-1,S.α-1,rangespace(DD))
187+
DD = *(1-x) - *(1+x) + w*DSsp
188+
rs = JacobiWeight(-1,-1,rangespace(DD))
187189
DerivativeWrapper(SpaceOperator(DD,S,rs),1)
188190
end
189191
end

0 commit comments

Comments
 (0)