[petsc-users] MatZeroEntries for retaining allocated space

Samuel Estes samuelestes91 at gmail.com
Tue Apr 12 11:54:21 CDT 2022


I have a problem where I want to allocate some nonzero structure to a
sparse matrix which will be used repeatedly to solve some equations. The
assembly routines will compress out allocated space which has not been
assigned a value so I know that I need to assign zero values to any unused
entries in order to keep that space. Will MatZeroEntries do this? If not, I
could always just loop over and explicitly assign zero values but
MatZeroEntries would be more convenient. Thanks!
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20220412/89008524/attachment.html>

More information about the petsc-users mailing list