<html><head><meta http-equiv="Content-Type" content="text/html; charset=utf-8"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;" class=""><br class=""><div><br class=""><blockquote type="cite" class=""><div class="">El 17 feb 2020, a las 19:19, Emmanuel Ayala <<a href="mailto:juaneah@gmail.com" class="">juaneah@gmail.com</a>> escribió:</div><br class="Apple-interchange-newline"><div class=""><div dir="ltr" class=""><div dir="ltr" class=""><div class="">Thank you very much for the answer.</div><div class=""><br class=""></div></div><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div class="">This error appears when computing the B-norm of a vector x, as sqrt(x'*B*x). Probably your B matrix is semi-definite, and due to floating-point error the value x'*B*x becomes negative for a certain vector x. The code uses a tolerance of 10*PETSC_MACHINE_EPSILON, but it seems the rounding errors are larger in your case. Or maybe your B-matrix is indefinite, in which case you should solve the problem as non-symmetric (or as symmetric-indefinite GHIEP).<div class=""><br class=""></div><div class="">Do you get the same problem with the Krylov-Schur solver?</div><div class=""><br class=""></div></div></blockquote><div class=""><br class=""></div><div class="">After check the input matrices, the problem was solved using GHIEP.</div><div class=""> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div class=""><div class=""></div><div class="">A workaround is to edit the source code and remove the check or increase the tolerance, but this may be catastrophic if your B is indefinite. A better solution is to reformulate the problem, solving the matrix pair (A,C) where C=alpha*A+beta*B is positive definite (note that then the eigenvalues become lambda/(beta+alpha*lambda)).</div><div class=""><br class=""></div></div></blockquote><div class=""><br class=""></div><div class="">Ok, there is a rule to choose the values for alpha and beta? <br class=""></div></div></div></div></blockquote><div><br class=""></div><div>For instance take alpha=1 and beta=-sigma, where sigma is a lower bound of the leftmost eigenvalue of B (the most negative one). This assumes that A is positive definite.</div><div><br class=""></div><div>Jose</div><div><br class=""></div><br class=""><blockquote type="cite" class=""><div class=""><div dir="ltr" class=""><div class="gmail_quote"><div class=""><br class=""></div><div class="">Kind regards.</div><div class="">Thanks.<br class=""></div><div class=""> </div><br class=""></div></div>
</div></blockquote></div><br class=""></body></html>