[petsc-users] MatZeroRows and full assembly

Junchao Zhang junchao.zhang at gmail.com
Mon Sep 13 15:04:04 CDT 2021


>From https://petsc.org/release/docs/manualpages/Mat/MatSetOption.html,

MAT_KEEP_NONZERO_PATTERN
<https://petsc.org/release/docs/manualpages/Mat/MatOption.html#MatOption>
indicates
when MatZeroRows
<https://petsc.org/release/docs/manualpages/Mat/MatZeroRows.html#MatZeroRows>()
is called the zeroed entries are kept in the nonzero structure

So, if you have this option  true and you set to a previous location, then
it is fine, otherwise you also need MAT_NEW_NONZERO_ALLOCATION_ERR
<https://petsc.org/release/docs/manualpages/Mat/MatOption.html#MatOption>
to be false to do so.

--Junchao Zhang


On Mon, Sep 13, 2021 at 2: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?
>
> Thanks,
>
> Anthony
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20210913/74535cc1/attachment.html>


More information about the petsc-users mailing list