On Tue, Aug 7, 2012 at 1:53 PM, Tabrez Ali <span dir="ltr"><<a href="mailto:stali@geology.wisc.edu" target="_blank">stali@geology.wisc.edu</a>></span> wrote:<br><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div bgcolor="#FFFFFF" text="#000000">
Matt<br>
<br>
So if I want to use a direct solver I should really use (2) instead
of (3).<br></div></blockquote><div><br></div><div>To guarantee robustness, yes.</div><div><br></div><div> Matt</div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div bgcolor="#FFFFFF" text="#000000">
Tabrez<br>
<br>
On 08/07/2012 01:05 PM, Matthew Knepley wrote:
<blockquote type="cite">On Tue, Aug 7, 2012 at 12:48 PM, Tabrez Ali <span dir="ltr"><<a href="mailto:stali@geology.wisc.edu" target="_blank">stali@geology.wisc.edu</a>></span>
wrote:<br>
<div class="gmail_quote">
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Barry<br>
<br>
So which one of the two gives the correct solution? And yes
the condition number is high.<br>
<br>
Actually I am trying to solve a trivial quasi-static problem
with the following flags<br>
<br>
(1) -ksp_type gmres -pc_type asm<br>
(2) -ksp_type gmres -pc_type lu -pc_factor_shift_type nonzero<br>
(3) -ksp_type preonly -pc_type lu -pc_factor_shift_type
nonzero<br>
</blockquote>
<div><br>
</div>
<div>This does no iterative refinement, so you are stuck with
the initial accuracy of the LU</div>
<div>factorization, which can be bad for an ill-conditioned
matrix.</div>
<div><br>
</div>
<div> Matt</div>
<div> </div>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
The results at t=0 for all three cases are equivalent.<br>
<br>
For the time dependent part (linear system is solved again),
results from (1) and (2) are the same. But (3) gives a very
different answer.<br>
<br>
I also solve the same quasi-static problem using a different
code (does not use PETSc) and the results obtained are similar
to (1) and (2).<br>
<br>
So basically I am trying to understand why '-ksp_type preonly'
gives me a (potentially) wrong solution.<br>
<br>
Thanks<br>
Tabrez
<div>
<div><br>
<br>
<br>
On 08/07/2012 12:01 PM, Barry Smith wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
On Aug 7, 2012, at 12:06 PM, Tabrez Ali<<a href="mailto:stali@geology.wisc.edu" target="_blank">stali@geology.wisc.edu</a>>
wrote:<br>
<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Hello list<br>
<br>
By any chance is using<br>
<br>
-ksp_type gmres -pc_type lu<br>
<br>
similar to<br>
<br>
-ksp_type preonly -pc_type lu?<br>
<br>
Should the results be equivalent?<br>
<br>
T<br>
</blockquote>
The should be similar but will not be identical
necessarily, in particular when the matrix is ill
conditioned they can be very different and in fact GMRES
may iterate a few times.<br>
<br>
Barry<br>
<br>
</blockquote>
<br><span class="HOEnZb"><font color="#888888">
<br>
</font></span></div><span class="HOEnZb"><font color="#888888">
</font></span></div><span class="HOEnZb"><font color="#888888">
<span><font color="#888888">
-- <br>
No one trusts a model except the one who wrote it;
Everyone trusts an observation except the one who made it-
Harlow Shapley<br>
<br>
</font></span></font></span></blockquote><span class="HOEnZb"><font color="#888888">
</font></span></div><span class="HOEnZb"><font color="#888888">
<br>
<br clear="all">
<div><br>
</div>
-- <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>
</font></span></blockquote>
<br>
</div>
</blockquote></div><br><br clear="all"><div><br></div>-- <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>