-
Notifications
You must be signed in to change notification settings - Fork 0
/
wigner.m
97 lines (70 loc) · 2.54 KB
/
wigner.m
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
% Wigner coefficients
%
% obj = wigner(order) sets up an object to compute the Wigner
% coefficients. The coefficients for polar angle rotation theta are
% computed from the coefficients for theta = pi/2 using the formula (3.31)
% in [1].
%
% W = obj.get(theta) gets the coefficients for angle theta. The coefficent
% d^l_{j,jd} is stored in W{l+1}(j,jd).
%
% References:
%
% [1] Ganesh and Graham, A high order algorithm for obstacle scattering
% in three dimensions, Journal of Computational Physics 198 (2004)
% 211--242.
%
% Stuart C. Hawkins - 26 October 2021
% Copyright 2019-2022 Stuart C. Hawkins
%
% This file is part of TMATROM3
%
% TMATROM3 is free software: you can redistribute it and/or modify
% it under the terms of the GNU General Public License as published by
% the Free Software Foundation, either version 3 of the License, or
% (at your option) any later version.
%
% TMATROM3 is distributed in the hope that it will be useful,
% but WITHOUT ANY WARRANTY; without even the implied warranty of
% MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
% GNU General Public License for more details.
%
% You should have received a copy of the GNU General Public License
% along with TMATROM3. If not, see <http://www.gnu.org/licenses/>.
classdef wigner < handle
properties
order
dpi2
end
methods
%-----------------------------------------
% constructor
%-----------------------------------------
function self = wigner(order)
self.order = order;
self.setup();
end
%-----------------------------------------
% setup the d(pi/2) matrices
%-----------------------------------------
function setup(self)
% setup a cell
self.dpi2 = cell(self.order+1,1);
for n=0:self.order
% compute d(pi/2)
self.dpi2{n+1} = repnpi2(n);
end
end
%-----------------------------------------
% comopute d(alpha)
%-----------------------------------------
function val = get(self,alpha)
% setup a cell
val = cell(self.order+1,1);
for n=0:self.order
% compute d from d(pi/2)
val{n+1} = repn(self.dpi2{n+1},alpha,n);
end
end
end
end