JuliaApproximation / MultivariateOrthogonalPolynomials.jl

Supports approximating functions and solving differential equations on various higher dimensional domains such as disks and triangles
Other
17 stars 5 forks source link

WIP: Add Dunkl-Xu orthogonal polynomials on the unit disk #87

Closed MikaelSlevinsky closed 3 years ago

MikaelSlevinsky commented 3 years ago

Just another set of OPs.

I'm using this to figure out the nontrivial discretization of the angular momentum operator on Dunkl-Xu polynomials as an infinite dimensional skew-symmetric block tridiagonal matrix. This leads to a fast solution to the Dunkl-Xu to Zernike connection problem.

It goes like this:

using MultivariateOrthogonalPolynomials, LinearAlgebra, Test
N = 5
β = 0.123

P = DunklXuDisk(β)
Q = DunklXuDisk(β+1)
x, y = first.(axes(P, 1)), last.(axes(P, 1))

∂x = PartialDerivative{1}(P)
∂y = PartialDerivative{2}(P)

Dx = Q \ (∂x * P)
Dy = Q \ (∂y * P)

Mx = Q \ (x .* Q)
My = Q \ (y .* Q)

A = Mx[Block.(1:N), Block.(1:N+1)]*Dy[Block.(1:N+1), Block.(1:N)] - My[Block.(1:N), Block.(1:N+1)]*Dx[Block.(1:N+1), Block.(1:N)]

B = (Q \ P)[Block.(1:N), Block.(1:N)]

C = B \ A

@test C ≈ Tridiagonal(C) # U wot, m8?

λ = eigvals(Matrix(C))

@test λ ≈ im*imag(λ)
MikaelSlevinsky commented 3 years ago

(Skew-symmetry requires orthonormalization, but it's easier to figure out the rational entries first.)

codecov[bot] commented 3 years ago

Codecov Report

Merging #87 (6145dcb) into master (04704a8) will decrease coverage by 0.84%. The diff coverage is 89.02%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master      #87      +/-   ##
==========================================
- Coverage   94.81%   93.97%   -0.85%     
==========================================
  Files           3        4       +1     
  Lines         482      564      +82     
==========================================
+ Hits          457      530      +73     
- Misses         25       34       +9     
Impacted Files Coverage Δ
src/rectdisk.jl 89.02% <89.02%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more Δ = absolute <relative> (impact), ø = not affected, ? = missing data Powered by Codecov. Last update 04704a8...6145dcb. Read the comment docs.

dlfivefifty commented 3 years ago

Please Squash-and-Merge next time to avoid polluting the Git history