<div dir="ltr">Hi, <br><br>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. <br><br>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 <br>
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 <br>MatCreateSeqAIJWithArrays() function. The manual says: <br><pre><br>
PetscErrorCode PETSCMAT_DLLEXPORT MatCreateSeqAIJWithArrays(MPI_Comm comm,PetscInt m,PetscInt n,PetscInt* i,PetscInt*j,PetscScalar *a,Mat *mat)<br></pre>
<a href="http://www-unix.mcs.anl.gov/petsc/petsc-2/snapshots/petsc-current/docs/manualpages/Sys/MPI_Comm.html#MPI_Comm"></a>
<p>
</p><h3><font color="#cc3333">Input Parameters</font></h3>
<table border="0" cellpadding="0" cellspacing="0"><tbody><tr><td width="40"><br></td><td valign="top" align="left"><b><a href="http://www-unix.mcs.anl.gov/petsc/petsc-2/snapshots/petsc-current/docs/manualpages/Sys/comm.html#comm">comm</a> </b></td>
<td>- must be an MPI communicator of <a href="http://www-unix.mcs.anl.gov/petsc/petsc-2/snapshots/petsc-current/docs/manualpages/Sys/size.html#size">size</a> 1
</td></tr>
<tr><td width="40"><br></td><td valign="top" align="left"><b>m </b></td><td>- number of rows
</td></tr>
<tr><td width="40"><br></td><td valign="top" align="left"><b>n </b></td><td>- number of columns
</td></tr>
<tr><td width="40"><br></td><td valign="top" align="left"><b>i </b></td><td>- row indices
</td></tr>
<tr><td width="40"><br></td><td valign="top" align="left"><b>j </b></td><td><br></td></tr>
<tr><td width="40"><br></td><td valign="top" align="left"><b>a </b></td><td><br></td></tr></tbody></table><br clear="all"><br>Can petsc exploit any symmetric proptery of a given matrix? How could I Set it to be symmetry one ? <br>
<br>Best Regards,<br><br><br><br><br>-- <br>Pang Shengyong<br>Solidification Simulation Lab, <br>State Key Lab of Mould & Die Technology,<br>Huazhong Univ. of Sci. & Tech. China<br>
</div>