[petsc-users] updating parallel matrix
Jed Brown
jed at jedbrown.org
Wed Jun 5 06:13:02 CDT 2019
Just MatSetValues and MatAssembly* again. If you use ADD_VALUES, then
you might MatZeroEntries before adding values.
Evan Um via petsc-users <petsc-users at mcs.anl.gov> writes:
> Hi PETSC users,
>
> I want to solve a number of matrix-vector equations. In each equation, the
> matrix has different values, but the sparsity pattern is unchanged. I can
> destroy a current matrix and create a new matrix. However, is there a more
> efficient way to do this task? Is there any code example for this kind of
> problem? In advance, thank you very much for your comments.
>
> Regards,
> Evan
More information about the petsc-users
mailing list