On Mon, Jul 27, 2009 at 12:46 PM, BAYRAKTAR Harun <span dir="ltr"><<a href="mailto:Harun.BAYRAKTAR@3ds.com">Harun.BAYRAKTAR@3ds.com</a>></span> wrote:<br><div class="gmail_quote"><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<div link="blue" vlink="purple" lang="EN-US">
<div>
<p>Hello,</p>
<p> </p>
<p>I have a rather simple question. For a Matrix that was
preallocated with the correct diagonal and offdiagonal nonzero counts the
following operations cause a deallocation of all data except the diagonal which
casues later MatSetValues to have to reallocate.</p>
<p> </p>
<p>MatCreateSeqAIJ</p>
<p>MatZeroEntries</p>
<p>MatDiagaonalSet</p>
<p> </p>
<p>Using -info and the debugger I see that MatDiagonalSet ends
up calling MatDiagonalSet_Default which forces an assembly. Is there a way to
do the same thing and preserve the preallocated storage for future use by
MatSetValues? I tried MatSetOption with MAT_KEEP_ZEROED_ROWS and
MAT_IGNORE_ZERO_ENTRIED but it did not help.</p>
</div></div></blockquote><div><br>Is it possible to set the diagonal after the rest of the entires?<br><br> Matt<br> </div><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<div link="blue" vlink="purple" lang="EN-US"><div>
<p>Thanks a lot,</p>
<p>Harun</p></div>
</div>
</blockquote></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>