<div dir="ltr">On Mon, Nov 11, 2013 at 4:20 PM, Jed Brown <span dir="ltr"><<a href="mailto:jedbrown@mcs.anl.gov" target="_blank">jedbrown@mcs.anl.gov</a>></span> wrote:<br><div class="gmail_extra"><div class="gmail_quote">
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class="im">Matthew Knepley <<a href="mailto:knepley@gmail.com">knepley@gmail.com</a>> writes:<br>
> I did not check, but it would be interesting to check 3D since that it 4<br>
> part keys.<br>
<br>
</div>That should just change the cost of the hash function, so I wouldn't<br>
expect a big difference.<br>
<div class="im"><br>
> It by far the leading cost in mesh setup, but matrix preallocation is<br>
> 3x more expensive right now.<br>
<br>
</div>Okay, the brain-dead way to make preallocation easy is to use a hash to<br>
store (row,column).  Then the user does a dummy assembly (MatSetValues)<br>
that adds to the hash (and could discard the values).  I used to want a<br>
more elegant solution, but the perfect is the enemy of the good and this<br>
would be perfectly sufficient and users would love it because they<br>
wouldn't have to think about preallocation.  It uses a bit more memory,<br>
but preallocation is usually before preconditioner setup and if we leave<br>
the values out, the overhead is manageable.<br>
</blockquote></div><br>That would certainly be simpler, but I don't think it would be any cheaper than what</div><div class="gmail_extra">I am doing now.</div><div class="gmail_extra"><br></div><div class="gmail_extra">
We should have the Mat have this mode, however. It would make it easier on people.</div><div class="gmail_extra"><br></div><div class="gmail_extra">    Matt<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
</div></div>