Skip to content

Commit

Permalink
change print statement to logging event @info
Browse files Browse the repository at this point in the history
logging event can be turned of on demand. This behaviour is favorable for when working on clusters etc.
  • Loading branch information
oameye committed Aug 1, 2023
1 parent 2e7fe97 commit 1585aec
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions src/modules/TimeEvolution/hysteresis_sweep.jl
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,6 @@ function follow_branch(starting_branch::Int64, res::Result; y="u1^2+v1^2", sweep
# create a synthetic starting point out of an unphysical solution: quench and time evolve
# the actual solution is complex there, i.e. non physical. Take real part for the quench.
sol_dict = get_single_solution(res, branch=followed_branch[i-1], index=next_index)
print("bifurcation @ ", p1 ," = ", real(sol_dict[p1])," ")

values_noise = real.(values(sol_dict)) .+ 0.0im .+ ϵ*rand(length(values(sol_dict)))
sol_dict_noise = Dict(zip(keys(sol_dict), values_noise))
Expand All @@ -52,7 +51,7 @@ function follow_branch(starting_branch::Int64, res::Result; y="u1^2+v1^2", sweep

followed_branch[i] = _closest_branch_index(res, res_t.u[end], next_index) # closest branch to final state

print("switched branch ", followed_branch[i-1] ," -> ", followed_branch[i],"\n")
@info "bifurcation @ $p1 = $(real(sol_dict[p1])): switched branch $(followed_branch[i-1])$(followed_branch[i])"
end
end
if sweep == "left"
Expand Down

0 comments on commit 1585aec

Please sign in to comment.