<html><head><meta http-equiv="Content-Type" content="text/html; charset=us-ascii"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;" class=""><div class=""><br class=""></div> There is also -pc_factor_nonzeros_along_diagonal which reorders to move the zeros off the diagonal before the numerical factorization<div class=""><br class=""></div><div class=""> But if having 0 leads to a factorization without error then it will produce the correct answer (this means that zero got filled in during the factorization)<br class=""><div><br class=""><blockquote type="cite" class=""><div class="">On Jul 8, 2020, at 2:11 PM, Mark Adams <<a href="mailto:mfadams@lbl.gov" class="">mfadams@lbl.gov</a>> wrote:</div><br class="Apple-interchange-newline"><div class=""><div dir="ltr" class=""><div dir="ltr" class=""><br class=""></div><br class=""><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Wed, Jul 8, 2020 at 2:43 PM Qin Lu via petsc-users <<a href="mailto:petsc-users@mcs.anl.gov" class="">petsc-users@mcs.anl.gov</a>> wrote:<br 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 style="font-family:"Helvetica Neue",Helvetica,Arial,sans-serif;font-size:13px" class=""><div dir="ltr" class="">Hello,</div><div dir="ltr" class=""><br class=""></div><div dir="ltr" class="">I am using the Petsc native direct solver <font face="Helvetica, Arial, sans-serif" class="">(with KSPPREONLY and PCLU) to solver a small Linear equation system. The matrix has a couple of diagonal terms with value 0, which makes the solver fail. Then I set a very small value (e.g., 1e-10) at these terms and the solver works. Can this cause noticeable errors in the solution? </font></div></div></div></blockquote><div class=""><br class=""></div><div class="">Can't say.</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 style="font-family:"Helvetica Neue",Helvetica,Arial,sans-serif;font-size:13px" class=""><div dir="ltr" class=""><font face="Helvetica, Arial, sans-serif" class="">Are there any options in Petsc to make the direct solver do row/column pivoting so that all the diagonal terms are non-zero?</font></div></div></div></blockquote><div class=""><br class=""></div><div class="">I see:</div><br class=""><br class="">-pc_factor_pivot_in_blocks <true,false>- allow pivoting within the small blocks during factorization (may increase stability of factorization.<br class=""><br class="">and<br class=""><br class=""><br class="">-pc_factor_shift_type <shifttype>- Sets shift type or PETSC_DECIDE for the default; use '-help' for a list of available types<br class="">-pc_factor_shift_amount <shiftamount>- Sets shift amount or PETSC_DECIDE for the default<br class=""><br class=""> <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 style="font-family:"Helvetica Neue",Helvetica,Arial,sans-serif;font-size:13px" class=""><div dir="ltr" class=""><font face="Helvetica, Arial, sans-serif" class=""><br class=""></font></div><div dir="ltr" class=""><font face="Helvetica, Arial, sans-serif" class="">Thanks for any suggestions.</font></div><div dir="ltr" class=""><font face="Helvetica, Arial, sans-serif" class=""><br class=""></font></div><div dir="ltr" class=""><font face="Helvetica, Arial, sans-serif" class="">Regards,</font></div><div dir="ltr" class=""><font face="Helvetica, Arial, sans-serif" class="">Qin</font></div></div></div></blockquote></div></div>
</div></blockquote></div><br class=""></div></body></html>