<html>
<head>
<meta content="text/html; charset=ISO-8859-1"
http-equiv="Content-Type">
</head>
<body 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>
<br>
Tabrez<br>
<br>
On 08/07/2012 01:05 PM, Matthew Knepley wrote:
<blockquote
cite="mid:CAMYG4Gk6Dy81ggNHJdNGchHeKvcZd0J9E+o24CiY+B-j7n9reA@mail.gmail.com"
type="cite">On Tue, Aug 7, 2012 at 12:48 PM, Tabrez Ali <span
dir="ltr"><<a moz-do-not-send="true"
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 class="HOEnZb">
<div class="h5"><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
moz-do-not-send="true"
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>
<br>
</div>
</div>
<span class="HOEnZb"><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></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>
</blockquote>
<br>
</body>
</html>