Question on matrix preallocation

Tobias Neckel neckel at
Tue May 13 00:42:08 CDT 2008

> You are assembling before inserting values. This wipes out the preallocation
> information since assembly shrinks the matrix to an optimal size.

Sorry for being quite late, but thanks a lot, Matt! The assembling caused the problem 
also in my real code ... small cause, large effect.

Now it is running fast :-)

Best regards

Dipl.-Tech. Math. Tobias Neckel

Institut für Informatik V, TU München
Boltzmannstr. 3, 85748 Garching

Tel.:   089/289-18602
Email:  neckel at

More information about the petsc-users mailing list