diff --git a/calculations/XZ_technique.jl b/calculations/XZ/2body_HO.jl similarity index 83% rename from calculations/XZ_technique.jl rename to calculations/XZ/2body_HO.jl index 91214e1..7044dbb 100644 --- a/calculations/XZ_technique.jl +++ b/calculations/XZ/2body_HO.jl @@ -1,10 +1,10 @@ using Plots -include("../EC.jl") -include("../ho_basis.jl") -include("../p_space.jl") +include("../../EC.jl") +include("../../ho_basis.jl") +include("../../p_space.jl") -angle = 0.47 * pi +angle = 0.47 * pi # DOESN'T WORK WITHOUT ROTATION μω_gen = 0.5 * exp(-1im * angle) μ = 0.5 l = 0 @@ -36,4 +36,4 @@ hline!([0], color=:red, label="continuum") xlabel!("Re(E)") ylabel!("Im(E)") plot!(legend=:bottomleft) -savefig("temp/XZ.pdf") \ No newline at end of file +savefig("temp/2b_HO_XZ.pdf") \ No newline at end of file diff --git a/calculations/XZ/3body_HO.jl b/calculations/XZ/3body_HO.jl new file mode 100644 index 0000000..12c267f --- /dev/null +++ b/calculations/XZ/3body_HO.jl @@ -0,0 +1,36 @@ +include("../../ho_basis.jl") +include("../../EC.jl") + +V_of_r(r) = 2 * exp(-(r-3)^2 / (1.5)^2) +Λ = 0 +m = 1.0 + +ϕ = 0.1 +μω_global = 0.5 +E_max = 40 + +H0 = get_3b_H_matrix(jacobi, V_of_r, μω_global, E_max, Λ, m, true, true) + +# Vp = perturbation to make the state artificially bound +Vp_of_r(r) = -exp(-(r/3)^2) +@time "Vp" Vp = get_3b_H_matrix(jacobi, Vp_of_r, μω_global, E_max, Λ, m, false, true) + +training_ref = 2 + 0.5im + +exact_E = [4.076642792419057-0.012998408352259658im, + 3.6129849325287-0.007397677539402868im, + 3.145212908643357-0.0038660337822150753im, + 2.6729225739451596-0.0021090370393881063im, + 2.196385760253282-0.0010430088245526555im, + 1.7162659936896967-0.0004515351140200029, + 1.2329926791785895-0.00017698044022813525im] + +training_c = (0.0 : 0.2 : 1.2) .* exp(-0.01im) #[-1.5 - 0.5im] .+ (randn(8) .+ 0.05im * randn(8)) +extrapolating_c = 0.0 : 0.2 : 1.2 + +EC = affine_EC(H0, Vp) +train!(EC, training_c; ref_eval=training_ref, CAEC=false) +extrapolate!(EC, extrapolating_c; precalculated_exact_E=exact_E) + +exportCSV(EC, "temp/3b_HO_XZ.csv") +plot(EC, "temp/3b_HO_XZ.pdf") diff --git a/calculations/XZ/p_space_vs_HO.jl b/calculations/XZ/p_space_vs_HO.jl index b3db2c5..eb9ac04 100644 --- a/calculations/XZ/p_space_vs_HO.jl +++ b/calculations/XZ/p_space_vs_HO.jl @@ -1,8 +1,8 @@ using Plots -include("../EC.jl") -include("../ho_basis.jl") -include("../p_space.jl") +include("../../EC.jl") +include("../../ho_basis.jl") +include("../../p_space.jl") function solve_E(H0, H1, c_vals, near_E) out_E = ComplexF64[] @@ -71,4 +71,4 @@ scatter(real.(HO_Es), imag.(HO_Es), label="HO basis", marker=:circle, color=:blu scatter!(real.(p_space_Es), imag.(p_space_Es), label="p-space", marker=:circle, color=:red) xlabel!("Re(E)") ylabel!("Im(E)") -savefig("temp/p_space_vs_HO.pdf") \ No newline at end of file +savefig("temp/2b_p_space_vs_HO.pdf") \ No newline at end of file