[petsc-users] Creating a symmetric matrix with the upper triangular elements

Jed Brown jed at jedbrown.org
Wed Oct 29 23:54:06 CDT 2014


Evan Um <evanum at gmail.com> writes:

> PETSC users,
>
> As memory is at a premium in my problem, I want to compute only the upper
> triangular elements of a matrix and then construct a parallel sparse
> symmetric matrix. In this case, do I have to use "MatSetOption
> <http://www.mcs.anl.gov/petsc/petsc-current/docs/manualpages/Mat/MatSetOption.html#MatSetOption>
> (A,MAT_SYMMETRIC,PETSC_TRUE

This asserts that the matrix is symmetric, but it does not change the
data structure at all and doesn't magically make the matrix symmetric.

You want MATSBAIJ.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 818 bytes
Desc: not available
URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20141029/c4a99275/attachment.pgp>


More information about the petsc-users mailing list