Skip to content
Snippets Groups Projects
Commit 2538b69e authored by Johannes Pfeifer's avatar Johannes Pfeifer Committed by Stéphane Adjemian
Browse files

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 9778b6ae
Branches
Tags
No related merge requests found
......@@ -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
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment