Skip to content

Commit

Permalink
Fixes to alternating_update default printing
Browse files Browse the repository at this point in the history
  • Loading branch information
emstoudenmire committed Sep 22, 2024
1 parent f28e5a4 commit a167f9d
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 9 deletions.
6 changes: 3 additions & 3 deletions src/solvers/alternating_update/alternating_update.jl
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@ function alternating_update(
nsites, # define default for each level of solver implementation
updater, # this specifies the update performed locally
outputlevel=default_outputlevel(),
region_printer=nothing,
sweep_printer=nothing,
region_printer=default_region_printer,
sweep_printer=default_sweep_printer,
(sweep_observer!)=nothing,
(region_observer!)=nothing,
root_vertex=GraphsExtensions.default_root_vertex(init_state),
Expand Down Expand Up @@ -59,7 +59,7 @@ function alternating_update(
(sweep_observer!)=nothing,
sweep_printer=default_sweep_printer,#?
(region_observer!)=nothing,
region_printer=nothing,
region_printer=default_region_printer,
)
state = copy(init_state)
@assert !isnothing(sweep_plans)
Expand Down
1 change: 1 addition & 0 deletions src/solvers/alternating_update/region_update.jl
Original file line number Diff line number Diff line change
Expand Up @@ -112,6 +112,7 @@ function region_update(
outputlevel,
info...,
region_kwargs...,
inserter_kwargs...,
internal_kwargs...,
)
update_observer!(region_observer!; all_kwargs...)
Expand Down
12 changes: 6 additions & 6 deletions src/solvers/defaults.jl
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,9 @@ default_inserter() = default_inserter
default_checkdone() = (; kws...) -> false
default_transform_operator() = nothing
function default_region_printer(;
cutoff,
maxdim,
mindim,
cutoff=nothing,
mindim=nothing,
maxdim=nothing,
outputlevel,
state,
sweep_plan,
Expand All @@ -23,9 +23,9 @@ function default_region_printer(;
region = first(sweep_plan[which_region_update])
@printf("Sweep %d, region=%s \n", which_sweep, region)
print(" Truncated using")
@printf(" cutoff=%.1E", cutoff)
@printf(" maxdim=%d", maxdim)
@printf(" mindim=%d", mindim)
!isnothing(cutoff) && @printf(" cutoff=%.1E", cutoff)
!isnothing(maxdim) && @printf(" maxdim=%d", maxdim)
!isnothing(mindim) && @printf(" mindim=%d", mindim)
println()
if spec != nothing
@printf(
Expand Down

0 comments on commit a167f9d

Please sign in to comment.