Skip to content

Commit 6145dcb

Browse files
import and export AngularMomentum
1 parent cdca3d7 commit 6145dcb

File tree

3 files changed

+3
-31
lines changed

3 files changed

+3
-31
lines changed

src/MultivariateOrthogonalPolynomials.jl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,14 +20,14 @@ import InfiniteArrays: InfiniteCardinal
2020

2121
import ClassicalOrthogonalPolynomials: jacobimatrix, Weighted, orthogonalityweight, HalfWeighted
2222
import HarmonicOrthogonalPolynomials: BivariateOrthogonalPolynomial, MultivariateOrthogonalPolynomial, Plan,
23-
PartialDerivative, BlockOneTo, BlockRange1, interlace
23+
PartialDerivative, AngularMomentum, BlockOneTo, BlockRange1, interlace
2424

2525
export MultivariateOrthogonalPolynomial, BivariateOrthogonalPolynomial,
2626
UnitTriangle, UnitDisk,
2727
JacobiTriangle, TriangleWeight, WeightedTriangle,
2828
DunklXuDisk, DunklXuDiskWeight, WeightedDunklXuDisk,
2929
Zernike, ZernikeWeight, zerniker, zernikez,
30-
PartialDerivative, Laplacian, AbsLaplacianPower,
30+
PartialDerivative, Laplacian, AbsLaplacianPower, AngularMomentum,
3131
RadialCoordinate, Weighted, Block
3232

3333
include("ModalInterlace.jl")

src/rectdisk.jl

Lines changed: 0 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -176,29 +176,6 @@ function jacobimatrix(::Val{2}, P::DunklXuDisk)
176176
_BandedBlockBandedMatrix(dat, axes(k,1), (1,1), (1,1))
177177
end
178178

179-
180-
181-
#########
182-
# AngularMomentum
183-
# Applies the partial derivative with respect to the last angular variable in the coordinate system.
184-
# For example, in polar coordinates (r, θ) in ℝ² or cylindrical coordinates (r, θ, z) in ℝ³, we apply ∂ / ∂θ = (x ∂ / ∂y - y ∂ / ∂x).
185-
# In spherical coordinates (ρ, θ, φ) in ℝ³, we apply ∂ / ∂φ = (x ∂ / ∂y - y ∂ / ∂x).
186-
#########
187-
188-
struct AngularMomentum{T,Ax<:Inclusion} <: LazyQuasiMatrix{T}
189-
axis::Ax
190-
end
191-
192-
AngularMomentum{T}(axis::Inclusion) where T = AngularMomentum{T,typeof(axis)}(axis)
193-
AngularMomentum{T}(domain) where T = AngularMomentum{T}(Inclusion(domain))
194-
AngularMomentum(axis) = AngularMomentum{eltype(eltype(axis))}(axis)
195-
196-
axes(A::AngularMomentum) = (A.axis, A.axis)
197-
==(a::AngularMomentum, b::AngularMomentum) = a.axis == b.axis
198-
copy(A::AngularMomentum) = AngularMomentum(copy(A.axis))
199-
200-
^(A::AngularMomentum, k::Integer) = ApplyQuasiArray(^, A, k)
201-
202179
@simplify function *(A::AngularMomentum, P::DunklXuDisk)
203180
β = P.β
204181
n = mortar(Fill.(oneto(∞),oneto(∞)))

test/test_rectdisk.jl

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -59,15 +59,10 @@ import MultivariateOrthogonalPolynomials: dunklxu_raising, dunklxu_lowering, Ang
5959
@test λ im*imag(λ)
6060

6161
∂θ = AngularMomentum(axes(P, 1))
62-
@test axes(∂θ) == (axes(P, 1), axes(P, 1))
63-
@test ∂θ == AngularMomentum(axes(Q, 1)) == AngularMomentum(axes(P, 1).domain)
64-
@test copy(∂θ) ∂θ
65-
6662
A = P \ (∂θ * P)
63+
A2 = P \ (∂θ^2 * P)
6764

6865
@test A[Block.(1:N), Block.(1:N)] C
69-
70-
A2 = P \ (∂θ^2 * P)
7166
@test A2[Block.(1:N), Block.(1:N)] (A^2)[Block.(1:N), Block.(1:N)] A[Block.(1:N), Block.(1:N)]^2
7267

7368
∂x = PartialDerivative{1}(axes(WQ, 1))

0 commit comments

Comments
 (0)