Critical error in T matrix fixed
This commit is contained in:
parent
4175152a8d
commit
3c72bbc7b6
10
ho_basis.jl
10
ho_basis.jl
|
|
@ -59,13 +59,11 @@ function sp_T_matrix(ns, ls; ω=1.0, μ=1.0)
|
||||||
for idx in CartesianIndices(mat)
|
for idx in CartesianIndices(mat)
|
||||||
(i, j) = Tuple(idx)
|
(i, j) = Tuple(idx)
|
||||||
if ls[i] == ls[j]
|
if ls[i] == ls[j]
|
||||||
mat[idx] = ls[i]
|
|
||||||
if ns[i] == ns[j]
|
if ns[i] == ns[j]
|
||||||
mat[idx] += 1/4 * (4*ns[j] + 3)
|
mat[idx] = ns[j] + ls[i]/2 + 3/4
|
||||||
elseif ns[i] == ns[j] + 1
|
elseif abs(ns[i]-ns[j]) == 1
|
||||||
mat[idx] += -1/4 * sqrt((2*ns[j] + 2) * (2*ns[j] + 3))
|
n_max = max(ns[i], ns[j])
|
||||||
elseif ns[i] == ns[j] - 1
|
mat[idx] = -(1/2) * sqrt(n_max * (n_max + ls[i] + 1/2))
|
||||||
mat[idx] += -1/4 * sqrt((2*ns[j] + 1) * 2*ns[j])
|
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue