Does petsc exploit the symmetric property of matrix?

berry lua.byhh at
Fri Aug 15 07:16:11 CDT 2008


I am totally a newbie to petsc. Previously I use laspack library for my
linear solver. Now I decide to transfer to Petsc for our simulation code.

I have a huge sparse matrix with 3million*3million with 21 million no zero
elements.  The matrix is symmetric, so the non zero element of upper
triangular matrix
is only 12 million.  And matrix format is Yale Space Matrix format. However,
I have not seen any indicative parmater for matrix symmetry property in
MatCreateSeqAIJWithArrays() function.  The manual says:

PetscErrorCode PETSCMAT_DLLEXPORT MatCreateSeqAIJWithArrays(MPI_Comm
comm,PetscInt m,PetscInt n,PetscInt* i,PetscInt*j,PetscScalar *a,Mat


Input Parameters
*- must be an MPI communicator of
*m *- number of rows
*n *- number of columns
*i *- row indices
*j *

*a *

Can petsc exploit any symmetric proptery of a given matrix?  How could I Set
it to be symmetry one ?

Best Regards,

Pang Shengyong
Solidification Simulation Lab,
State Key Lab of Mould & Die Technology,
Huazhong Univ. of Sci. & Tech. China
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <>

More information about the petsc-users mailing list