From d1a76c1909f9ab71277dfaadeda7213a514d90aa Mon Sep 17 00:00:00 2001 From: Nuwan Yapa Date: Thu, 27 Jun 2024 18:20:19 -0400 Subject: [PATCH] Move EC calculations to a folder --- 3body_resonance_EC.jl => calculations/3body_R2R_EC.jl | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) rename 3body_resonance_EC.jl => calculations/3body_R2R_EC.jl (83%) diff --git a/3body_resonance_EC.jl b/calculations/3body_R2R_EC.jl similarity index 83% rename from 3body_resonance_EC.jl rename to calculations/3body_R2R_EC.jl index 1d7aa8e..53fe5bb 100644 --- a/3body_resonance_EC.jl +++ b/calculations/3body_R2R_EC.jl @@ -1,5 +1,5 @@ using DelimitedFiles, Plots -include("3body_resonance.jl") +include("../3body_resonance.jl") current_E = 5.9673 - 0.0006im @@ -19,8 +19,8 @@ training_vecs = Vector{ComplexF64}[] for c in training_c println("Training for c = $c") - H = H0 + c .* V - evals, evecs = eigs(H, nev=3, ncv=24, which=:LI, maxiter=5000, tol=1e-5, ritzvec=true, check=1) + local H = H0 + c .* V + local evals, evecs = eigs(H, nev=3, ncv=24, which=:LI, maxiter=5000, tol=1e-5, ritzvec=true, check=1) global current_E = nearest(evals, current_E) push!(training, current_E) @@ -34,8 +34,8 @@ V_EC = transpose(EC_basis) * V * EC_basis for c in extrapolating_c println("Extrapolating for c = $c") - H = H0 + c .* V - evals, evecs = eigs(H, nev=3, ncv=24, which=:LI, maxiter=5000, tol=1e-5, ritzvec=true, check=1) + local H = H0 + c .* V + local evals, evecs = eigs(H, nev=3, ncv=24, which=:LI, maxiter=5000, tol=1e-5, ritzvec=true, check=1) global current_E = nearest(evals, current_E) push!(exact, current_E)