Skip to content

Commit

Permalink
add spaces test for ATRG, put tighter tolerance in Ising test
Browse files Browse the repository at this point in the history
  • Loading branch information
VictorVanthilt committed Jan 17, 2025
1 parent 378cd0c commit 21a3736
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 2 deletions.
4 changes: 2 additions & 2 deletions test/ising.jl
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ end
# ATRG
@testset "ATRG - Ising Model" begin
scheme = ATRG(T)
data = run!(scheme, truncdim(16), maxiter(25))
data = run!(scheme, truncdim(24), maxiter(25))

lnz = 0
for (i, d) in enumerate(data)
Expand All @@ -79,5 +79,5 @@ end
fs = lnz * -1 / Ising_βc

relerror = abs((fs - fs_onsager) / fs_onsager)
@test relerror < 1e-5
@test relerror < 3e-6
end
8 changes: 8 additions & 0 deletions test/spaces.jl
Original file line number Diff line number Diff line change
Expand Up @@ -33,3 +33,11 @@ end
end
end
end

@testset "ATRG - spaces" begin
for T in models
@eval begin
@test isa(run!(ATRG($(T)), truncdim(7), maxiter(100)), Any)
end
end
end

0 comments on commit 21a3736

Please sign in to comment.