@@ -153,3 +153,38 @@ function jacobimatrix(::Val{2}, P::DunklXuDisk)
153
153
), (blockedrange (Fill (3 , 3 )), axes (n,1 )))
154
154
_BandedBlockBandedMatrix (dat, axes (k,1 ), (1 ,1 ), (1 ,1 ))
155
155
end
156
+
157
+
158
+
159
+ # ########
160
+ # AngularMomentum
161
+ # Applies the partial derivative with respect to the last angular variable in the coordinate system.
162
+ # For example, in polar coordinates (r, θ) in ℝ² or cylindrical coordinates (r, θ, z) in ℝ³, we apply ∂ / ∂θ = (x ∂ / ∂y - y ∂ / ∂x).
163
+ # In spherical coordinates (ρ, θ, φ) in ℝ³, we apply ∂ / ∂φ = (x ∂ / ∂y - y ∂ / ∂x).
164
+ # ########
165
+
166
+ struct AngularMomentum{T,Ax<: Inclusion } <: LazyQuasiMatrix{T}
167
+ axis:: Ax
168
+ end
169
+
170
+ AngularMomentum {T} (axis:: Inclusion ) where T = AngularMomentum {T,typeof(axis)} (axis)
171
+ AngularMomentum {T} (domain) where T = AngularMomentum {T} (Inclusion (domain))
172
+ AngularMomentum (axis) = AngularMomentum {eltype(eltype(axis))} (axis)
173
+
174
+ axes (A:: AngularMomentum ) = (A. axis, A. axis)
175
+ == (a:: AngularMomentum , b:: AngularMomentum ) = a. axis == b. axis
176
+ copy (A:: AngularMomentum ) = AngularMomentum (copy (A. axis))
177
+
178
+ ^ (A:: AngularMomentum , k:: Integer ) = ApplyQuasiArray (^ , A, k)
179
+
180
+ @simplify function * (A:: AngularMomentum , P:: DunklXuDisk )
181
+ β = P. β
182
+ n = mortar (Fill .(oneto (∞),oneto (∞)))
183
+ k = mortar (Base. OneTo .(oneto (∞)))
184
+ dat = PseudoBlockArray (Vcat (
185
+ (2 .* (k .+ (β - 1 )) .* (n .- k .+ 1 ) ./ (2 k .+ (2 β - 1 )))' , # n, k-1
186
+ (0 .* n)' , # n, k
187
+ (- k .* (k .+ 2 β) .* (n .+ k .+ 2 β) ./ ((2 k .+ (2 β - 1 )) .* (2 k .+ 2 β)))' , # n, k+1
188
+ ), (blockedrange (Fill (3 , 1 )), axes (n,1 )))
189
+ DunklXuDisk (β) * _BandedBlockBandedMatrix (dat, axes (k,1 ), (0 ,0 ), (1 ,1 ))
190
+ end
0 commit comments