Skip to content

Commit

Permalink
Update src/minres.jl
Browse files Browse the repository at this point in the history
Co-authored-by: Dominique <[email protected]>
  • Loading branch information
farhadrclass and dpo authored Mar 4, 2025
1 parent 1ed157f commit b3d8f21
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions src/minres.jl
Original file line number Diff line number Diff line change
Expand Up @@ -299,16 +299,17 @@ kwargs_minres = (:M, :ldiv, :linesearch ,:λ, :atol, :rtol, :etol, :conlim, :itm
ArNorm = ϕbar * root # = ‖Aᴴrₖ₋₁‖
history && push!(ArNorms, ArNorm)

# Check if -ve curvature encountered.
# Check for nonpositive curvature
if linesearch
if cs * γbar 0 # or eps(T)
(verbose > 0) && @printf(iostream, "nonpositive curvature detected: cs * γbar = %e\n", cs * γbar)
= cs * γbar
if 0
(verbose > 0) && @printf(iostream, "nonpositive curvature detected: cs * γbar = %e\n", cγ)
stats.solved = true
stats.niter = iter
stats.inconsistent = false
stats.timer = start_time |> ktimer
stats.status = "nonpositive curvature"
iter == 1 && kcopy!(n, x, b) # x ← b # we start at iteration 1
iter == 1 && kcopy!(n, x, r)
solver.warm_start = false
return solver
end
Expand Down

0 comments on commit b3d8f21

Please sign in to comment.