<div class="gmail_quote">On Wed, Aug 8, 2012 at 12:47 PM, Jinquan Zhong <span dir="ltr"><<a href="mailto:jzhong@scsolutions.com" target="_blank">jzhong@scsolutions.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Are you referring to preallocating memory for the size of A before MatSetValues(A, ...)?  I didn't do that.</blockquote></div><div><br></div><div>This is very important.</div><br><div><a href="http://www.mcs.anl.gov/petsc/documentation/faq.html#efficient-assembly">http://www.mcs.anl.gov/petsc/documentation/faq.html#efficient-assembly</a></div>
<div><br></div><div><br></div><div>With petsc-dev, it is best to use MATELEMENTAL for dense matrices.</div><div><br></div><div>What are you trying to do with this dense martix?</div>