Not worrying about cache
This commit is contained in:
parent
6a3590cd85
commit
323634057d
|
|
@ -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
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue