Skip to content

Commit

Permalink
Warning instead of error if not convergent
Browse files Browse the repository at this point in the history
  • Loading branch information
stecrotti committed Nov 4, 2024
1 parent c16c1bb commit 632937c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Models/glauber/equilibrium.jl
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ function iterate_fixedpoint(f, init; maxiter=10^3, atol=0, rtol=1e-16, damp=0.0)
err max(atol, rtol*max(abs(x), abs(xnew))) && return x
x = (1-damp)*xnew + damp*x
end
error("Fixed point iterations did not converge. err=$err")
@warn "Fixed point iterations did not converge. err=$err"
end

function equilibrium_observables(g::RandomRegular, J::Real; β::Real=1.0, h::Real=0.0,
Expand Down

0 comments on commit 632937c

Please sign in to comment.