Skip to content

Commit 91673b3

Browse files
authored
Negative lower bandwidth for Jacobi derivative (#96)
1 parent 3c1d5a3 commit 91673b3

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

src/Spaces/Jacobi/JacobiOperators.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,7 @@ end
107107

108108

109109
rangespace(D::ConcreteDerivative{J}) where {J<:Jacobi}=Jacobi(D.space.b+D.order,D.space.a+D.order,domain(D))
110-
bandwidths(D::ConcreteDerivative{J}) where {J<:Jacobi}=0,D.order
110+
bandwidths(D::ConcreteDerivative{J}) where {J<:Jacobi}=-D.order,D.order
111111

112112
getindex(T::ConcreteDerivative{J},k::Integer,j::Integer) where {J<:Jacobi} =
113113
j==k+1 ? eltype(T)((k+1+T.space.a+T.space.b)/complexlength(domain(T))) : zero(eltype(T))

test/JacobiTest.jl

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,8 @@ import ApproxFunOrthogonalPolynomials: jacobip
7474
@testset "Derivative" begin
7575
D=Derivative(Jacobi(0.,1.,Segment(1.,0.)))
7676
@time testbandedoperator(D)
77-
77+
# only one band should be populated
78+
@test bandwidths(D, 1) == -bandwidths(D, 2)
7879

7980
@testset for d in [-1..1, 0..1]
8081
f = Fun(x->x^2, Chebyshev(d))

0 commit comments

Comments
 (0)