On Tue, Oct 30, 2012 at 6:36 PM, NAN ZHAO <span dir="ltr"><<a href="mailto:zhaonanavril@gmail.com" target="_blank">zhaonanavril@gmail.com</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>Dear all,</div>
<div> </div>
<div>I need to solve Ax=b in a iteratively, and the A is b is ajusted in each iteration. I am using matzeroentries to zeroout the values in A (A is in MPIBAIJ format). Somehow, I found this cause me some unexpected wrong solutions. I do not want to retain the non-zero structures in A when I try to zero it. Does anyone have a idea to do that. Or I need to destroy the A matrix each time I give new values to it (the non-zero structure is changing).</div>
</blockquote><div><br></div><div>If the nonzero structure of A is changing, there is really no advantage to keeping it (unless you can see one). I would</div><div>recreate it and call KSPSetOperators() again.</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> </div>
<div>Thanks,</div>
<div>Nan</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>