Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixes to alternating_update default printing #201

Merged
merged 5 commits into from
Sep 26, 2024
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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...,
mtfishman marked this conversation as resolved.
Show resolved Hide resolved
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
Loading