From 87be499dd8b9cab29f581aa45e45eab48edd3093 Mon Sep 17 00:00:00 2001 From: Nuwan Yapa Date: Fri, 28 Jun 2024 18:55:00 -0400 Subject: [PATCH] Bruteforce fix for the identification issue --- calculations/3body_Berggren_B2R_EC.jl | 22 +++++++++++++++------- 1 file changed, 15 insertions(+), 7 deletions(-) diff --git a/calculations/3body_Berggren_B2R_EC.jl b/calculations/3body_Berggren_B2R_EC.jl index 91d2ec3..f506c7d 100644 --- a/calculations/3body_Berggren_B2R_EC.jl +++ b/calculations/3body_Berggren_B2R_EC.jl @@ -9,6 +9,14 @@ println("No of threads = ", Threads.nthreads()) atol = 10^-5 maxevals = 10^5 +exact_ref = reverse([4.076662025307587-0.012709842443350328im, + 3.613318119833891-0.007335804709990623im, + 3.1453431847006783-0.004030580410326795im, + 2.672967129943755-0.00211498327461944im, + 2.196542557810288-0.0010719835443437104im, + 1.7164583929199813-0.0005455212208182736im, + 1.233088227541505-0.0003070320106485624im]) + Λ = 0 m = 1.0 Va_of_r(r) = 2 * exp(-(r-3)^2 / (1.5)^2) @@ -19,7 +27,7 @@ Vb_of_r(r) = -exp(-(r/3)^2) μ2 = m * 2/3 vertices = [0, 2 - 0.1im, 3, 4] -subdivisions = [10, 10, 10] +subdivisions = [16, 10, 10] ks, ws = get_mesh(vertices, subdivisions) jmax = 4 @@ -65,9 +73,9 @@ E_max = 40 @time "Ha" Ha = T + Va1 + Va2 @time "Vb" Vb = Vb1 + Vb2 -@time "Eigenvalues" target_evals, _ = eigs(Ha, nev=3, ncv=24, which=:LI, maxiter=5000, tol=1e-5, ritzvec=false, check=1) +@time "Eigenvalues" test_evals, _ = eigs(Ha, sigma=exact_ref[end], maxiter=5000, tol=1e-5, ritzvec=false, check=1) -display(target_evals) +display(test_evals) # free memory Es = n1s = l1s = n2s = l2s = mask1 = mask2 = T1 = T2 = V1_cache = V_relative_cache = V1 = V_relative = U = V2 = nothing @@ -86,7 +94,7 @@ training_vecs = Vector{ComplexF64}[] for c in training_c println("Training for c = $c") H = Ha + c .* Vb - evals, evecs = eigs(H, nev=3, ncv=24, which=:LI, maxiter=5000, tol=1e-5, ritzvec=true, check=1) + evals, evecs = eigs(H, sigma=current_E, maxiter=5000, tol=1e-5, ritzvec=true, check=1) global current_E = nearest(evals, current_E) push!(training, current_E) @@ -101,12 +109,12 @@ N_EC = transpose(EC_basis) * weights_mat * EC_basis Ha_EC = transpose(EC_basis) * weights_mat * Ha * EC_basis Vb_EC = transpose(EC_basis) * weights_mat * Vb * EC_basis -current_E = 4.0766890719636635 - 0.01275892774109674im - for c in extrapolating_c println("Extrapolating for c = $c") + global current_E = pop!(exact_ref) + H = Ha + c .* Vb - evals, evecs = eigs(H, nev=3, ncv=24, which=:LI, maxiter=5000, tol=1e-5, ritzvec=true, check=1) + evals, _ = eigs(H, sigma=current_E, maxiter=5000, tol=1e-5, ritzvec=false, check=1) global current_E = nearest(evals, current_E) push!(exact, current_E)