Export .dat file

This commit is contained in:
ysyapa 2023-08-09 18:19:55 +00:00
parent cbd0460600
commit e6f32295f5
1 changed files with 12 additions and 17 deletions

View File

@ -2,27 +2,22 @@ include("Hamiltonian.jl")
mode = cpu_tensor
T = Float32 # single-precision mode
using Plots
V_gauss(r2) =
-10 * exp(-(sqrt(r2)) ^ 2)
d = 3
n = 2
N = 32
L = 16
ϕ = pi/5
N = 16
ϕ = pi/6
open("ComplexScaling-FV.dat", "w") do f
for L = range(16, 32, length=33)
println("Calculating L=", L)
s = system{T}(d, n, N, L)
H = Hamiltonian{T}(s, V_gauss, ϕ, 0, mode)
@time evals, _, info = eig(H, 20)
@time evals, _, info = eig(H, 40)
print(info.numops, " operations")
display(evals)
scatter(real.(evals), imag.(evals); legend=false)
xlabel!("Re E")
ylabel!("Im E")
xlims!(0, 0.5)
ylims!(-0.5, 0)
savefig("temp/ComplexScaling-FV.png")
dataline = vcat([L], hcat(real.(evals), imag.(evals))'[:])
println(f, join(dataline, '\t'))
end
end