From ccee9c38ea4ce0a1400c29d2ecd04a011f051799 Mon Sep 17 00:00:00 2001 From: Nuwan Yapa Date: Mon, 1 Apr 2024 18:56:59 -0400 Subject: [PATCH] 2-body calculation for benchmarking 3-body --- ho_basis_2body.jl | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) create mode 100644 ho_basis_2body.jl diff --git a/ho_basis_2body.jl b/ho_basis_2body.jl new file mode 100644 index 0000000..f1ed433 --- /dev/null +++ b/ho_basis_2body.jl @@ -0,0 +1,31 @@ +using Arpack, SparseArrays +include("ho_basis.jl") +include("p_space.jl") + +E_max = 30 +ω = 0.2 +Λ = 0 +m = 1.0 + +Va = -2 +Ra = 2 + +μ1 = m * 1/2 + +println("No of threads = ", Threads.nthreads()) + +Es, n1s, l1s = get_sp_basis(E_max) +println("Basis size = ", length(Es)) + +println("Constructing KE matrices") +@time "T1" T1 = sp_T_matrix(n1s, l1s; ω=ω, μ=μ1) + +println("Constructing PE matrices") +V1_elem(l, n1, n2) = Va * V_Gaussian(Ra, l, n1, n2; ω=ω) +@time "V1" V1 = sp_V_matrix(V1_elem, n1s, l1s) + +println("Calculating spectrum") +@time "H" H = T1 + V1 +@time "Eigenvalues" evals, _ = eigs(H, nev=3, ncv=30, which=:SR, maxiter=5000, tol=1e-5, ritzvec=false, check=1) + +display(evals) \ No newline at end of file