Parallelized
This commit is contained in:
parent
262ab3d426
commit
b0f650f2e3
|
|
@ -158,11 +158,11 @@ function get_jacobi_V2_matrix(V_of_r, E_max, Λ, μω_global; atol=10^-6, maxeva
|
|||
end
|
||||
|
||||
function get_2p_p1p2_matrix(n1s, l1s, n2s, l2s, Λ, μ1ω1, μ2ω2)
|
||||
mat = spzeros(Float64, length(n1s), length(n1s))
|
||||
for idx in CartesianIndices(mat)
|
||||
mat = zeros(Float64, length(n1s), length(n1s))
|
||||
Threads.@threads for idx in CartesianIndices(mat)
|
||||
(i, j) = Tuple(idx)
|
||||
val = racahs_reduction_formula(n1s[i], l1s[i], n2s[i], l2s[i], n1s[j], l1s[j], n2s[j], l2s[j], Λ, μ1ω1, μ2ω2)
|
||||
if !(val ≈ 0); mat[idx] = val; end
|
||||
end
|
||||
return mat
|
||||
return sparse(mat)
|
||||
end
|
||||
|
|
|
|||
Loading…
Reference in New Issue