<div dir="ltr"><div class="gmail_extra"><div class="gmail_quote">On Wed, Mar 21, 2018 at 6:12 AM, Matthew Knepley <span dir="ltr"><<a href="mailto:knepley@gmail.com" target="_blank">knepley@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div>
<div dir="ltr">
<div class="gmail_extra">
<div class="gmail_quote"><span class="">On Wed, Mar 21, 2018 at 9:07 AM, 我 <span dir="ltr"><<a href="mailto:dayedut123@163.com" target="_blank">dayedut123@163.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
<div style="line-height:1.7;color:rgb(0,0,0);font-size:14px;font-family:Arial">
<div>Thanks for your reply! You mean the preconditioner must be the necessary choice for the linear iterative method in PETSc?</div>
</div>
</blockquote>
<div><br>
</div>
</span><div>No. As you saw, you can use no preconditioner. The bad convergence has nothing to do with PETSc. It is a mathematical fact. All</div>
<div>iterative methods behave this way.</div><span class="">
<div> </div>
<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
<div style="line-height:1.7;color:rgb(0,0,0);font-size:14px;font-family:Arial">
<div>And the default preconditioner in PETSC is which one?</div>
</div>
</blockquote>
<div><br>
</div>
</span><div>ILU(0).</div></div></div></div></div></blockquote><div><br></div><div>Let me also point out: If you want to know all of the details of what solvers and preconditioners are being used, you can run with "-ksp_view" and you will be given all of the details of what PETSc is using. If you are using SNES to solve nonlinear problems, then you can also do "-snes_view".<br><br></div><div>--Richard<br></div><div> <br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div><div dir="ltr"><div class="gmail_extra"><div class="gmail_quote"><span class="">
<div> </div>
<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
<div style="line-height:1.7;color:rgb(0,0,0);font-size:14px;font-family:Arial">
<div>I want to compare them in order to illustrate that PCHYPRE is best one for my problem.</div>
</div>
</blockquote>
<div><br>
</div>
</span><div>Then the right thing to do is read some papers and reproduce what other people have done, and show that Hypre is better than that.</div><span class="">
<div> </div>
<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
<div style="line-height:1.7;color:rgb(0,0,0);font-size:14px;font-family:Arial">
<div>If I want to get the matrix after preconditioned (e.g. PAx=Pb, and I want to get PA), is there a function in PETSc?<br>
</div>
</div>
</blockquote>
<div><br>
</div>
</span><div><a href="http://www.mcs.anl.gov/petsc/petsc-current/docs/manualpages/KSP/KSPComputeExplicitOperator.html" target="_blank">http://www.mcs.anl.gov/petsc/<wbr>petsc-current/docs/<wbr>manualpages/KSP/<wbr>KSPComputeExplicitOperator.<wbr>html</a><br>
</div>
<div><br>
</div>
<div>It is extremely expensive and should only be used for very small problems. The whole idea of iterative methods is that you do</div>
<div>NOT compute this operator explicitly.</div>
<div><br>
</div>
<div> Matt</div><span class="">
<div> </div>
<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
<div style="line-height:1.7;color:rgb(0,0,0);font-size:14px;font-family:Arial">
<div>Thanks again!<br>
Daye<br>
</div>
<br>
<br>
<br>
<div style="zoom:1"></div>
<div id="m_3098181570635472208gmail-m_-372848506031123253divNeteaseMailCard"></div>
<br>
At 2018-03-21 18:45:18, "Matthew Knepley" <<a href="mailto:knepley@gmail.com" target="_blank">knepley@gmail.com</a>> wrote:<br>
<blockquote id="m_3098181570635472208gmail-m_-372848506031123253isReplyContent" style="padding-left:1ex;margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204)">
<div dir="ltr">
<div class="gmail_extra">
<div class="gmail_quote">On Wed, Mar 21, 2018 at 3:35 AM, 我 <span dir="ltr"><<a href="mailto:dayedut123@163.com" target="_blank">dayedut123@163.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
<div style="line-height:1.7;color:rgb(0,0,0);font-size:14px;font-family:Arial">
<div>Hi,<br>
I want to compare the time cost between preconditioner and unpreconditioner in PETSc. But I didn't know how to turn off the preconditioner in Petsc. If I choose the PCNONE, but the solution even can not converge.
</div>
</div>
</blockquote>
<div><br>
</div>
<div>That is how you turn off a preconditioner, -pc_type none. Without a preconditioner, almost nothing converges. You can't have it both ways.</div>
<div><br>
</div>
<div> Thanks,</div>
<div><br>
</div>
<div> Matt</div>
<div> </div>
<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
<div style="line-height:1.7;color:rgb(0,0,0);font-size:14px;font-family:Arial">
<div>If I do not declare PC at the beginning of my program, will PETSc choose a default preconditioner? I just want to turn off it. Any suggestions?<br>
Thank you very much!<br>
Daye<br>
</div>
</div>
<br>
<br>
<span title="neteasefooter">
<p> </p>
</span></blockquote>
</div>
<br>
<br clear="all">
<span class="m_3098181570635472208gmail-HOEnZb"><font color="#888888">
<div><br>
</div>
-- <br>
<div class="m_3098181570635472208gmail-m_-372848506031123253gmail_signature">
<div dir="ltr">
<div>
<div dir="ltr">
<div>What most experimenters take for granted before they begin their experiments is infinitely more interesting than any results to which their experiments lead.<br>
-- Norbert Wiener</div>
<div><br>
</div>
<div><a href="http://www.caam.rice.edu/~mk51/" target="_blank">https://www.cse.buffalo.edu/~k<wbr>nepley/</a><br>
</div>
</div>
</div>
</div>
</div>
</font></span></div>
</div>
</blockquote>
</div>
<br>
<br>
<span title="neteasefooter">
<p> </p>
</span></blockquote>
</span></div><span class="">
<br>
<br clear="all">
<div><br>
</div>
-- <br>
<div class="m_3098181570635472208gmail_signature">
<div dir="ltr">
<div>
<div dir="ltr">
<div>What most experimenters take for granted before they begin their experiments is infinitely more interesting than any results to which their experiments lead.<br>
-- Norbert Wiener</div>
<div><br>
</div>
<div><a href="http://www.caam.rice.edu/~mk51/" target="_blank">https://www.cse.buffalo.edu/~<wbr>knepley/</a><br>
</div>
</div>
</div>
</div>
</div>
</span></div>
</div>
</div>
</blockquote></div><br></div></div>