bsmith at mcs.anl.gov
Fri Mar 6 12:58:50 CST 2009
On Mar 6, 2009, at 12:05 PM, Yixun Liu wrote:
> To allocate space for matrix I can specify the exact number of non-
> elements for diagonal and off diagonal or just specify a maximal
> for each row. Do they have the same performance?
If you specifiy the exact counts for each row then there will me
no additional memory allocations and no wasted space.
If you provide an upper bound then then will be no additional memory
allocations and some space (depending on the structure of your
matrix will be unused).
Asside from memory usage both approaches will take the same amount
More information about the petsc-users