Skip to content

Commit

Permalink
test for spacemismatches
Browse files Browse the repository at this point in the history
  • Loading branch information
VictorVanthilt committed Jan 13, 2025
1 parent 0d42b44 commit b8789f2
Show file tree
Hide file tree
Showing 2 changed files with 38 additions and 1 deletion.
3 changes: 2 additions & 1 deletion test/runtests.jl
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,5 @@ using TensorKit

using QuadGK

include("ising.jl")
include("spaces.jl") # do they give spacemismatches?
include("ising.jl") # do they give the correct results (with the expected accuracy)?
36 changes: 36 additions & 0 deletions test/spaces.jl
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
println("--------")
println(" spaces ")
println("--------")

# stuff different kinds of spaces into the schemes (and do 100 steps)
A = classical_ising(Ising_βc)
B = classical_ising_symmetric(Ising_βc)
C = gross_neveu_start(0, 1, 0)

models = [A, B, C]

# The tests below check that the schemes don't lead to spacemismatches
@testset "TRG - spaces" begin
for T in models
@eval begin
@test isa(run!(TRG($(T)), truncdim(7), maxiter(100)), Any)
end
end
end

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

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

0 comments on commit b8789f2

Please sign in to comment.