Testing script

This commit is contained in:
ysyapa 2023-08-31 22:16:28 +00:00
parent fa7fa0c09e
commit 94e78ed6f1
1 changed files with 21 additions and 0 deletions

21
test_jacobi.jl Normal file
View File

@ -0,0 +1,21 @@
include("Hamiltonian.jl")
T=Float32
function V_test(r2)
return -4*exp(-r2/4)
end
for (n,N) in [(2,16), (3,8)]
println("\n$n-body system with N=$N")
n_image=0
for L::T in 5.0:9.0
print("L=$L: ")
s=system{T}(3,n,N,L)
print("Constructing H...")
H=Hamiltonian{T}(s,V_test,0.0,n_image,cpu_tensor)
print("Diagonalizing...")
evals,_,_ = eig(H,5)
println(real.(evals))
end
end