Skip to content

Commit

Permalink
Commented out tests #56
Browse files Browse the repository at this point in the history
  • Loading branch information
ohno committed May 29, 2024
1 parent 59f2c10 commit 2eaf6f4
Showing 1 changed file with 23 additions and 26 deletions.
49 changes: 23 additions & 26 deletions test/InfinitePotentialWell3D.jl
Original file line number Diff line number Diff line change
Expand Up @@ -16,32 +16,29 @@ println(raw"""
@testset "<ψᵢ|ψⱼ> = ∫ψₙ*ψₙdx = δᵢⱼ" begin
println("ix | iy | iz | jx | jy | jz | analytical | numerical ")
println("-- | -- | -- | -- | -- | -- | ----------------- | ----------------- ")
# for L in [0.1, 0.5, 1.0, 7.0]
# for m in [0.1, 0.5, 1.0, 7.0]
# for ℏ in [0.1, 0.5, 1.0, 7.0]
for ix in 1:2
for iy in 1:2
for iz in 1:2
for jx in 1:2
for jy in 1:2
for jz in 1:2
analytical = ((ix==jx && iy==jy && iz==jz) ? 1 : 0)
numerical = quadgk(x ->
quadgk(y ->
quadgk(z ->
conj(ψ(IPW3D, x,y,z, nx=ix, ny=iy, nz=iz)) * ψ(IPW3D, x,y,z, nx=jx, ny=jy, nz=jz)
, 0.0, IPW3D.Lz, maxevals=10)[1]
, 0.0, IPW3D.Ly, maxevals=10)[1]
, 0.0, IPW3D.Lz, maxevals=10)[1]
acceptance = iszero(analytical) ? isapprox(analytical, numerical, atol=1e-2) : isapprox(analytical, numerical, rtol=1e-2)
@printf("%2d | %2d | %2d | %2d | %2d | %2d | %17.12f | %17.12f %s\n", ix, iy, iz, jx, jy, jz, analytical, numerical, acceptance ? "" : "")
@test acceptance
end
end
end
end
end
end
# for ix in 1:2
# for iy in 1:2
# for iz in 1:2
# for jx in 1:2
# for jy in 1:2
# for jz in 1:2
# analytical = ((ix==jx && iy==jy && iz==jz) ? 1 : 0)
# numerical = quadgk(x ->
# quadgk(y ->
# quadgk(z ->
# conj(ψ(IPW3D, x,y,z, nx=ix, ny=iy, nz=iz)) * ψ(IPW3D, x,y,z, nx=jx, ny=jy, nz=jz)
# , 0.0, IPW3D.Lz, maxevals=10)[1]
# , 0.0, IPW3D.Ly, maxevals=10)[1]
# , 0.0, IPW3D.Lz, maxevals=10)[1]
# acceptance = iszero(analytical) ? isapprox(analytical, numerical, atol=1e-2) : isapprox(analytical, numerical, rtol=1e-2)
# @printf("%2d | %2d | %2d | %2d | %2d | %2d | %17.12f | %17.12f %s\n", ix, iy, iz, jx, jy, jz, analytical, numerical, acceptance ? "✔" : "✗")
# @test acceptance
# end
# end
# end
# end
# end
# end
end

println("""```
Expand Down

0 comments on commit 2eaf6f4

Please sign in to comment.