From 323634057d7c1b36dd52947077fee82bb26c400e Mon Sep 17 00:00:00 2001 From: Nuwan Yapa Date: Wed, 24 Apr 2024 15:18:59 -0400 Subject: [PATCH] Not worrying about cache --- ho_basis_3body.jl | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/ho_basis_3body.jl b/ho_basis_3body.jl index d9f57cd..d4076d3 100644 --- a/ho_basis_3body.jl +++ b/ho_basis_3body.jl @@ -1,4 +1,4 @@ -using Arpack, SparseArrays, LRUCache +using Arpack, SparseArrays include("ho_basis.jl") include("p_space.jl") @@ -20,8 +20,6 @@ println("No of threads = ", Threads.nthreads()) @time "Basis" begin Es, n1s, l1s, n2s, l2s = get_2p_basis(E_max) - l_max = max(maximum(l1s), maximum(l2s)) - n_max = max(maximum(n1s), maximum(n2s)) mask1 = (n2s .== n2s') .&& (l2s .== l2s') mask2 = (n1s .== n1s') .&& (l1s .== l1s') end @@ -35,10 +33,8 @@ println("Constructing KE matrices") println("Constructing PE matrices") V1_elem(l, n1, n2) = Va * V_Gaussian(Ra, l, n1, n2; μω_gen=μ1ω1) V_relative_elem(l, n1, n2) = Va * V_Gaussian(Ra, l, n1, n2; μω_gen=μω_global) -V1_cache = LRU{Tuple{UInt8, UInt8, UInt8}, Float64}(maxsize=(1+l_max)*(1+n_max)^2) -V_relative_cache = LRU{Tuple{UInt8, UInt8, UInt8}, Float64}(maxsize=(1+l_max)*(1+n_max)^2) -@time "V1" V1 = sp_V_matrix(V1_elem, n1s, l1s; mask=mask1, cache=V1_cache) -@time "V relative" V_relative = sp_V_matrix(V_relative_elem, n1s, l1s; mask=mask1, cache=V_relative_cache) + sp_V_matrix(V_relative_elem, n2s, l2s; mask=mask2, cache=V_relative_cache) +@time "V1" V1 = sp_V_matrix(V1_elem, n1s, l1s; mask=mask1) +@time "V relative" V_relative = sp_V_matrix(V_relative_elem, n1s, l1s; mask=mask1) + sp_V_matrix(V_relative_elem, n2s, l2s; mask=mask2) @time "Moshinsky brackets" U = Moshinsky_transform(Es, n1s, l1s, n2s, l2s, Λ) @time "V2" V2 = U' * V_relative * U