[petsc-users] Question on non-zero pattern

John Mousel elafint.john at gmail.com
Thu Mar 14 13:32:43 CDT 2013


Why not just put zeros in the composite non-zero pattern before you
assemble it the first time?
Then call MatZeroEntries whenever you want to reassemble.


On Thu, Mar 14, 2013 at 1:28 PM, Sanjay Govindjee <s_g at berkeley.edu> wrote:

> Is there a mechanism for resetting a matrix's non-zero pattern?
>
> In particular,  I have a preallocated a matrix, set the values, and
> assembled it.
> And used it to solve a problem.
>
> Now I would like to zero it, and reassemble it with a different non-zero
> pattern.
> Note the matrix has been preallocated so that it can accommodate both
> non-zero
> patterns.
>
> -sanjay
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20130314/2f9f185e/attachment.html>


More information about the petsc-users mailing list