Skip to content

Commit fd9fdaa

Browse files
committed
ladder operators
1 parent 12935ec commit fd9fdaa

File tree

2 files changed

+56
-5
lines changed

2 files changed

+56
-5
lines changed

src/rect.jl

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,13 @@
1+
"""
2+
KronPolynomial(A, B, C...)
3+
4+
represents the kronecker product of `A`, `B`, …. In particular, if `K = KronPolynomial(A,B)` and `U` is an infinite
5+
matrix of coefficients we have
6+
``
7+
K[SVector(x,y),:]'DiagTrav(U) == A[x,:]'U*B[y,:]
8+
``
9+
"""
10+
111
struct KronPolynomial{d, T, PP} <: MultivariateOrthogonalPolynomial{d, T}
212
args::PP
313
end

test/test_rectdisk.jl

Lines changed: 46 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
using MultivariateOrthogonalPolynomials, StaticArrays, BlockArrays, BlockBandedMatrices, ArrayLayouts, Base64,
22
QuasiArrays, Test, ClassicalOrthogonalPolynomials, BandedMatrices, FastTransforms, LinearAlgebra
3-
import MultivariateOrthogonalPolynomials: dunklxu_raising, dunklxu_lowering, AngularMomentum
3+
import MultivariateOrthogonalPolynomials: dunklxu_raising, dunklxu_lowering, AngularMomentum, coefficients, basis
44
using ForwardDiff
55

66
@testset "Dunkl-Xu disk" begin
@@ -114,12 +114,53 @@ using ForwardDiff
114114
x,y = 𝐱 = SVector(0.1,0.2)
115115
ρ = sqrt(1-x^2)
116116
ρ′ = -x/ρ
117-
n,k = 3,1
118-
P = DunklXuDisk()
117+
n,k = 4,2
118+
β = 0
119+
P = DunklXuDisk(β)
119120
K = Block(n+1)[k+1]
120-
@test Jacobi(k+1/2,k+1/2)[x,n-k+1] * ρ^k * diff(Legendre())[y/ρ,k+1] ρ * diff(P,(0,1))[ 𝐱 ,K]
121+
@test P[𝐱,K] Jacobi(k+1/2,k+1/2)[x,n-k+1] * ρ^k * Legendre()[y/ρ,k+1]
122+
@test Jacobi(k+1/2,k+1/2)[x,n-k+1] * ρ^k * diff(Legendre())[y/ρ,k+1] ρ * diff(P,(0,1))[𝐱 ,K]
121123
@test diff(Jacobi(k+1/2,k+1/2))[x,n-k+1] * ρ^(k+1) * Legendre()[y/ρ,k+1] -k*ρ′*P[𝐱,K] + y*ρ′*diff(P,(0,1))[𝐱,K] + ρ * diff(P,(1,0))[𝐱,K]
122124

123-
125+
dunklxudisk(n, k, β, γ, x, y) = jacobip(n-k, k+β+γ+1/2, k+β+γ+1/2, x)* (1-x^2)^(k/2) * jacobip(k, β, β, y/sqrt(1-x^2))
126+
127+
A = coefficients(diff(Jacobi(k+1/2,k+1/2)))
128+
B = Jacobi(1,1)\diff(Legendre())
129+
# M₀₁
130+
@test diff(P,(0,1))[𝐱 ,K] Jacobi(k-1+3/2,k-1+3/2)[x,n-k+1] * ρ^(k-1) * Jacobi(1,1)[y/ρ,k]B[k,k+1] DunklXuDisk(1)[𝐱,Block(n)[k]]B[k,k+1] dunklxudisk(n-1,k-1,1,0,x,y)B[k,k+1]
131+
# M₀₂
132+
@test (k+1)*Legendre()[x,k+1] + (1+x)*diff(Legendre())[x,k+1] (k+1)*Jacobi(1,0)[x,k+1] #L₄
133+
@test (k+1)*Legendre()[y/ρ,k+1] + (1+y/ρ)*diff(Legendre())[y/ρ,k+1] (k+1)*Jacobi(1,0)[y/ρ,k+1]
134+
@test (k+1)*P[𝐱,K] + (1+y/ρ)*ρ *diff(P,(0,1))[𝐱 ,K] (k+1)*Jacobi(k+1/2,k+1/2)[x,n-k+1] * ρ^k * Jacobi(1,0)[y/ρ,k+1]
135+
# M₀₄
136+
@test -(1-x)*(k+1)*Legendre()[x,k+1] - (1-x^2)*diff(Legendre())[x,k+1] 2*(k+1)*Jacobi(-1,0)[x,k+2] #L₄
137+
@test -(1-y/ρ)*(k+1)*P[𝐱,K] - (1-y^2/ρ^2)*ρ *diff(P,(0,1))[𝐱 ,K] 2*(k+1)*Jacobi(k+1/2,k+1/2)[x,n-k+1] * ρ^k * Jacobi(-1,0)[y/ρ,k+2]
138+
# M₁₀
139+
@test diff(Jacobi(k+1/2,k+1/2))[x,n-k+1] (n+k+2)/2 * Jacobi(k+3/2,k+3/2)[x,n-k]
140+
@test 1/ρ * (-k*ρ′*P[𝐱,K] + y*ρ′*diff(P,(0,1))[𝐱,K] + ρ * diff(P,(1,0))[𝐱,K]) (n+k+2)/2 * Jacobi(k+3/2,k+3/2)[x,n-k] * ρ^k * Legendre()[y/ρ,k+1] (n+k+2)/2 * dunklxudisk(n-1,k,0,1,x,y)
141+
# M₆₀
142+
@test (k+1/2)*Jacobi(k+1/2,k+1/2)[x,n-k+1] + (1+x)*diff(Jacobi(k+1/2,k+1/2))[x,n-k+1] (n+1/2)*Jacobi(k+3/2,k-1/2)[x,n-k+1] # L₆
143+
@test (k+1/2)*Jacobi(k+1/2,k+1/2)[x,n-k+1]* ρ^k * Legendre()[y/ρ,k+1] + (1+x)*diff(Jacobi(k+1/2,k+1/2))[x,n-k+1]* ρ^k * Legendre()[y/ρ,k+1] (n+1/2)*Jacobi(k+3/2,k-1/2)[x,n-k+1]* ρ^k * Legendre()[y/ρ,k+1]
144+
@test (k+1/2)*P[𝐱,K] + (1+x)/ρ*( -k*ρ′*P[𝐱,K] + y*ρ′*diff(P,(0,1))[𝐱,K] + ρ * diff(P,(1,0))[𝐱,K]) (n+1/2)*Jacobi(k+3/2,k-1/2)[x,n-k+1] * ρ^k * Legendre()[y/ρ,k+1]
145+
# M₀₁'
146+
@test -(1-x^2)*diff(Legendre())[x,k+1] 2*(k+1)*Jacobi(-1+eps(),-1+eps())[x,k+2] #L₁'
147+
@test -(1-y^2/ρ^2)*diff(Legendre())[y/ρ,k+1] 2*(k+1)*Jacobi(-1+eps(),-1+eps())[y/ρ,k+2]
148+
@test -(1-y^2/ρ^2)* ρ^2 * diff(P,(0,1))[𝐱 ,K] 2*(k+1)*Jacobi(k+1/2,k+1/2)[x,n-k+1] * ρ^(k+1) *Jacobi(-1+eps(),-1+eps())[y/ρ,k+2] 2*(k+1)*dunklxudisk(n+1,k+1,-1+eps(),0,x,y)
149+
# M₀₂'
150+
@test (1-x)*k*Legendre()[x,k+1] - (1-x^2)*diff(Legendre())[x,k+1] 2*k*Jacobi(-1,0)[x,k+1] #L₂'
151+
@test (1-y/ρ)*k*Legendre()[y/ρ,k+1] - (1-y^2/ρ^2)*diff(Legendre())[y/ρ,k+1] 2*k*Jacobi(-1,0)[y/ρ,k+1]
152+
@test (1-y/ρ)*k*Jacobi(k+1/2,k+1/2)[x,n-k+1] * ρ^k * Legendre()[y/ρ,k+1] - (1-y^2/ρ^2)*Jacobi(k+1/2,k+1/2)[x,n-k+1] * ρ^k * diff(Legendre())[y/ρ,k+1] 2*k*Jacobi(k+1/2,k+1/2)[x,n-k+1] * ρ^k * Jacobi(-1,0)[y/ρ,k+1] #L₂'
153+
@test (1-y/ρ)*k*P[𝐱,K] - (1-y^2/ρ^2)*ρ *diff(P,(0,1))[𝐱 ,K] 2*k*Jacobi(k+1/2,k+1/2)[x,n-k+1] * ρ^k * Jacobi(-1,0)[y/ρ,k+1]
154+
# M₀₄'
155+
@test -k*Legendre()[x,k+1] + (1+x)*diff(Legendre())[x,k+1] k*Jacobi(1,0)[x,k] #L₄'
156+
@test -k*P[𝐱,K] + (1+y/ρ)*ρ *diff(P,(0,1))[𝐱 ,K] k*Jacobi(k+1/2,k+1/2)[x,n-k+1] * ρ^k * Jacobi(1,0)[y/ρ,k]
157+
# M₁₀'
158+
@test ((1+x)*(n-k+1/2) - (1-x)*(n-k+1/2))*Jacobi(k+1/2,k+1/2)[x,n-k+1] - (1-x^2)*diff(Jacobi(k+1/2,k+1/2))[x,n-k+1] 2*(n-k+1)*Jacobi(k-1/2,k-1/2)[x,n-k+2] # L₁'
159+
@test ((1+x)*(n-k+1/2) - (1-x)*(n-k+1/2))*P[𝐱,K] - (1-x^2)/ρ * (-k*ρ′*P[𝐱,K] + y*ρ′*diff(P,(0,1))[𝐱,K] + ρ * diff(P,(1,0))[𝐱,K]) 2*(n-k+1)*Jacobi(k-1/2,k-1/2)[x,n-k+2]* ρ^k * Legendre()[y/ρ,k+1]
160+
# M₆₀'
161+
@test (k+1/2)*Jacobi(k+1/2,k+1/2)[x,n-k+1]-(1-x)*diff(Jacobi(k+1/2,k+1/2))[x,n-k+1] (n+1/2)*Jacobi(k-1/2,k+3/2)[x,n-k+1] # L₆'
162+
@test (k+1/2)*P[𝐱,K]-(1-x)/ρ * (-k*ρ′*P[𝐱,K] + y*ρ′*diff(P,(0,1))[𝐱,K] + ρ * diff(P,(1,0))[𝐱,K]) (n+1/2)*Jacobi(k-1/2,k+3/2)[x,n-k+1]* ρ^k * Legendre()[y/ρ,k+1]
163+
164+
# d/dx = M₁₀M₀₂ + M₀₄'M₆₀'
124165
end
125166
end

0 commit comments

Comments
 (0)