I see. Thanks, Matt. <br><br>Yan<br><br><div class="gmail_quote">On Tue, Apr 5, 2011 at 11:27 PM, Matthew Knepley <span dir="ltr">&lt;<a href="mailto:knepley@gmail.com">knepley@gmail.com</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">
<div class="im">On Tue, Apr 5, 2011 at 10:20 PM, Ryan Yan <span dir="ltr">&lt;<a href="mailto:vyan2000@gmail.com" target="_blank">vyan2000@gmail.com</a>&gt;</span> wrote:<br></div><div class="gmail_quote"><div class="im">
<blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">
One more ask, :-)<br><br>Which one is more efficient, richardson, preonly or no difference, if I am going to use direct solver for many times steps. <br></blockquote><div><br></div></div><div>There should be no difference since direct solves take so long.</div>

<div><br></div><div>  Matt</div><div class="im"><div> </div><blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">Thanks,<br><br>Yan<br><br><div class="gmail_quote">
On Tue, Apr 5, 2011 at 11:06 PM, Barry Smith <span dir="ltr">&lt;<a href="mailto:bsmith@mcs.anl.gov" target="_blank">bsmith@mcs.anl.gov</a>&gt;</span> wrote:<br>

<blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;"><div><div></div><div><br>
On Apr 5, 2011, at 9:52 PM, Ryan Yan wrote:<br>
<br>
&gt; Hi,<br>
&gt; I am wondering is there a way of checking the residual of a direct solver. It should<br>
&gt; be one shot and very small.  I tried -ksp_monitor_true_residual, but no thing shows up. I guess a piece of code<br>
&gt; $Ax-b$ will do the trick?<br>
<br>
</div></div>   The reason that the monitor doesn&#39;t display anything is not the direct solver but because you are using LU with KSPType of KSPPREONLY  if you run with -ksp_type richardson or -ksp_type gmres then -ksp_monitor_true_residual will print the residual as you want.<br>



<br>
   Barry<br>
<br>
&gt;<br>
&gt; Thanks,<br>
&gt;<br>
&gt; Yan<br>
<br>
</blockquote></div><br>
</blockquote></div></div><br><br clear="all"><div><div></div><div class="h5"><br>-- <br>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<br>

</div></div></blockquote></div><br>