On Fri, Feb 18, 2011 at 5:20 AM, TAY wee-beng <span dir="ltr"><<a href="mailto:zonexo@gmail.com">zonexo@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;">
Hi,<br>
<br>
I am trying to solve the Navier Stokes momentum equation of a moving body.<br>
<br>
For most points (a), I will be using the north/south/east/west locations to form the equation.<br>
<br>
However, for some points (b), due to the moving body, I will be using some interpolation schemes. At different time step, the interpolation template will be different for these points. Hence, I will use different neighboring points to form the equation.<br>
<br>
Moreover, points (a) can change to points (b) and vice versa.<br>
<br>
I wonder if I can use MatZeroEntries to re-zero the whole sparse matrix. But in the manual, it states that "For sparse matrices this routine retains the old nonzero structure. ". However for my case, the template is different at different time step.<br>
<br>
Hence what is the most efficient procedure?<br></blockquote><div><br></div><div>There is no efficiently, updateable data structure in PETSc, since this would be much lower performance for general use.</div><div><br></div>
<div>I suggest using a matrix-free application of your full operator, and a fixed sparsity operator for your preconditioner. Alternatively,</div><div>you can rebuild the matrix structure at each step, which might be the best option depending on how much work you do in each solve.</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;">
-- <br>
Yours sincerely,<br><font color="#888888">
<br>
TAY wee-beng<br>
<br>
</font></blockquote></div><br><br clear="all"><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>