On Mon, Nov 11, 2013 at 4:20 PM, Jed Brown <[email protected]> wrote:
> Matthew Knepley <[email protected]> writes: > > I did not check, but it would be interesting to check 3D since that it 4 > > part keys. > > That should just change the cost of the hash function, so I wouldn't > expect a big difference. > > > It by far the leading cost in mesh setup, but matrix preallocation is > > 3x more expensive right now. > > Okay, the brain-dead way to make preallocation easy is to use a hash to > store (row,column). Then the user does a dummy assembly (MatSetValues) > that adds to the hash (and could discard the values). I used to want a > more elegant solution, but the perfect is the enemy of the good and this > would be perfectly sufficient and users would love it because they > wouldn't have to think about preallocation. It uses a bit more memory, > but preallocation is usually before preconditioner setup and if we leave > the values out, the overhead is manageable. > That would certainly be simpler, but I don't think it would be any cheaper than what I am doing now. We should have the Mat have this mode, however. It would make it easier on people. Matt -- What most experimenters take for granted before they begin their experiments is infinitely more interesting than any results to which their experiments lead. -- Norbert Wiener
