diff --git a/ho_basis.jl b/ho_basis.jl index b77939e..82d8238 100644 --- a/ho_basis.jl +++ b/ho_basis.jl @@ -1,3 +1,4 @@ +using SparseArrays using NuclearToolkit using SpecialFunctions include("helper.jl") @@ -56,7 +57,7 @@ end get_V_matrix(V_l, ls, ns) = throw("unimplemented") function sp_T_matrix(ns, ls; ω=1.0, μ=1.0) - mat = zeros(length(ns), length(ns)) + mat = spzeros(length(ns), length(ns)) for idx in CartesianIndices(mat) (i, j) = Tuple(idx) if ls[i] == ls[j] @@ -85,7 +86,7 @@ function Moshinsky_transform(Es, n1s, l1s, n2s, l2s, Λ) dcgm0 = NuclearToolkit.prep_dcgm0(l_max); d6j = NuclearToolkit.prep_d6j_int(E_max, j_max, to); - mat = zeros(length(Es), length(Es)) + mat = spzeros(length(Es), length(Es)) s = hcat(Es, n1s, l1s, n2s, l2s) for idx in CartesianIndices(mat) (i, j) = Tuple(idx)