include("../../p_space.jl") include("../../EC.jl") using Arpack # target = 4.0766890719636875 - 0.012758927741074495im Λ = 0 m = 1.0 V_of_r(r) = 2 * exp(-(r-3)^2 / (1.5)^2) vertices = [0, 2 - 0.2im, 3, 4] # TODO: real contour instead of Berggren basis subdivisions = [15, 10, 10] jmax = 4 E_max = 40 μω_global = 0.5 @time "H0" H0, _ = get_3b_H_matrix(jacobi, V_of_r, vertices, subdivisions, jmax, μω_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, vertices, subdivisions, jmax, μω_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 = [-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_p_space_XZ.csv") plot(EC, "temp/3b_p_space_XZ.pdf") # Results: training points are all over the place, and extrapolated values are garbage.