[petsc-users] MatZeroRows and full assembly

Barry Smith bsmith at petsc.dev
Mon Sep 13 15:01:55 CDT 2021



> On Sep 13, 2021, at 3:34 PM, Anthony Paul Haas <aph at email.arizona.edu> wrote:
> 
> Hello,
> 
> Is it allowed after a MatZeroRows to insert more values in the row that was just zeroed with MatSetValues and then perform another full assembly of the matrix?

  Yes, if you are replacing previously zeroed values it will simply fill them in efficiently. If you are introducing new nonzero locations it will be inefficient in general because it has to allocate new space for the new locations.

  Barry


> 
> Thanks,
> 
> Anthony

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20210913/9cbdd654/attachment.html>


More information about the petsc-users mailing list