Commit 3679afe8 authored by Johannes Pfeifer 's avatar Johannes Pfeifer Committed by Stéphane Adjemian (Charybdis)

Discretion: Added catch for infinities

Comment: A user provided a file in which the Sylvester equation solved using doubling can evaluate to inf. When Doubling fails, one can try the Hessenberg-Schur algorithm.
parent b91fa10f
......@@ -112,9 +112,9 @@ F1=F10;
while 1
iter=iter+1;
P=SylvesterDoubling(W+beta*F1'*Q*F1,beta*H1',H1,discretion_tol,solve_maxit);
if any(any(isnan(P)))
if any(any(isnan(P))) || any(any(isinf(P)))
P=SylvesterHessenbergSchur(W+beta*F1'*Q*F1,beta*H1',H1);
if any(any(isnan(P)))
if any(any(isnan(P))) || any(any(isinf(P)))
retcode=2;
return
end
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment