Skip to content

Commit

Permalink
move run!(::TNRScheme) to its rightfull place and use @infov for …
Browse files Browse the repository at this point in the history
…sweep information
  • Loading branch information
VictorVanthilt committed Feb 15, 2025
1 parent c85daea commit f8f3651
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
9 changes: 1 addition & 8 deletions src/schemes/looptnr.jl
Original file line number Diff line number Diff line change
Expand Up @@ -353,7 +353,7 @@ function loop_opt!(scheme::Loop_TNR, maxsteps_opt::Int, minerror_opt::Float64,
sweep += 1
cost = cost_func(1, psi_A, psi_B)
if verbosity > 1
@info "Sweep: $sweep, Cost: $cost"
@infov 3 "Sweep: $sweep, Cost: $cost"
end
end
Ψ5 = permute(psi_B[5], (2,), (1, 3))
Expand Down Expand Up @@ -400,13 +400,6 @@ function Base.show(io::IO, scheme::Loop_TNR)
return nothing
end

function run!(scheme::TNRScheme, trscheme::TensorKit.TruncationScheme;
finalize_beginning=true, verbosity=1)
# default maxiter criterion of 100 iterations
return run!(scheme, trscheme, maxiter(100); finalize_beginning=finalize_beginning,
verbosity=verbosity)
end

function run!(scheme::Loop_TNR, trscheme::TensorKit.TruncationScheme, criterion::stopcrit,
loop_sweeps::Int, loop_error::Float64;
finalize_beginning=true, verbosity=1)
Expand Down
7 changes: 7 additions & 0 deletions src/schemes/tnrscheme.jl
Original file line number Diff line number Diff line change
Expand Up @@ -29,3 +29,10 @@ function run!(scheme::TNRScheme, trscheme::TensorKit.TruncationScheme, criterion
end
return data
end

function run!(scheme::TNRScheme, trscheme::TensorKit.TruncationScheme;
finalize_beginning=true, verbosity=1)
# default maxiter criterion of 100 iterations
return run!(scheme, trscheme, maxiter(100); finalize_beginning=finalize_beginning,
verbosity=verbosity)
end

0 comments on commit f8f3651

Please sign in to comment.