Set values of symmetric matrices.

Hong Zhang hzhang at
Thu Jun 22 11:16:06 CDT 2006


We support cg with MPIAIJ and MPISBAIJ format.

> I use MatCreateMPIAIJ to create parallel matrices. I would like to use KSPCG to
> solve a symmetric matrices. I tried to implement it but the program exits with
> no error.
Do you mean with error? If so, what error message?

>Do I need only to set values on the diagonal and upper diagonal only
> or continue to set all non-zero entries of the matrix?
If you use MPISBAIJ matrix format, then you only need to set the diagonal
and upper diagonals. Setting all non-zero entries of the matrix
also works - petsc ignores the lower triangular part.


More information about the petsc-users mailing list