From 21a37368732bca3b16521dd3959d1247451ba238 Mon Sep 17 00:00:00 2001 From: victor Date: Fri, 17 Jan 2025 17:21:34 +0100 Subject: [PATCH] add spaces test for ATRG, put tighter tolerance in Ising test --- test/ising.jl | 4 ++-- test/spaces.jl | 8 ++++++++ 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/test/ising.jl b/test/ising.jl index 880fa30..ad5ce47 100644 --- a/test/ising.jl +++ b/test/ising.jl @@ -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) @@ -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 diff --git a/test/spaces.jl b/test/spaces.jl index 1719d0c..6847617 100644 --- a/test/spaces.jl +++ b/test/spaces.jl @@ -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