[petsc-users] DAGetMatrix with extra nonzeros: memory preallocation
Mohamad M. Nasr-Azadani
mmnasr at gmail.com
Sat Sep 10 05:36:37 CDT 2011
Hi guys,
I am setting up a matrix (parallel) using DA's in 3D.
DA is built upon a width=1, STAR_STENCIL type.
The nonzero structure of the resulting matrix is hepta-diagonal for the most
part, however, since I am imposing boundary conditions using interpolation
methods, for some boundary nodes, it is possible that some extra nonzeros
are added into new locations.
This obviously reduces the matrix setup and assembly efficiency since the
new nonzeros are not preallocated.
Is there any way that I could do it myself, i.e. preallocate the new
nonzeros before matrix setup to get the best performance?
Thanks and have a great weekend,
Mohamad
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20110910/5bbcfd9d/attachment.htm>
More information about the petsc-users
mailing list